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