[gnome-music/wip/merge: 275/343] player: Skip unplayable tracks



commit c79635eb2a68612b5f8e693689d76c1a0fe4d902
Author: Arnel A. Borja <arnelborja src gnome org>
Date:   Fri Jul 19 00:05:07 2013 +0800

    player: Skip unplayable tracks

 gnomemusic/player.py |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index f780341..02834c4 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -113,10 +113,15 @@ class Player(GObject.GObject):
             uri = media.get_url()
         else:
             uri = "none"
-            print("URI:" + uri)
-            print("Error:" + message.parse_error())
-            self.stop()
-            return True
+            print("URI: " + uri)
+        error, debug = message.parse_error()
+        debug = debug.split('\n')
+        debug = [('     ') + line.lstrip() for line in debug]
+        debug = '\n'.join(debug)
+        print("Error from element " + message.src.get_name() + ": " + error.message)
+        print("Debugging info:\n" + debug)
+        self.play_next()
+        return True
 
     def _on_bus_eos(self, bus, message):
         self.nextTrack = self._get_next_track()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]