[File Association] Correctly play files on open

When opening files from external association, such as opening files, or
opening folders with Cog, correctly obey the configured clear and play
or enqueue and play actions, by playing the new additions.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
xcode15
Christopher Snowhill 2022-07-06 17:04:02 -07:00
parent 38beb9e930
commit a0621b2537
1 changed files with 2 additions and 2 deletions

View File

@ -492,7 +492,7 @@ static AppController *kAppController = nil;
NSArray *urls = @[[NSURL fileURLWithPath:filename]]; NSArray *urls = @[[NSURL fileURLWithPath:filename]];
NSDictionary *loadEntriesData = @{ @"entries": urls, NSDictionary *loadEntriesData = @{ @"entries": urls,
@"sort": @(NO), @"sort": @(NO),
@"origin": @(URLOriginInternal) }; @"origin": @(URLOriginExternal) };
[playlistController performSelectorInBackground:@selector(addURLsInBackground:) withObject:loadEntriesData]; [playlistController performSelectorInBackground:@selector(addURLsInBackground:) withObject:loadEntriesData];
return YES; return YES;
} }
@ -507,7 +507,7 @@ static AppController *kAppController = nil;
NSDictionary *loadEntriesData = @{ @"entries": urls, NSDictionary *loadEntriesData = @{ @"entries": urls,
@"sort": @(YES), @"sort": @(YES),
@"origin": @(URLOriginInternal) }; @"origin": @(URLOriginExternal) };
[playlistController performSelectorInBackground:@selector(addURLsInBackground:) withObject:loadEntriesData]; [playlistController performSelectorInBackground:@selector(addURLsInBackground:) withObject:loadEntriesData];