Commit 722c751d authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: work-around a playlist core limitation, which doesn't allow the UI to...

macosx: work-around a playlist core limitation, which doesn't allow the UI to set the currently displayed root properly, so triggering a play can lead to unwanted results (close #7484)
parent 58fa68ce
......@@ -76,6 +76,12 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
- (void)play
{
input_thread_t * p_input;
p_input = pl_CurrentInput(VLCIntf);
if (p_input) {
var_SetInteger(VLCIntf->p_libvlc, "key-action", ACTIONID_PLAY_PAUSE);
vlc_object_release(p_input);
} else {
playlist_t * p_playlist = pl_Get(VLCIntf);
bool empty;
......@@ -83,10 +89,11 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
empty = playlist_IsEmpty(p_playlist);
PL_UNLOCK;
if (empty)
if ([[[VLCMain sharedInstance] playlist] isSelectionEmpty] && ([[[VLCMain sharedInstance] playlist] currentPlaylistRoot] == p_playlist->p_local_category || [[[VLCMain sharedInstance] playlist] currentPlaylistRoot] == p_playlist->p_ml_category))
[[[VLCMain sharedInstance] open] openFileGeneric];
var_SetInteger(VLCIntf->p_libvlc, "key-action", ACTIONID_PLAY_PAUSE);
else
[[[VLCMain sharedInstance] playlist] playItem:nil];
}
}
- (void)pause
......
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