From c3b27252929e22659babc142e66b0e6244f2a475 Mon Sep 17 00:00:00 2001 From: kaliko Date: Wed, 21 Jan 2015 20:58:39 +0100 Subject: [PATCH] Attempt to fix AttributeError issue --- sima/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sima/client.py b/sima/client.py index 667242c..06ba896 100644 --- a/sima/client.py +++ b/sima/client.py @@ -144,11 +144,12 @@ class PlayerClient(Player): return ans def __skipped_track(self, old_curr): + curr = self.current if (self.state == 'stop' or not hasattr(old_curr, 'id') - or not hasattr(self.current, 'id')): + or not hasattr(curr, 'id')): return False - return self.current.id != old_curr.id # pylint: disable=no-member + return curr.id != old_curr.id # pylint: disable=no-member def _flush_cache(self): """ -- 2.39.5