]> git.sesse.net Git - vlc/commitdiff
single instance: append tracks as specified in MPRIS 2.2
authorMirsal Ennaime <mirsal@videolan.org>
Sat, 12 May 2012 18:54:33 +0000 (20:54 +0200)
committerMirsal Ennaime <mirsal@videolan.org>
Sat, 12 May 2012 19:09:12 +0000 (21:09 +0200)
Use /org/mpris/MediaPlayer2/TrackList/Append instead of / as the
AfterTrack argument to org.mpris.MediaPlayer2.AddTrack for appending

src/libvlc.c

index 6383a4c8685159c2019dbcf2eef3c11b047b43e9..2c9a49cde42d6aef53d7a269e3ecece6e16eb515 100644 (file)
@@ -340,6 +340,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
 /* FIXME: could be replaced by using Unix sockets */
 #ifdef HAVE_DBUS
 
+#define MPRIS_APPEND "/org/mpris/MediaPlayer2/TrackList/Append"
 #define MPRIS_BUS_NAME "org.mpris.MediaPlayer2.vlc"
 #define MPRIS_OBJECT_PATH "/org/mpris/MediaPlayer2"
 #define MPRIS_TRACKLIST_INTERFACE "org.mpris.MediaPlayer2.TrackList"
@@ -402,7 +403,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
 
                     /* We need to resolve relative paths in this instance */
                     char *psz_mrl = make_URI( ppsz_argv[i_input], NULL );
-                    const char *psz_after_track = "/";
+                    const char *psz_after_track = MPRIS_APPEND;
 
                     if( psz_mrl == NULL )
                         continue;
@@ -485,11 +486,13 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
         /* we unreference the connection when we've finished with it */
         if( p_conn ) dbus_connection_unref( p_conn );
     }
+
+#undef MPRIS_APPEND
 #undef MPRIS_BUS_NAME
 #undef MPRIS_OBJECT_PATH
 #undef MPRIS_TRACKLIST_INTERFACE
 
-#endif
+#endif // HAVE_DBUS
 
     /*
      * Message queue options