[vlc-commits] single instance: append tracks as specified in MPRIS 2.2

Mirsal Ennaime git at videolan.org
Sun Aug 26 19:06:39 CEST 2012


vlc/vlc-2.0 | branch: master | Mirsal Ennaime <mirsal at videolan.org> | Sat May 12 20:54:33 2012 +0200| [a97f94fa39c2255e651c3dd921d19f964568eeb4] | committer: Jean-Baptiste Kempf

single instance: append tracks as specified in MPRIS 2.2

Use /org/mpris/MediaPlayer2/TrackList/Append instead of / as the
AfterTrack argument to org.mpris.MediaPlayer2.AddTrack for appending
(cherry picked from commit 0376739feee15fa4636e30e7c85f1be97f2d74f9)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=a97f94fa39c2255e651c3dd921d19f964568eeb4
---

 src/libvlc.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index f77928b..362cb5d 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -344,6 +344,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"
@@ -406,7 +407,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;
@@ -489,11 +490,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



More information about the vlc-commits mailing list