From 73a43b56a09c93d24bea8879deb79f129e366a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johann=20Kl=C3=A4hn?= Date: Fri, 7 Feb 2014 21:44:57 +0100 Subject: [PATCH] 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. --- beetsplug/mpdstats.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/beetsplug/mpdstats.py b/beetsplug/mpdstats.py index e2f990f44..04355fb31 100644 --- a/beetsplug/mpdstats.py +++ b/beetsplug/mpdstats.py @@ -281,6 +281,9 @@ class MPDStats(object): 'beets_item': self.get_item(path), } + self.update_item(self.now_playing['beets_item'], + 'last_played', value=int(time.time())) + def run(self): self.mpd.connect() events = ['player']