]> git.sesse.net Git - vlc/blobdiff - modules/gui/ncurses.c
Qt: create a helper function to manage core ArtUrl
[vlc] / modules / gui / ncurses.c
index 57732deb81f9bfb0a50e9ca6981cf76c212120e2..d1cdba433d534e88754748975ea28147c14b7f6a 100644 (file)
 #   include <dirent.h>
 #endif
 
-#ifdef HAVE_CDDAX
-#define CDDA_MRL "cddax://"
-#else
-#define CDDA_MRL "cdda://"
-#endif
-
-#ifdef HAVE_VCDX
-#define VCD_MRL "vcdx://"
-#else
-#define VCD_MRL "vcd://"
-#endif
-
 #define SEARCH_CHAIN_SIZE 20
 #define OPEN_CHAIN_SIZE 50
 
@@ -2411,23 +2399,23 @@ static void Eject( intf_thread_t *p_intf )
                 break;
             }
         }
-        else if( !strncmp(psz_name, VCD_MRL, strlen(VCD_MRL)) )
+        else if( !strncmp(psz_name, "vcd://", 6) )
         {
-            switch( psz_name[strlen(VCD_MRL)] )
+            switch( psz_name[6] )
             {
             case '\0':
             case '@':
-                psz_device = config_GetPsz( p_intf, VCD_MRL );
+                psz_device = config_GetPsz( p_intf, "vcd" );
                 break;
             default:
                 /* Omit the beginning MRL-selector characters */
-                psz_device = strdup( psz_name + strlen(VCD_MRL) );
+                psz_device = strdup( psz_name + 6 );
                 break;
             }
         }
-        else if( !strncmp(psz_name, CDDA_MRL, strlen(CDDA_MRL) ) )
+        else if( !strncmp(psz_name, "cdda://", 7 ) )
         {
-            switch( psz_name[strlen(CDDA_MRL)] )
+            switch( psz_name[7] )
             {
             case '\0':
             case '@':
@@ -2435,7 +2423,7 @@ static void Eject( intf_thread_t *p_intf )
                 break;
             default:
                 /* Omit the beginning MRL-selector characters */
-                psz_device = strdup( psz_name + strlen(CDDA_MRL) );
+                psz_device = strdup( psz_name + 7 );
                 break;
             }
         }