[gnome-music] Properly get the url of the current track on error



commit 9433ab5fa21aea2061a3d84f88b4f9371fc0c96f
Author: Arnel A. Borja <kyoushuu yahoo com>
Date:   Fri May 31 20:22:27 2013 +0800

    Properly get the url of the current track on error
    
    Playlists are now models, so we should use playlist.get_value to get the
    media object instead of accessing them like arrays.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701367

 src/player.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/player.js b/src/player.js
index e0868fe..4d05726 100644
--- a/src/player.js
+++ b/src/player.js
@@ -70,8 +70,9 @@ const Player = new Lang.Class({
         }));
         this.bus.connect("message::error", Lang.bind(this, function(bus, message) {
             let uri;
-            if (this.playlist[this.currentTrack])
-                uri = this.playlist[this.currentTrack].get_url();
+            let media =  this.playlist.get_value( this.currentTrack, this.playlistField);
+            if (media != null)
+                uri = media.get_url();
             else
                 uri = "none"
             log("URI:" + uri);


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