1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00

Compare commits

...

5 Commits

4 changed files with 15 additions and 22 deletions

View File

@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/krzyzanowskim/CryptoSwift",
"state": {
"branch": null,
"revision": "3a2acbb32ab68215ee1596ee6004da8e90c3721b",
"version": "1.0.0"
"revision": "a44caef0550c346e0ab9172f7c9a3852c1833599",
"version": "1.3.0"
}
},
{
@ -15,8 +15,8 @@
"repositoryURL": "https://github.com/tonyarnold/Differ",
"state": {
"branch": null,
"revision": "e2cca36e7258dd8add88ae46b5ea56509b066e21",
"version": "1.4.3"
"revision": "dd5d4bfb1c27012d4790e877b29847d2ab9d989b",
"version": "1.4.4"
}
},
{
@ -24,8 +24,8 @@
"repositoryURL": "https://github.com/PromiseKit/Foundation",
"state": {
"branch": null,
"revision": "ee06d95342a5007de2fffd898f4f35de026842ac",
"version": "3.3.3"
"revision": "1a276e598dac59489ed904887e0740fa75e571e0",
"version": "3.3.4"
}
},
{
@ -33,8 +33,8 @@
"repositoryURL": "https://github.com/onevcat/Kingfisher.git",
"state": {
"branch": null,
"revision": "8ef6ca8b1b767ac2400762ed2f2bf75ddea3de5b",
"version": "5.10.1"
"revision": "44bfa76787a0f07e4d5ae3304e9d4f631fd519bd",
"version": "5.13.0"
}
},
{
@ -51,8 +51,8 @@
"repositoryURL": "https://github.com/mxcl/PromiseKit",
"state": {
"branch": null,
"revision": "4d8d1287d2e50c53a9f8430ffe88925292838c57",
"version": "6.11.0"
"revision": "f14f16cc2602afec1030e4f492100d6d43dca544",
"version": "6.13.1"
}
},
{

View File

@ -113,9 +113,7 @@ class AlbumDetailView: NSViewController {
}
func getAlbumSongs(for album: Album) {
App.mpdClient.getAlbumSongs(for: album.mpdAlbum) { [weak self] (mpdSongs: [MPDClient.MPDSong]) in
guard let self = self else { return }
App.mpdClient.getAlbumSongs(for: album.mpdAlbum) { [self] (mpdSongs: [MPDClient.MPDSong]) in
self.dataSource.setAlbumSongs(
mpdSongs.map { Song(mpdSong: $0) }
)
@ -149,15 +147,10 @@ class AlbumDetailView: NSViewController {
]
)
cacheSmallCover(song: song, album: album)
cacheSmallCover(provider: provider)
}
func cacheSmallCover(song: Song, album: Album) {
let provider = MPDAlbumArtImageDataProvider(
songUri: song.mpdSong.uriString,
cacheKey: album.hash
)
func cacheSmallCover(provider: MPDAlbumArtImageDataProvider) {
_ = KingfisherManager.shared.retrieveImage(
with: .provider(provider),
options: [

View File

@ -127,7 +127,7 @@ extension MPDClient {
let callback = userData["callback"] as? (Data?) -> Void
else { return }
var imageData = userData["imageData"] as? Data? ?? nil
let imageData = userData["imageData"] as? Data? ?? nil
sendFetchAlbumArt(
forUri: songUri,

View File

@ -67,7 +67,7 @@ extension MPDClient {
mpd_return_pair(self.connection, binaryPair.pair)
_ = data[offset...].withUnsafeMutableBytes { (pointer) in
mpd_recv_binary(self.connection, pointer, chunkSize)
mpd_recv_binary(self.connection, pointer.baseAddress, chunkSize)
}
guard mpd_response_finish(self.connection) else { return }