mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-01 01:00:03 +01:00
28 lines
1 KiB
Diff
28 lines
1 KiB
Diff
--- 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)
|