[Playlist Loader] Only ask permission for local

Only ask permission for container folders if the container has local
files, and not for purely remote files, such as stream playlists.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
main
Christopher Snowhill 2022-07-23 18:00:18 -07:00
parent 9ced34a87c
commit f9aa56b18a
1 changed files with 10 additions and 1 deletions

View File

@ -411,7 +411,16 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
// Make sure the container isn't added twice.
[uniqueURLs addObject:url];
[[SandboxBroker sharedSandboxBroker] requestFolderForFile:url];
BOOL localFound = NO;
for(NSURL *u in urls) {
if([u isFileURL]) {
localFound = YES;
break;
}
}
if(localFound) {
[[SandboxBroker sharedSandboxBroker] requestFolderForFile:url];
}
} else {
/* Fall back on adding the raw file if all container parsers have failed. */
[fileURLs addObject:url];