diff --git a/beetsplug/mpdstats.py b/beetsplug/mpdstats.py index 423cde2b8..876dcacdd 100644 --- a/beetsplug/mpdstats.py +++ b/beetsplug/mpdstats.py @@ -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 = {