[totem] dbusservice: Implement OpenURI in a better way



commit adb4c8d2a78a550a772d58ca5e4d5068412f9cf1
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Mar 20 16:44:39 2013 +0100

    dbusservice: Implement OpenURI in a better way
    
    We shouldn't be bypassing the playlist when adding new files
    to the playlist, so use add_to_playlist_and_play() directly

 src/plugins/dbusservice/dbusservice.py |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/dbusservice/dbusservice.py b/src/plugins/dbusservice/dbusservice.py
index faa68fc..8361501 100644
--- a/src/plugins/dbusservice/dbusservice.py
+++ b/src/plugins/dbusservice/dbusservice.py
@@ -333,12 +333,7 @@ class Root (dbus.service.Object): # pylint: disable-msg=R0923,R0904
                           in_signature = 's', # pylint: disable-msg=C0103
                           out_signature = '')
     def OpenUri (self, uri):
-        if self.totem.action_set_mrl (uri):
-            self.totem.action_play ()
-
-        raise dbus.exceptions.DBusException (
-            'org.mpris.MediaPlayer2.InvalidUri',
-            _(u'The URI ā€˜%sā€™ is not supported.') % uri)
+        self.totem.add_to_playlist_and_play (uri)
 
     @dbus.service.signal (dbus_interface = 'org.mpris.MediaPlayer2.Player',
                           signature = 'x') # pylint: disable-msg=C0103


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]