Commit 99782f40 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)
(cherry picked from commit 722c751deddeb6106ed18e379a1364ed85cd2f86)

Conflicts:
	modules/gui/macosx/CoreInteraction.m
parent 31407937
...@@ -79,17 +79,24 @@ static VLCCoreInteraction *_o_sharedInstance = nil; ...@@ -79,17 +79,24 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
- (void)play - (void)play
{ {
playlist_t * p_playlist = pl_Get( VLCIntf ); 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; bool empty;
PL_LOCK; PL_LOCK;
empty = playlist_IsEmpty( p_playlist ); empty = playlist_IsEmpty(p_playlist);
PL_UNLOCK; 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]; [[[VLCMain sharedInstance] open] openFileGeneric];
else
var_SetInteger( VLCIntf->p_libvlc, "key-action", ACTIONID_PLAY_PAUSE ); [[[VLCMain sharedInstance] playlist] playItem:nil];
}
} }
- (void)pause - (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