Skip to content

Commit 903bc9c

Browse files
committed
[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>
1 parent f274a8e commit 903bc9c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Playlist/PlaylistLoader.m

+9-3
Original file line numberDiff line numberDiff line change
@@ -618,9 +618,15 @@ - (void)loadInfoForEntries:(NSArray *)entries {
618618
}
619619

620620
if(![queueThisJob count]) {
621-
[playlistController performSelectorOnMainThread:@selector(updateTotalTime) withObject:nil waitUntilDone:NO];
622-
[self completeProgress];
623-
metadataLoadInProgress = NO;
621+
size_t count;
622+
@synchronized (queuedURLs) {
623+
count = [queuedURLs count];
624+
}
625+
if(!count) {
626+
[playlistController performSelectorOnMainThread:@selector(updateTotalTime) withObject:nil waitUntilDone:NO];
627+
[self completeProgress];
628+
metadataLoadInProgress = NO;
629+
}
624630
return;
625631
}
626632

0 commit comments

Comments
 (0)