Re-add fixes from #2707

This commit is contained in:
gdtwst 2019-04-07 08:38:40 +07:00
parent ebed21f319
commit c41197cc5c

View file

@ -256,10 +256,6 @@ class MPDStats(object):
if not path:
return
if is_url(path):
self._log.info(u'playing stream {0}', displayable_path(path))
return
played, duration = map(int, status['time'].split(':', 1))
remaining = duration - played
@ -276,6 +272,14 @@ class MPDStats(object):
if diff <= self.time_threshold:
return
if self.now_playing['path'] == path and played == 0:
self.handle_song_change(self.now_playing)
if is_url(path):
self._log.info(u'playing stream {0}', displayable_path(path))
self.now_playing = None
return
self._log.info(u'playing {0}', displayable_path(path))
self.now_playing = {