aboutsummaryrefslogtreecommitdiff
path: root/src/player-item.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-07-09 16:37:51 +0100
committerConor Curran <conor.curran@canonical.com>2010-07-09 16:37:51 +0100
commita7cd627d578066b3383629dee572aa6385a33281 (patch)
tree5c92ad2738bd9faed1f120ea0ee59e4bbd9a22e3 /src/player-item.vala
parentb0a09afe59a904ce4b4e90e58d933ad1f0b036d9 (diff)
downloadayatana-indicator-sound-a7cd627d578066b3383629dee572aa6385a33281.tar.gz
ayatana-indicator-sound-a7cd627d578066b3383629dee572aa6385a33281.tar.bz2
ayatana-indicator-sound-a7cd627d578066b3383629dee572aa6385a33281.zip
album art bug fixed
Diffstat (limited to 'src/player-item.vala')
-rw-r--r--src/player-item.vala18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/player-item.vala b/src/player-item.vala
index 171c140..4f95b0c 100644
--- a/src/player-item.vala
+++ b/src/player-item.vala
@@ -55,8 +55,12 @@ public class PlayerItem : Dbusmenu.Menuitem
Value? v = data.lookup(search_key);
if (v.holds (typeof (string))){
- debug("with value : %s", v.get_string());
- this.property_set(property, this.sanitize_string(v.get_string()));
+ string update = v.get_string().strip();
+ debug("with value : %s", update);
+ if(property.contains("arturl")){
+ update = Filename.from_uri(update.strip());
+ }
+ this.property_set(property, update);
}
else if (v.holds (typeof (int))){
debug("with value : %i", v.get_int());
@@ -80,15 +84,5 @@ public class PlayerItem : Dbusmenu.Menuitem
return true;
}
- public static string sanitize_string(string st)
- {
- string result = st.strip();
- if(result.has_prefix("file:///")){
- result = result.slice(7, result.len());
- }
- debug("Sanitize string - result = %s", result);
- return result;
- }
-
}