[Playlist Info Loader] Do not clear if loading

Do not clear the progress indicator if a loading task is already running
in the background, but instead return without doing anything.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
lastfm
Christopher Snowhill 2022-06-22 19:05:27 -07:00
parent 71d8cb6246
commit 6867ef1e9a
1 changed files with 9 additions and 3 deletions

View File

@ -618,9 +618,15 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path);
}
if(![queueThisJob count]) {
[playlistController performSelectorOnMainThread:@selector(updateTotalTime) withObject:nil waitUntilDone:NO];
[self completeProgress];
metadataLoadInProgress = NO;
size_t count;
@synchronized (queuedURLs) {
count = [queuedURLs count];
}
if(!count) {
[playlistController performSelectorOnMainThread:@selector(updateTotalTime) withObject:nil waitUntilDone:NO];
[self completeProgress];
metadataLoadInProgress = NO;
}
return;
}