Commits

Anonymous committed 532b1bd

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

Comments (0)

Files changed (4)

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)

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
 

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()

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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.