Commit 8be68853 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: if an input item includes a NowPlaying meta item, display it in our...

macosx: if an input item includes a NowPlaying meta item, display it in our controller window instead some bogus MRL parsing stuff nobody can understand
parent 192a2076
......@@ -1328,8 +1328,12 @@ static VLCMain *_o_sharedMainInstance = nil;
vlc_object_release( p_playlist );
return;
}
o_temp = [NSString stringWithUTF8String:
p_playlist->status.p_item->p_input->psz_name];
if( input_item_GetNowPlaying ( p_playlist->status.p_item->p_input ) )
o_temp = [NSString stringWithUTF8String:
input_item_GetNowPlaying ( p_playlist->status.p_item->p_input )];
else
o_temp = [NSString stringWithUTF8String:
p_playlist->status.p_item->p_input->psz_name];
[self setScrollField: o_temp stopAfter:-1];
[[[self getControls] getFSPanel] setStreamTitle: o_temp];
......
......@@ -271,7 +271,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (void)updateTitle
{
NSMutableString * o_title = nil, * o_mrl = nil;
NSString * o_title = nil;
NSMutableString * o_mrl = nil;
input_thread_t * p_input;
if( p_vout == NULL )
......@@ -286,14 +287,21 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
return;
}
char *psz_nowPlaying = input_item_GetNowPlaying ( input_GetItem( p_input ) );
char *psz_name = input_item_GetName( input_GetItem( p_input ) );
char *psz_uri = input_item_GetURI( input_GetItem( p_input ) );
if( psz_name != NULL )
o_title = [NSMutableString stringWithUTF8String: psz_name];
if( psz_nowPlaying != NULL )
o_title = [NSString stringWithUTF8String: psz_nowPlaying];
else if( psz_name != NULL )
o_title = [NSString stringWithUTF8String: psz_name];
if( psz_uri != NULL )
o_mrl = [NSMutableString stringWithUTF8String: psz_uri];
free( psz_name );
free( psz_uri );
FREENULL( psz_nowPlaying );
FREENULL( psz_name );
FREENULL( psz_uri );
if( o_title == nil )
o_title = o_mrl;
......
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