[gnome-music/wip/mschraal/player-factor-out-gstreamer] player: Fix None duration
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/player-factor-out-gstreamer] player: Fix None duration
- Date: Sun, 18 Feb 2018 15:53:53 +0000 (UTC)
commit 57fa7a298d1c864fc3c56c52d0f621d599182487
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Feb 18 09:19:15 2018 +0100
player: Fix None duration
gnomemusic/player.py | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 8e67ef7..5bedabe 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -642,6 +642,9 @@ class Player(GObject.GObject):
utils.seconds_to_string(seconds))
duration = self._player.duration
+ if duration is None:
+ return
+
position = self._player.position
if position > 0:
self.played_seconds += self._seconds_period / 1000
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]