Commit a7d57cdf authored by Felix Paul Kühne's avatar Felix Paul Kühne

* make sure that the opened media is always enqueueded, if macosx-autoplay is false

parent a94647f0
......@@ -666,9 +666,12 @@ static VLCMain *_o_sharedMainInstance = nil;
- (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename
{
BOOL b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" );
NSDictionary *o_dic = [NSDictionary dictionaryWithObjectsAndKeys: o_filename, @"ITEM_URL", nil];
[o_playlist appendArray:
[NSArray arrayWithObject: o_dic] atPos: -1 enqueue: NO];
if( b_autoplay )
[o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue: NO];
else
[o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue: YES];
return( TRUE );
}
......
......@@ -175,6 +175,7 @@
NSArray *o_types = [NSArray arrayWithObjects: NSFilenamesPboardType, nil];
NSString *o_desired_type = [o_paste availableTypeFromArray:o_types];
NSData *o_carried_data = [o_paste dataForType:o_desired_type];
BOOL b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" );
if( o_carried_data )
{
......@@ -191,7 +192,10 @@
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"];
o_array = [o_array arrayByAddingObject: o_dic];
}
[[[VLCMain sharedInstance] getPlaylist] appendArray: o_array atPos: -1 enqueue:NO];
if( b_autoplay )
[[[VLCMain sharedInstance] getPlaylist] appendArray: o_array atPos: -1 enqueue:NO];
else
[[[VLCMain sharedInstance] getPlaylist] appendArray: o_array atPos: -1 enqueue:YES];
return YES;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment