mpdstats: update last_played

This fixes #529 and brings back the old behaviour of setting last_played
on every song change regardless of whether it is played to the end or skipped.
This commit is contained in:
Johann Klähn 2014-02-07 21:44:57 +01:00
parent ba226f566d
commit 73a43b56a0

View file

@ -281,6 +281,9 @@ class MPDStats(object):
'beets_item': self.get_item(path), 'beets_item': self.get_item(path),
} }
self.update_item(self.now_playing['beets_item'],
'last_played', value=int(time.time()))
def run(self): def run(self):
self.mpd.connect() self.mpd.connect()
events = ['player'] events = ['player']