for( i_input = vlc_optind; i_input < i_argc;i_input++ )
{
+ /* We need to resolve relative paths in this instance */
+ char *psz_mrl = make_URI( ppsz_argv[i_input], NULL );
+ if( psz_mrl == NULL )
+ continue;
msg_Dbg( p_libvlc, "Adds %s to the running Media Player",
- ppsz_argv[i_input] );
+ psz_mrl );
p_dbus_msg = dbus_message_new_method_call(
"org.mpris.vlc", "/TrackList",
if ( NULL == p_dbus_msg )
{
msg_Err( p_libvlc, "D-Bus problem" );
+ free( psz_mrl );
system_End( p_libvlc );
exit( 1 );
}
/* append MRLs */
dbus_message_iter_init_append( p_dbus_msg, &dbus_args );
if ( !dbus_message_iter_append_basic( &dbus_args,
- DBUS_TYPE_STRING, &ppsz_argv[i_input] ) )
+ DBUS_TYPE_STRING, &psz_mrl ) )
{
dbus_message_unref( p_dbus_msg );
+ free( psz_mrl );
system_End( p_libvlc );
exit( 1 );
}
+ free( psz_mrl );
b_play = TRUE;
if( var_InheritBool( p_libvlc, "playlist-enqueue" ) )
b_play = FALSE;