Commit fa3690b1 authored by Antoine Cellerier's avatar Antoine Cellerier

backport [15263] (so E-bola's mirc script can work in 0.8.5)

parent 199ec211
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "http.h" #include "http.h"
#include "vlc_url.h" #include "vlc_url.h"
#include "vlc_meta.h"
static vlc_object_t *GetVLCObject( intf_thread_t *p_intf, static vlc_object_t *GetVLCObject( intf_thread_t *p_intf,
const char *psz_object, const char *psz_object,
...@@ -961,6 +962,40 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars, ...@@ -961,6 +962,40 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars,
aout_VolumeGet( p_intf, &i_volume ); aout_VolumeGet( p_intf, &i_volume );
free( psz_vol ); free( psz_vol );
} }
else if( !strcmp( s, "vlc_get_meta" ) )
{
char *psz_meta = E_(SSPop)( st );
char *psz_val = NULL;
if( p_sys->p_input && p_sys->p_input->input.p_item )
{
#define p_item p_sys->p_input->input.p_item
if( !strcmp( psz_meta, "ARTIST" ) )
{
psz_val = vlc_input_item_GetInfo( p_item,
_(VLC_META_INFO_CAT), _(VLC_META_ARTIST) );
}
else if( !strcmp( psz_meta, "TITLE" ) )
{
psz_val = vlc_input_item_GetInfo( p_item,
_(VLC_META_INFO_CAT), _(VLC_META_TITLE) );
}
else if( !strcmp( psz_meta, "ALBUM" ) )
{
psz_val = vlc_input_item_GetInfo( p_item,
_(VLC_META_INFO_CAT), _(VLC_META_COLLECTION) );
}
else
{
psz_val = vlc_input_item_GetInfo( p_item,
_(VLC_META_INFO_CAT), psz_meta );
}
#undef p_item
}
if( psz_val == NULL ) psz_val = strdup( "" );
E_(SSPush)( st, psz_val );
free( psz_meta );
free( psz_val );
}
else if( !strcmp( s, "vlm_command" ) || !strcmp( s, "vlm_cmd" ) ) else if( !strcmp( s, "vlm_command" ) || !strcmp( s, "vlm_cmd" ) )
{ {
char *psz_elt; char *psz_elt;
......
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