[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-18 16:27:48
Message-ID: 20050418162748.5EF583C8 () office ! kde ! org
[Download RAW message or body]

CVS commit by bellenger: 

Server messages are printed in the amaroK playlist statusbar


  M +3 -0      Globals.py   1.3
  M +1 -0      Shouter.py   1.6
  M +0 -2      ShouterRequest.py   1.7
  M +2 -0      StreamController.py   1.5


--- kdeextragear-1/amarok/src/scripts/shouter/Globals.py  #1.2:1.3
@@ -5,4 +5,7 @@
 from debug import *
 
+def status(msg):
+    PlaylistDcop( 'shortStatusMessage "%s"' % msg ).result()
+
 def queryCollection(sql):
     #sql = sql.replace("'", "\\'").replace('"', '\\"')

--- kdeextragear-1/amarok/src/scripts/shouter/Shouter.py  #1.5:1.6
@@ -121,4 +121,5 @@
                 self.m = QMessageBox("Amarok Shouter","Starting server on \
http://%s:%d%s" % (socket.gethostname(), self.cfg.port, self.cfg.mount), \
QMessageBox.Information,QMessageBox.Ok,QMessageBox.NoButton,QMessageBox.NoButton, \
None, "", False, QWidget.WDestructiveClose)  if not self.cfg.supress_dialog: \
self.m.show() +                Globals.status('Starting server on http://%s:%d%s' % \
(socket.gethostname(), self.cfg.port, self.cfg.mount ))  self.stream_ctrl = \
stream_ctrl  

--- kdeextragear-1/amarok/src/scripts/shouter/ShouterRequest.py  #1.6:1.7
@@ -231,7 +231,5 @@
                 # Roll the dice and see if we won anything
                 if self.blind:
-                    debug( 'stream is blind. rolling dice' )
                     if random.randint(0,100) <= self.cfg.inject_pct:
-                        debug( 'about to injectinate' )
                         self.meta_is_dirty = True
                         self._do_injection(self.cfg.inject_dir, \
self.cfg.inject_filt)

--- kdeextragear-1/amarok/src/scripts/shouter/StreamController.py  #1.4:1.5
@@ -49,4 +49,5 @@
         sr = self.sockets.pop(request)
         self.log( 'Dropping socket to %s. Active sockets: %d' % (client_address[0], \
len(self.sockets) )) +        Globals.status('Dropping connection to %s' % \
client_address[0])  raise
         
@@ -56,4 +57,5 @@
 
         if len(self.sockets) < self.cfg.max_clients : 
+            Globals.status('Starting stream for %s' % client_address[0])
             self.sockets[request] = sr
             sr.run()


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

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