[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>
This commit is contained in:
Christopher Snowhill 2022-07-06 17:04:02 -07:00
parent a03e519c61
commit 1c3717eb84

View file

@ -485,7 +485,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;
} }
@ -500,7 +500,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];