[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeextragear-1/amarok/src/scripts/shouter
From:       James Bellenger <jbellenger () pristine ! gm>
Date:       2005-04-27 14:44:28
Message-ID: 20050427144428.262BE630 () office ! kde ! org
[Download RAW message or body]

CVS commit by bellenger: 

Silent mp3s wouldn't be found if shouter was installed in the system kde dir
rather than the user .kde dir. This would result in instant crashes on some
song changes, as well as preventing clients from connecting if amarok was not
playing.


  M +1 -10     Amarok.py   1.2
  M +3 -2      Playlist.py   1.3
  M +0 -1      Services.py   1.2


--- kdeextragear-1/amarok/src/scripts/shouter/Amarok.py  #1.1.1.1:1.2
@@ -29,5 +29,4 @@
         debug('_Amarok init')
         self.on_engine_state_change()
-        self.on_track_change()
 
     def on_engine_state_change(self, string = ''):
@@ -39,16 +38,8 @@
         else:
             self.state = 0
-        debug('Amarok track_state = %d' % self.state)
+        debug('Amarok state = %d' % self.state)
 
     def on_track_change(self):
         self.state += 1
-        #if self.is_playing:
-            #self.encoded_url = PlayerDcop('encodedURL').result()
-            #self.now_playing = PlayerDcop('nowPlaying').result()
-            #self.fname = urllib.url2pathname(sub('file:/*', '/', self.encoded_url))
-        #else:
-            #self.encoded_url = ''
-            #self.now_playing = ''
-            #self.fname = ''
 
     def query(self, sql):

--- kdeextragear-1/amarok/src/scripts/shouter/Playlist.py  #1.2:1.3
@@ -22,9 +22,10 @@
 import urllib
 import time
+import sys
 
 
 _STATIC_PLS = dict()
 _DIRECTORY_PLS = dict()
-SILENCE_F = '../scripts/shouter2/silence/silence-%d.mp3'
+SILENCE_F = os.path.join(os.path.dirname(sys.argv[0]), 'silence/silence-%d.mp3')
 SILENT_META = '--- Server is paused ---'
 
@@ -299,5 +300,5 @@
         # Converting a perfectly good filename to a url only so that it can be
         # converted back again may be verging on poor taste
-        self.url = 'file://' + os.path.join(os.getcwd() + '/' + SILENCE_F % br)
+        self.url = 'file://' + SILENCE_F % br
 
     def get_meta(self):

--- kdeextragear-1/amarok/src/scripts/shouter/Services.py  #1.1.1.1:1.2
@@ -168,5 +168,4 @@
                 condition = '%d == Amarok.state' % as
                 self.stream_silence(br)
-                #self.stream(SILENCE_F % br, 0, br, condition)
 
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic