I think it's reasonable not to want lastfm.submit() to read the
configuration file on each invocation, so maybe the attached patch to
README.plugins can be applied instead. OTOH, I think
/usr/lib/lastfmsubmitd/lastfmsubmit should always read the configuration
on each invocation.

Cheers,

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
Loan-department manager:  "There isn't any fine print.  At these
interest rates, we don't need it."
--- README.plugins~
+++ README.plugins
@@ -24,12 +24,13 @@
       song = {'artist': 'New Order', 'title': 'Your Silent Face',
         'album': 'Power, Corruption & Lies',
         'mbid': '3a54b3b2-6037-4fc3-a7a0-ead924e55ea2'}
+      config = lastfm.config.Config('lastfmsubmitd')
 
-      log = lastfm.logger('example')
+      log = lastfm.logger('example', config.log_path)
       log.info('Played song: %s' % lastfm.repr(song))
 
       song['time'] = time.gmtime()
-      lastfm.submit([song])
+      lastfm.submit([song], config.spool_path)
 
     Documentation for each of these functions can be read using pydoc.
 

Reply via email to