[gnome-music] Set uri on load only if the media changed



commit 9e35debf776414c503a5ee2310093e63ee92dede
Author: Arnel A. Borja <kyoushuu yahoo com>
Date:   Sun Jun 2 19:41:04 2013 +0800

    Set uri on load only if the media changed
    
    This will make sure that the current media will not be reloaded with the
    metadata.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701460

 src/player.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/player.js b/src/player.js
index 83c0287..f6ce1dd 100644
--- a/src/player.js
+++ b/src/player.js
@@ -173,7 +173,10 @@ const Player = new Lang.Class({
             this.artistLabel.set_label("Unknown artist");
         }
 
-        this.player.uri = media.get_url();
+        let url = media.get_url();
+        if (url != this.player.current_uri) {
+            this.player.uri = url;
+        }
 
         // Store next available url
         let nextTrack = this.currentTrack.copy();


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