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) {
|
func getAlbumSongs(for album: Album) {
|
||||||
App.mpdClient.getAlbumSongs(for: album.mpdAlbum) { [self] (mpdSongs: [MPDClient.MPDSong]) in
|
App.mpdClient.getAlbumSongs(for: album.mpdAlbum) { [weak self] (mpdSongs: [MPDClient.MPDSong]) in
|
||||||
self.dataSource.setAlbumSongs(
|
guard let self = self else { return }
|
||||||
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 let song = self.dataSource.albumSongs.first?.song ??
|
guard !self.dataSource.albumSongs.isEmpty,
|
||||||
self.dataSource.albumSongs[1].song
|
let song = self.dataSource.albumSongs.first?.song ??
|
||||||
else { return }
|
self.dataSource.albumSongs[1].song
|
||||||
|
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