Skip to content

Commit

Permalink
Fix to current song time changing when paused
Browse files Browse the repository at this point in the history
When a song is paused, the time into a song should not change. This is now the behaviour
  • Loading branch information
conorhennessy committed May 8, 2020
1 parent 310c45d commit 59b9ac4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Spotify_Oled_Control.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def run(self):
while True:
diff = time.time() - self.lastTime
self.lastTime = time.time()
self.currentPos += diff
if self.isPlaying:
self.currentPos += diff
percent = self.currentPos / self.songLen
self.xpos = self.padding + int(percent * (Width - self.padding * 2))
if percent >= 1:
Expand Down

0 comments on commit 59b9ac4

Please sign in to comment.