Add exception handler if mime fails
@@ -90,6 +90,8 @@ class SimpleAudioService(AudioBackend):
else: # Assume string
track = self.tracks[self.index]
mime = find_mime(track)
+ LOG.debug('Mime info: {}'.format(mime))
+
# Indicate to audio service which track is being played
if self._track_start_callback:
self._track_start_callback(track)
@@ -109,6 +111,9 @@ class SimpleAudioService(AudioBackend):
except FileNotFoundError as e:
LOG.error('Couldn\'t play audio, {}'.format(repr(e)))
self.process = None
+ except Exception as e:
+ LOG.exception(repr(e))
+ self.process = None
# Wait for completion or stop request
while (self._is_process_running() and not self._stop_signal):
