rhythmbox r6087 - in trunk: . plugins/coherence/upnp_coherence



Author: hadess
Date: Wed Dec  3 16:14:20 2008
New Revision: 6087
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6087&view=rev

Log:
2008-12-03  Bastien Nocera  <hadess hadess net>

	* plugins/coherence/upnp_coherence/MediaPlayer.py: Cut the crap,
	remove loads of warnings from the MediaRenderer bits of the
	Coherence UPNP plugin, they should be debug messages, not
	appearing all the time as they do now...



Modified:
   trunk/ChangeLog
   trunk/plugins/coherence/upnp_coherence/MediaPlayer.py

Modified: trunk/plugins/coherence/upnp_coherence/MediaPlayer.py
==============================================================================
--- trunk/plugins/coherence/upnp_coherence/MediaPlayer.py	(original)
+++ trunk/plugins/coherence/upnp_coherence/MediaPlayer.py	Wed Dec  3 16:14:20 2008
@@ -55,13 +55,11 @@
 
     def volume_changed(self, player, parameter):
         self.volume = self.player.props.volume
-        self.warning('volume_changed to %r', self.volume)
         if self.volume > 0:
             rcs_id = self.server.connection_manager_server.lookup_rcs_id(self.current_connection_id)
             self.server.rendering_control_server.set_variable(rcs_id, 'Volume', self.volume*100)
 
     def playing_song_changed(self, player, entry):
-        self.warning("playing_song_changed %r", entry)
         if self.server != None:
             connection_id = self.server.connection_manager_server.lookup_avt_id(self.current_connection_id)
         if entry == None:
@@ -118,13 +116,11 @@
             if self.server != None:
                 self.server.av_transport_server.set_variable(connection_id, 'AVTransportURIMetaData',self.metadata)
                 self.server.av_transport_server.set_variable(connection_id, 'CurrentTrackMetaData',self.metadata)
-            self.warning("playing_song_changed %r", self.metadata)
         if self.server != None:
             self.server.av_transport_server.set_variable(connection_id, 'RelativeTimePosition', '00:00:00')
             self.server.av_transport_server.set_variable(connection_id, 'AbsoluteTimePosition', '00:00:00')
 
     def playing_changed(self, player, state):
-        self.warning("playing_changed", state)
         if state is True:
             transport_state = 'PLAYING'
         else:
@@ -142,10 +138,8 @@
         except:
             duration = None
         self.update_position(position,duration)
-        self.warning("playing_changed %r %r ", position, duration)
 
     def elapsed_changed(self, player, time):
-        self.warning("elapsed_changed %r %r", player, time)
         try:
             duration = player.get_playing_song_duration()
         except:
@@ -154,8 +148,6 @@
 
     def update(self, state):
 
-        self.warning("update %r", state)
-
         if state in ('STOPPED','READY'):
             transport_state = 'STOPPED'
         if state == 'PLAYING':
@@ -173,8 +165,6 @@
 
 
     def update_position(self, position,duration):
-        self.warning("update_position %r %r", position,duration)
-
         if self.server != None:
             connection_id = self.server.connection_manager_server.lookup_avt_id(self.current_connection_id)
             self.server.av_transport_server.set_variable(connection_id, 'CurrentTrack', 0)
@@ -199,7 +189,6 @@
 
             if self.duration is None:
                 if self.metadata is not None:
-                    self.warning("update_position %r", self.metadata)
                     elt = DIDLLite.DIDLElement.fromString(self.metadata)
                     for item in elt:
                         for res in item.findall('res'):
@@ -213,7 +202,6 @@
                 self.duration = duration
 
     def load( self, uri, metadata):
-        self.warning("player load %r %r", uri, metadata)
         #self.shell.load_uri(uri,play=False)
         self.duration = None
         self.metadata = metadata
@@ -233,16 +221,13 @@
                     self.entry = self.shell.props.db.entry_lookup_by_id(int(uri[6:]))
                 else:
                     self.entry = self.shell.props.db.entry_lookup_by_location(uri)
-                self.warning("check for entry %r %r %r", self.entry,item.server_uuid,uri)
                 if self.entry == None:
                     if item.server_uuid is not None:
                         entry_type = self.shell.props.db.entry_register_type("CoherenceUpnp:" + item.server_uuid)
                         self.entry = self.shell.props.db.entry_new(entry_type, uri)
-                        self.warning("create new entry %r", self.entry)
                     else:
                         entry_type = self.shell.props.db.entry_register_type("CoherencePlayer")
                         self.entry = self.shell.props.db.entry_new(entry_type, uri)
-                        self.warning("load and check for entry %r", self.entry)
 
                 duration = None
                 size = None
@@ -312,8 +297,6 @@
         self.play()
 
     def stop(self):
-        self.warning("player stop")
-
         self.player.stop()
         self.playing = False
         #self.server.av_transport_server.set_variable( \
@@ -321,8 +304,6 @@
         #                     'TransportState', 'STOPPED')
 
     def play(self):
-        self.warning("player play")
-
         if self.playing == False:
             self.player.play_entry(self.entry)
             self.playing = True
@@ -344,7 +325,6 @@
                             +nL = relative seek forward n seconds
                             -nL = relative seek backwards n seconds
         """
-        self.warning("player seek %r", location)
         self.player.seek(location)
         self.server.av_transport_server.set_variable(0, 'TransportState', old_state)
 
@@ -367,11 +347,9 @@
 
     def get_volume(self):
         self.volume = self.player.get_volume()
-        self.warning("get_volume %r", self.volume)
         return self.volume * 100
 
     def set_volume(self, volume):
-        self.warning("set_volume %r", volume)
         volume = int(volume)
         if volume < 0:
             volume=0



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