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

This does not need to be async on the main thread

In fact doing so causes us to idle excessively.
This commit is contained in:
Daniel Barber 2020-02-15 21:11:15 -05:00
parent abf1579789
commit abe2c293eb
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -74,17 +74,15 @@ extension MPDClient {
let newOffset = offset + Int32(chunkSize)
DispatchQueue.main.async {
if newOffset < size! {
self.fetchAlbumArt(
songUri: songUri,
imageData: data,
offset: newOffset,
callback: callback
)
} else {
callback(data)
}
if newOffset < size! {
self.fetchAlbumArt(
songUri: songUri,
imageData: data,
offset: newOffset,
callback: callback
)
} else {
callback(data)
}
}
}