Commits

shendriks  committed 532b1bd

fixed bug in function shorten(); disabled logging everywhere for now; disbabled debug print statements in db backend

  • Participants
  • Parent commits 763cb90
  • Tags 0.1.0a

Comments (0)

Files changed (4)

File pythaules/audio/backend_gstream.py

 
         print "* setting up RPC server"
 
-        self.__server = Server(addr = (conf.BACKEND_AUDIO_RPC['host'], conf.BACKEND_AUDIO_RPC['port']), allow_none = True)
+        self.__server = Server(addr = (conf.BACKEND_AUDIO_RPC['host'], conf.BACKEND_AUDIO_RPC['port']), allow_none = True, logRequests=False)
         self.__server.register_instance(self)
     
         self.rpc_thread = Thread(target = self.__server.serve_forever)

File pythaules/common/file.py

 
 def shorten(s, max_len):
     if len(s) > max_len:
-        return s[0:max_len/2-3] + ' ... ' + s[-max_len-2:]
+        return s[0:max_len/2-3] + ' ... ' + s[-max_len/2-2:]
     else:
         return s
 

File pythaules/database/backend.py

         ##ct = collection.Collection(db, ["artist", "album"], "Sven's collection")
         
         print "Starting XML-RPC server..."
-        self.__server = Server(addr = (conf.BACKEND_DB_RPC['host'], conf.BACKEND_DB_RPC['port']), allow_none = True)
+        self.__server = Server(addr = (conf.BACKEND_DB_RPC['host'], conf.BACKEND_DB_RPC['port']), allow_none = True, logRequests=False)
         self.__server.register_instance(self.__db)
         print "At your service..."
         self.__server.serve_forever()

File pythaules/database/database.py

         self.__cursor.execute('''DROP TABLE IF EXISTS filtered_song_ids''')
         # step 1: fill filtered id tables
         q = '''CREATE TABLE filtered_artist_ids AS SELECT id FROM artist WHERE name LIKE '%s' ''' % sql_filter_str
-        print >> sys.stderr,"q:",q
+        #print >> sys.stderr,"q:",q
         sys.stderr.flush()
         self.__cursor.execute(q)
         self.__cursor.execute('''CREATE TABLE filtered_album_ids AS SELECT id FROM album WHERE name LIKE '%s' ''' % sql_filter_str)
         self.__cursor.execute('''SELECT id FROM filtered_song_ids''')
         filtered_song_ids = ",".join(["%d" % id_tuple[0] for id_tuple in self.__cursor.fetchall()])
 
-        print >> sys.stderr, "filtered_artist_ids:", filtered_artist_ids
-        print >> sys.stderr, "filtered_album_ids:", filtered_album_ids
-        print >> sys.stderr, "filtered_song_ids:", filtered_song_ids
+        #print >> sys.stderr, "filtered_artist_ids:", filtered_artist_ids
+        #print >> sys.stderr, "filtered_album_ids:", filtered_album_ids
+        #print >> sys.stderr, "filtered_song_ids:", filtered_song_ids
         sys.stderr.flush()
 
         self.__cursor.execute('''REPLACE INTO filtered_artist_ids (id) SELECT artist_id FROM artist_to_album WHERE album_id in (%s)''' % filtered_album_ids)