Register song changes when switching from song to stream URL

This commit is contained in:
gdtwst 2017-10-04 16:35:22 +07:00
parent e08f28d865
commit eb338d208b

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,11 @@ class MPDStats(object):
if diff <= self.time_threshold:
return
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 = {