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:
parent
abf1579789
commit
abe2c293eb
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user