[gnome-music/wip/mschraal/gapless-v3: 16/18] more fixess
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gapless-v3: 16/18] more fixess
- Date: Wed, 17 Oct 2018 22:54:46 +0000 (UTC)
commit 7fa7afe3a21352efc4379a15578cf60457a5cfd9
Author: Marinus Schraal <mschraal gnome org>
Date: Tue Oct 16 16:20:37 2018 +0200
more fixess
gnomemusic/widgets/smoothscale.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index 9a13733a..edcbd835 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -48,6 +48,7 @@ class SmoothScale(Gtk.Scale):
super().__init__()
self._player = None
+ self._previous_duration = -1
self._old_smooth_scale_value = 0.0
self._seek_timeout = None
@@ -112,7 +113,10 @@ class SmoothScale(Gtk.Scale):
duration = self._player.duration
print("duration changed", duration)
- if duration != -1.:
+ if (duration != -1
+ and duration != self._previous_duration):
+ print("RESET SCALE")
+ self._previous_duration = duration
self.set_range(0.0, duration * 60)
self.set_increments(300, 600)
self.set_value(0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]