]> git.sesse.net Git - vlc/commitdiff
D-Bus ameliorations and fix by Mr_Mirsal.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 4 Feb 2007 21:14:43 +0000 (21:14 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 4 Feb 2007 21:14:43 +0000 (21:14 +0000)
THANKS
modules/control/dbus.c

diff --git a/THANKS b/THANKS
index e8dd1e2d981b98a47ea1dba1121fda5697ff73d2..a7edc32ca5f05aa50eab0f5adcbbad46739c665b 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -125,7 +125,7 @@ Mike Schrag <mschrag at pobox dot com> - directx device selection
 Mikko Hirvonen <masse at astro dot helsinki dot fi> - Firefox-1.5.x development configure patch
 Michel Lanners <mlan at cpu.lu> - fixed typos and AltiVec detection
 Miroslav Oujeský <oujesky at mail dot muni dot cz> - Czech translation
-Mirsal Ennaime <mirsal at  gmail dot com> - D-Bus amelioration
+Mirsal Ennaime <mirsal.ennaime at gmail dot com> - D-Bus ameliorations
 Moritz Bunkus <moritz at bunkus dot org> - Matroska patches
 Morten Brix Pedersen <morten at wtf.dk> - Danish translation
 Nilmoni Deb <ndeb at ece.cmu.edu> - autoconf and Makefile fixes
index ab3bdbd3f5292c05917e9d992945955f8bf12676..b0e59cb6ed266082f8bf22b7a5d2c95ad0da3bcf 100644 (file)
@@ -379,11 +379,12 @@ DBUS_METHOD( GetCurrentTrack )
     playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
     playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
     
-    while ( p_tested_item->i_id != p_playlist->status.p_item->i_id )
+    while ( p_tested_item->p_input->i_id != 
+                    p_playlist->status.p_item->p_input->i_id )
     {
         i_position++;
         p_tested_item = playlist_GetNextLeaf( p_playlist, 
-                        p_playlist->p_root_onelevel, 
+                        p_playlist->p_root_onelevel,
                         p_tested_item,
                         VLC_FALSE,
                         VLC_FALSE );
@@ -429,13 +430,14 @@ DBUS_METHOD( GetLength )
     dbus_int32_t i_elements = 0;
     playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
     playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
-    playlist_item_t* p_last_item = playlist_GetLastLeaf( p_playlist, p_playlist->p_root_onelevel ); 
+    playlist_item_t* p_last_item = playlist_GetLastLeaf( p_playlist, 
+                    p_playlist->p_root_onelevel ); 
 
-    while ( p_tested_item->i_id != p_last_item->i_id )
+    while ( p_tested_item->p_input->i_id != p_last_item->p_input->i_id )
     {
         i_elements++;
         p_tested_item = playlist_GetNextLeaf( p_playlist, 
-                        p_playlist->p_root_onelevel, 
+                        p_playlist->p_root_onelevel,
                         p_tested_item,
                         VLC_FALSE,
                         VLC_FALSE );
@@ -449,7 +451,6 @@ DBUS_METHOD( GetLength )
 
 DBUS_METHOD( DelTrack )
 {
-  /*FIXME: Doesn't work.*/
     REPLY_INIT;
 
     DBusError error;
@@ -481,11 +482,14 @@ DBUS_METHOD( DelTrack )
                         VLC_FALSE );
     }
 
-    playlist_NodeRemoveItem( p_playlist, 
-                   p_tested_item, 
-                   p_playlist->p_root_onelevel );
-    pl_Release( p_playlist );
+    PL_LOCK 
+    playlist_DeleteFromInput( p_playlist, 
+                   p_tested_item->p_input->i_id, 
+                   VLC_TRUE );
+    PL_UNLOCK
 
+    pl_Release( p_playlist );
+    
     REPLY_SEND;
 }