Changeset 1892
- Timestamp:
- 17/11/08 22:37:42 (8 weeks ago)
- svm:headrev:
cc3e1ea1-1e01-0410-8d68-8b121e83a9d5:11174- Files:
-
- 1 modified
-
freevo/src/audio/plugins/lastfm2.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
freevo/src/audio/plugins/lastfm2.py
r1883 r1892 30 30 31 31 32 import sys, os, time 32 import sys, os, time, traceback 33 33 import md5, urllib, urllib2, httplib, re 34 34 from threading import Thread … … 57 57 58 58 # Debugging modules 59 import pprint, traceback 59 if config.DEBUG_DEBUGGER: 60 import pdb, pprint 60 61 61 62 … … 181 182 @benchmark(benchmarking, benchmarkcall) 182 183 def shutdown(self): 183 pprint.pprint(self.__dict__)184 184 if self.webservices is not None: 185 185 self.webservices.shutdown() … … 230 230 if event == 'STOP': 231 231 self.stop(self.arg, self.menuw) 232 return 232 return True 233 233 if event == 'PLAY_START': 234 234 pass … … 236 236 if self.feed is not None and len(self.feed.entries) > 0: 237 237 self.feed.entries.pop(0) 238 self.stop()239 238 self.play() 240 239 return False … … 314 313 raise LastFMError('Failed to download track', entry.location_url) 315 314 time.sleep(0.1) 316 self.player = PlayerGUI(self, menuw) 315 if not self.player: 316 self.player = PlayerGUI(self, menuw) 317 317 error = self.player.play() 318 318 if error: … … 322 322 pop.destroy() 323 323 except LastFMError, why: 324 traceback.print_exc() 324 325 _debug_('play error: %s' % (why,), DWARNING) 325 326 if menuw: … … 480 481 return reply 481 482 except urllib2.HTTPError, why: 482 _debug_('%s: %s' % (url, why) )483 _debug_('%s: %s' % (url, why), DWARNING) 483 484 raise LastFMError(why, url) 484 485 except Exception, why: 485 _debug_('%s : %s' % (url, why))486 raise LastFMError(why , url)486 _debug_('%s' % (why,), DWARNING) 487 raise LastFMError(why) 487 488 488 489
