[gnome-music/wip/mschraal/gapless-v3: 12/14] more fixess
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gapless-v3: 12/14] more fixess
- Date: Sun, 21 Oct 2018 22:32:05 +0000 (UTC)
commit be121899accb4934faa077cf92b22e4ad21a227c
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 7984826f..6d136dc1 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.props.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]