Commit 009252c4 authored by Antoine Cellerier's avatar Antoine Cellerier

Some more format strings

parent 0326005e
...@@ -90,11 +90,13 @@ struct filter_sys_t ...@@ -90,11 +90,13 @@ struct filter_sys_t
"Meta data related: $a = artist, $b = album, $c = copyright, " \ "Meta data related: $a = artist, $b = album, $c = copyright, " \
"$d = description, $e = encoded by, $g = genre, " \ "$d = description, $e = encoded by, $g = genre, " \
"$l = language, $n = track num, $p = now playing, " \ "$l = language, $n = track num, $p = now playing, " \
"$r = rating, $t = title, $u = url, $A = date, " \ "$r = rating, $s = subtitles language, $t = title, "\
"$u = url, $A = date, " \
"$B = audio bitrate (in kb/s), $C = chapter," \ "$B = audio bitrate (in kb/s), $C = chapter," \
"$D = duration, $F = full name with path, $I = title, "\ "$D = duration, $F = full name with path, $I = title, "\
"$L = time left, " \ "$L = time left, " \
"$N = name, $P = position (in %), $S = audio sample rate (in kHz), " \ "$N = name, $O = audio language, $P = position (in %), $R = rate, " \
"$S = audio sample rate (in kHz), " \
"$T = time, $U = publisher, $V = volume, $_ = new line) ") "$T = time, $U = publisher, $V = volume, $_ = new line) ")
#define POSX_TEXT N_("X offset") #define POSX_TEXT N_("X offset")
#define POSX_LONGTEXT N_("X offset, from the left screen edge." ) #define POSX_LONGTEXT N_("X offset, from the left screen edge." )
...@@ -341,6 +343,20 @@ char *FormatMeta( vlc_object_t *p_object, char *string ) ...@@ -341,6 +343,20 @@ char *FormatMeta( vlc_object_t *p_object, char *string )
INSERT_STRING( p_item && p_item->p_meta, INSERT_STRING( p_item && p_item->p_meta,
p_item->p_meta->psz_rating ); p_item->p_meta->psz_rating );
break; break;
case 's':
{
char *lang;
if( p_input )
{
lang = var_GetString( p_input, "sub-language" );
}
else
{
lang = strdup( "-" );
}
INSERT_STRING( 1, lang );
break;
}
case 't': case 't':
INSERT_STRING( p_item && p_item->p_meta, INSERT_STRING( p_item && p_item->p_meta,
p_item->p_meta->psz_title ); p_item->p_meta->psz_title );
...@@ -423,6 +439,20 @@ char *FormatMeta( vlc_object_t *p_object, char *string ) ...@@ -423,6 +439,20 @@ char *FormatMeta( vlc_object_t *p_object, char *string )
case 'N': case 'N':
INSERT_STRING( p_item, p_item->psz_name ); INSERT_STRING( p_item, p_item->psz_name );
break; break;
case 'O':
{
char *lang;
if( p_input )
{
lang = var_GetString( p_input, "audio-language" );
}
else
{
lang = strdup( "-" );
}
INSERT_STRING( 1, lang );
break;
}
case 'P': case 'P':
if( p_input ) if( p_input )
{ {
...@@ -435,6 +465,18 @@ char *FormatMeta( vlc_object_t *p_object, char *string ) ...@@ -435,6 +465,18 @@ char *FormatMeta( vlc_object_t *p_object, char *string )
} }
INSERT_STRING( 1, buf ); INSERT_STRING( 1, buf );
break; break;
case 'R':
if( p_input )
{
int r = var_GetInteger( p_input, "rate" );
snprintf( buf, 10, "%d.%d", r/1000, r%1000 );
}
else
{
sprintf( buf, "-" );
}
INSERT_STRING( 1, buf );
break;
case 'S': case 'S':
if( p_input ) if( p_input )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment