mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Compare commits
2 Commits
1073dbd94c
...
87259920e8
| Author | SHA1 | Date | |
|---|---|---|---|
| 87259920e8 | |||
| 448165d786 |
@ -113,20 +113,21 @@ class AlbumDetailView: NSViewController {
|
||||
}
|
||||
|
||||
func getAlbumSongs(for album: Album) {
|
||||
App.mpdClient.getAlbumSongs(for: album.mpdAlbum) { [self] (mpdSongs: [MPDClient.MPDSong]) in
|
||||
self.dataSource.setAlbumSongs(
|
||||
mpdSongs.map { Song(mpdSong: $0) }
|
||||
)
|
||||
App.mpdClient.getAlbumSongs(for: album.mpdAlbum) { [weak self] (mpdSongs: [MPDClient.MPDSong]) in
|
||||
guard let self = self else { return }
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.dataSource.setAlbumSongs(
|
||||
mpdSongs.map { Song(mpdSong: $0) }
|
||||
)
|
||||
|
||||
self.albumTracksView.reloadData()
|
||||
}
|
||||
|
||||
guard let song = self.dataSource.albumSongs.first?.song ??
|
||||
self.dataSource.albumSongs[1].song
|
||||
else { return }
|
||||
guard !self.dataSource.albumSongs.isEmpty,
|
||||
let song = self.dataSource.albumSongs.first?.song ??
|
||||
self.dataSource.albumSongs[1].song
|
||||
else { return }
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.getBigCoverArt(song: song, album: album)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user