]> git.sesse.net Git - vlc/commitdiff
libvlc-module: Adding a input-title-format variable
authorHugo Beauzée-Luyssen <beauze.h@gmail.com>
Thu, 21 Apr 2011 09:49:44 +0000 (11:49 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 22 Apr 2011 13:11:41 +0000 (15:11 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/libvlc-module.c

index b3b25f2cdb4fd2d8f72eeaa6216b60cabd365688..a666db71c66eb0048d269134d53daa943040fb9f 100644 (file)
@@ -783,6 +783,12 @@ static const char *const ppsz_clock_descriptions[] =
     "This is the maximum size in bytes of the temporary files " \
     "that will be used to store the timeshifted streams." )
 
+#define INPUT_TITLE_FORMAT_TEXT N_( "Change title according to current media" )
+#define INPUT_TITLE_FORMAT_LONGTEXT N_( "This option allows you to set the title according to what's being played<br>"  \
+    "$a: Artist<br>$b: Album<br>$c: Copyright<br>$t: Title<br>$g: Genre<br>"  \
+    "$n: Track num<br>$p: Now playing<br>$A: Date<br>$D: Duration<br>"  \
+    "$Z: \"Now playing\" (Fall back on Title - Artist)" )
+
 // DEPRECATED
 #define SUB_CAT_LONGTEXT N_( \
     "These options allow you to modify the behavior of the subpictures " \
@@ -1952,6 +1958,8 @@ vlc_module_begin ()
     add_integer( "input-timeshift-granularity", -1, INPUT_TIMESHIFT_GRANULARITY_TEXT,
                  INPUT_TIMESHIFT_GRANULARITY_LONGTEXT, true )
 
+    add_string( "input-title-format", "$a - $t", INPUT_TITLE_FORMAT_TEXT, INPUT_TITLE_FORMAT_LONGTEXT, false );
+
 /* Decoder options */
     add_category_hint( N_("Decoders"), CODEC_CAT_LONGTEXT , true )
     add_string( "codec", NULL, CODEC_TEXT,