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)
|
let newOffset = offset + Int32(chunkSize)
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
if newOffset < size! {
|
||||||
if newOffset < size! {
|
self.fetchAlbumArt(
|
||||||
self.fetchAlbumArt(
|
songUri: songUri,
|
||||||
songUri: songUri,
|
imageData: data,
|
||||||
imageData: data,
|
offset: newOffset,
|
||||||
offset: newOffset,
|
callback: callback
|
||||||
callback: callback
|
)
|
||||||
)
|
} else {
|
||||||
} else {
|
callback(data)
|
||||||
callback(data)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user