summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2013-11-11 21:53:16 +0100
committerdavemds <dave@gurumeditation.it>2013-11-11 21:53:16 +0100
commit5920551f153f43b9317b7ee23009d3f05ace0c7d (patch)
treebbdb5050b95577b476352463d30ddd30722b0702
parent2ef11b928e70f812664c0c62e0b84465ed7e6a13 (diff)
music-control: use efreet to decode uri
This fix the cover image display when spaces (and probably other special chars) are in the file name.
-rw-r--r--src/modules/music-control/e_mod_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/music-control/e_mod_main.c b/src/modules/music-control/e_mod_main.c
index f96c211ff..c13fc5291 100644
--- a/src/modules/music-control/e_mod_main.c
+++ b/src/modules/music-control/e_mod_main.c
@@ -226,6 +226,7 @@ parse_metadata(E_Music_Control_Module_Context *ctxt, Eina_Value *array)
226 { 226 {
227 const char *key, *str_val; 227 const char *key, *str_val;
228 Eina_Value st, subst; 228 Eina_Value st, subst;
229 Efreet_Uri *uri;
229 230
230 eina_value_array_value_get(array, i, &st); 231 eina_value_array_value_get(array, i, &st);
231 eina_value_struct_get(&st, "arg0", &key); 232 eina_value_struct_get(&st, "arg0", &key);
@@ -257,8 +258,10 @@ parse_metadata(E_Music_Control_Module_Context *ctxt, Eina_Value *array)
257 { 258 {
258 eina_value_struct_value_get(&st, "arg1", &subst); 259 eina_value_struct_value_get(&st, "arg1", &subst);
259 eina_value_struct_get(&subst, "arg0", &str_val); 260 eina_value_struct_get(&subst, "arg0", &str_val);
260 if (!strncmp(str_val, "file://", 7)) 261 uri = efreet_uri_decode(str_val);
261 ctxt->meta_cover = eina_stringshare_add(str_val + 7); 262 if (uri && !strncmp(uri->protocol, "file", 4))
263 ctxt->meta_cover = eina_stringshare_add(uri->path);
264 E_FREE_FUNC(uri, efreet_uri_free);
262 eina_value_flush(&subst); 265 eina_value_flush(&subst);
263 } 266 }
264 eina_value_flush(&st); 267 eina_value_flush(&st);