raster pushed a commit to branch master.

commit 4caebb56b7d4858579e95152ff2dc3ea8e42065f
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Mon Mar 25 16:42:55 2013 +0900

    fix some media handling of mp3's and music files with tyls+thumb links.
---
 src/bin/termio.c | 29 ++++++++++++++++++-----------
 src/bin/tyls.c   | 12 ++++++------
 2 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/src/bin/termio.c b/src/bin/termio.c
index e8b424c..1caaffc 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -553,24 +553,31 @@ _smart_media_clicked(void *data, Evas_Object *obj, void 
*info __UNUSED__)
      {
         if (blk->link)
           {
+             int type = media_src_type_get(blk->link);
              Config *config = termio_config_get(data);
              
              if (config)
                {
-                  const char *cmd = NULL;
-                  
-                  file = blk->link;
-                  if ((config->helper.local.general) &&
-                      (config->helper.local.general[0]))
-                    cmd = config->helper.local.general;
-                  if (cmd)
+                  if ((!config->helper.inline_please) ||
+                      (!((type == TYPE_IMG) || (type == TYPE_SCALE) ||
+                         (type == TYPE_EDJE) || (type == TYPE_MOV))))
                     {
-                       char buf[PATH_MAX];
+                       const char *cmd = NULL;
                        
-                       snprintf(buf, sizeof(buf), "%s %s", cmd, file);
-                       ecore_exe_run(buf, NULL);
-                       return;
+                       file = blk->link;
+                       if ((config->helper.local.general) &&
+                           (config->helper.local.general[0]))
+                         cmd = config->helper.local.general;
+                       if (cmd)
+                         {
+                            char buf[PATH_MAX];
+                            
+                            snprintf(buf, sizeof(buf), "%s %s", cmd, file);
+                            ecore_exe_run(buf, NULL);
+                            return;
+                         }
                     }
+                  file = blk->link;
                }
           }
      }
diff --git a/src/bin/tyls.c b/src/bin/tyls.c
index de3935a..5970ba3 100644
--- a/src/bin/tyls.c
+++ b/src/bin/tyls.c
@@ -345,12 +345,12 @@ const Cmatch fmatch[] =
    { 3, 4, 5,  9, 9, 9, "*.264", NULL},
    { 3, 4, 5,  9, 9, 9, "*.3gp", NULL},
    
-   { 2, 3, 5,  9, 9, 9, "*.mp3", NULL},
-   { 2, 3, 5,  9, 9, 9, "*.MP3", NULL},
-   { 2, 3, 5,  9, 9, 9, "*.aac", NULL},
-   { 2, 3, 5,  9, 9, 9, "*.AAC", NULL},
-   { 2, 3, 5,  9, 9, 9, "*.wav", NULL},
-   { 2, 3, 5,  9, 9, 9, "*.WAV", NULL},
+   { 2, 3, 5,  9, 9, 9, "*.mp3", "audio-x-mpeg.svg"},
+   { 2, 3, 5,  9, 9, 9, "*.MP3", "audio-x-mpeg.svg"},
+   { 2, 3, 5,  9, 9, 9, "*.aac", "audio-x-generic.svg"},
+   { 2, 3, 5,  9, 9, 9, "*.AAC", "audio-x-generic.svg"},
+   { 2, 3, 5,  9, 9, 9, "*.wav", "audio-x-wav.svg"},
+   { 2, 3, 5,  9, 9, 9, "*.WAV", "audio-x-wav.svg"},
    { 2, 3, 5,  9, 9, 9, "*.m3u", "audio-x-mp3-playlist"},
    { 2, 3, 5,  9, 9, 9, "*.M3U", "audio-x-mp3-playlist"},
    

-- 

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d

Reply via email to