raster pushed a commit to branch master.

http://git.enlightenment.org/apps/rage.git/commit/?id=f7a916dc8f758527fce70c18d619ede117a48c5c

commit f7a916dc8f758527fce70c18d619ede117a48c5c
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sat Dec 12 23:23:26 2015 +0900

    rage - make albumart fetch work again
---
 src/bin/win.c | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/src/bin/win.c b/src/bin/win.c
index ca55f85..b501426 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -180,9 +180,17 @@ _cb_fetched(void *data)
    file = video_file_get(inf->vid);
    if (file)
      {
-        char *path = albumart_file_get(file);
-        win_art(win, path);
-        free(path);
+        char *realfile = ecore_file_realpath(file);
+        if (realfile)
+          {
+             char *path = albumart_file_get(realfile);
+             if (path)
+               {
+                  win_art(win, path);
+                  free(path);
+               }
+             free(realfile);
+          }
      }
 }
 
@@ -299,6 +307,17 @@ win_do_next(Evas_Object *win)
 static void
 _restart_vid(Evas_Object *win, Evas_Object *lay, Evas_Object *vid, const char 
*file, const char *sub)
 {
+   const char *extn = strchr(file, '.');
+   if ((extn) &&
+       ((!strcasecmp(extn, ".mp3")) ||
+        (!strcasecmp(extn, ".m4a")) ||
+        (!strcasecmp(extn, ".oga")) ||
+        (!strcasecmp(extn, ".aac")) ||
+        (!strcasecmp(extn, ".flac")) ||
+        (!strcasecmp(extn, ".wav"))))
+     video_art_set(vid, EINA_TRUE);
+   else
+     video_art_set(vid, EINA_FALSE);
    video_position_set(vid, 0.0);
    video_play_set(vid, EINA_FALSE);
    video_file_autosub_set(vid, file, sub);

-- 


Reply via email to