diff options
Diffstat (limited to 'multimedia/quodlibet-plugins/loggerfix.diff')
-rw-r--r-- | multimedia/quodlibet-plugins/loggerfix.diff | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/multimedia/quodlibet-plugins/loggerfix.diff b/multimedia/quodlibet-plugins/loggerfix.diff new file mode 100644 index 0000000000..a396b2c5f0 --- /dev/null +++ b/multimedia/quodlibet-plugins/loggerfix.diff @@ -0,0 +1,28 @@ +--- events/lastfmsubmit.py.orig 2007-11-25 14:45:54.000000000 +0100 ++++ events/lastfmsubmit.py 2007-11-25 17:22:59.000000000 +0100 +@@ -27,10 +27,13 @@ + __exclude = "" + __song = None + __timeout_id = -1 +- __log = lastfm.logger('quodlibet') ++ __cli = None + + def __init__(self): +- try: self.__exclude = config.get("plugins", "scrobbler_exclude") ++ try: ++ self.__exclude = config.get("plugins", "scrobbler_exclude") ++ __cli = lastfm.client.Client('quodlibet') ++ __cli.open_log() + except: pass + + def unprepare(self): +@@ -131,6 +134,6 @@ + for key in data.keys(): + if not data[key]: del(data[key]) + try: +- lastfm.submit([data]) +- self.__log.info("Sent %s", lastfm.repr(data)) +- except IOError, e: self.__log.error("Error: %s" % e) ++ self.__cli.submit([data]) ++ self.__cli.log.info("Sent %s", lastfm.repr(data)) ++ except IOError, e: self.__cli.log.error("Error: %s" % e) |