MPDScrobbler: Fixed uncaught player exception
authorkaliko <kaliko.jack@azylum.org>
Mon, 15 Apr 2013 20:24:27 +0000 (22:24 +0200)
committerkaliko <kaliko.jack@azylum.org>
Mon, 15 Apr 2013 20:24:27 +0000 (22:24 +0200)
misc/MPDScrobbler/mpdscrobbler.py

index 94b472d..ae53407 100755 (executable)
@@ -171,7 +171,11 @@ class MpdScrobbler(Daemon, Player):
             if self.status().get('state') != 'play':
                 logging.info('not playing')
                 continue
-            self.log_track()
+            try:
+                self.log_track()
+            except PlayerError as err:
+                logging.error('player: {0}'.format(err))
+                self.reconnect()
             sys.stdout.flush()
 
     def shutdown(self):