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

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,17 +76,24 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
- (void)play
{
playlist_t * p_playlist = pl_Get(VLCIntf);
bool empty;
PL_LOCK;
empty = playlist_IsEmpty(p_playlist);
PL_UNLOCK;
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;
if (empty)
[[[VLCMain sharedInstance] open] openFileGeneric];
PL_LOCK;
empty = playlist_IsEmpty(p_playlist);
PL_UNLOCK;
var_SetInteger(VLCIntf->p_libvlc, "key-action", ACTIONID_PLAY_PAUSE);
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];
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