[totem] Port dbusservice to python3



commit 53bf51e20899857dede61f538cac71a19e1e4163
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Apr 29 17:13:01 2013 +0200

    Port dbusservice to python3

 src/plugins/dbusservice/dbusservice.plugin.in |    2 +-
 src/plugins/dbusservice/dbusservice.py        |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/dbusservice/dbusservice.plugin.in b/src/plugins/dbusservice/dbusservice.plugin.in
index 6a9b9f2..cc7bb7d 100644
--- a/src/plugins/dbusservice/dbusservice.plugin.in
+++ b/src/plugins/dbusservice/dbusservice.plugin.in
@@ -1,5 +1,5 @@
 [Plugin]
-Loader=python
+Loader=python3
 Module=dbusservice
 IAge=1
 _Name=D-Bus Service
diff --git a/src/plugins/dbusservice/dbusservice.py b/src/plugins/dbusservice/dbusservice.py
index 8361501..e7a5339 100644
--- a/src/plugins/dbusservice/dbusservice.py
+++ b/src/plugins/dbusservice/dbusservice.py
@@ -94,7 +94,7 @@ class Root (dbus.service.Object): # pylint: disable-msg=R0923,R0904
             'mpris:trackid': dbus.String (self.totem.props.current_mrl,
                 variant_level = 1),
             'mpris:length': dbus.Int64 (
-                self.totem.props.stream_length * 1000L,
+                self.totem.props.stream_length * 1000,
                 variant_level = 1),
         }
 
@@ -152,7 +152,7 @@ class Root (dbus.service.Object): # pylint: disable-msg=R0923,R0904
     def __do_notify_current_time (self, totem, prop):
         # Only notify of seeks if we've skipped more than 3 seconds
         if abs (totem.props.current_time - self.current_position) > 3:
-            self.Seeked (totem.props.current_time * 1000L)
+            self.Seeked (totem.props.current_time * 1000)
 
         self.current_position = totem.props.current_time
 
@@ -198,7 +198,7 @@ class Root (dbus.service.Object): # pylint: disable-msg=R0923,R0904
                 'Shuffle': shuffle, # TODO: Notifications
                 'Metadata': self.__calculate_metadata (),
                 'Volume': self.totem.get_volume (), # TODO: Notifications
-                'Position': self.totem.props.current_time * 1000L,
+                'Position': self.totem.props.current_time * 1000,
                 'CanGoNext': True, # TODO
                 'CanGoPrevious': True, # TODO
                 'CanPlay': (self.totem.props.current_mrl != None),
@@ -315,13 +315,13 @@ class Root (dbus.service.Object): # pylint: disable-msg=R0923,R0904
                           in_signature = 'x', # pylint: disable-msg=C0103
                           out_signature = '')
     def Seek (self, offset):
-        self.totem.action_seek_relative (offset / 1000L, False)
+        self.totem.action_seek_relative (offset / 1000, False)
 
     @dbus.service.method (dbus_interface = 'org.mpris.MediaPlayer2.Player',
                           in_signature = 'ox', # pylint: disable-msg=C0103
                           out_signature = '')
     def SetPosition (self, track_id, position):
-        position = position / 1000L
+        position = position / 1000
 
         # Bail if the position is not in the permitted range
         if position < 0 or position > self.totem.props.stream_length:


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