From: kaliko Date: Sat, 26 Sep 2020 16:23:13 +0000 (+0200) Subject: Fixed bug in history plugin X-Git-Tag: 0.16.0~23 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=faf3ee6255dc9f21d4286f462179dedef7ee85da;p=mpd-sima.git Fixed bug in history plugin --- diff --git a/sima/plugins/core/history.py b/sima/plugins/core/history.py index b85c0dd..4876eba 100644 --- a/sima/plugins/core/history.py +++ b/sima/plugins/core/history.py @@ -45,7 +45,7 @@ class History(Plugin): def callback_player(self): current = self.player.current last_hist = next(self.sdb.get_history(), None) - if last_hist[3] == current.file: + if last_hist and last_hist[3] == current.file: return if not current: self.log.debug('Cannot add "%s" to history (empty or missing file)', current)