vlc | branch: master | Frank von Zeppelin <[email protected]> | Thu Apr 20 00:48:21 2017 +0200| [af6903bdad23d86ec6b358aa36df7066ca135081] | committer: Jean-Baptiste Kempf
oldrc: add get_artist and get_album to get metadata Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=af6903bdad23d86ec6b358aa36df7066ca135081 --- modules/control/oldrc.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/modules/control/oldrc.c b/modules/control/oldrc.c index d33a74c62c..f2742c1efb 100644 --- a/modules/control/oldrc.c +++ b/modules/control/oldrc.c @@ -704,7 +704,29 @@ static void *Run( void *data ) } else { - msg_rc( "%s", input_GetItem(p_sys->p_input)->psz_name ); + msg_rc( "%s", input_item_GetMeta(input_GetItem(p_sys->p_input),vlc_meta_Title)); + } + } + else if( !strcmp( psz_cmd, "get_artist" ) ) + { + if( p_sys->p_input == NULL ) + { + msg_rc("%s", ""); + } + else + { + msg_rc( "%s", input_item_GetMeta(input_GetItem(p_sys->p_input),vlc_meta_Artist)); + } + } + else if( !strcmp( psz_cmd, "get_album" ) ) + { + if( p_sys->p_input == NULL ) + { + msg_rc("%s", ""); + } + else + { + msg_rc( "%s", input_item_GetMeta(input_GetItem(p_sys->p_input),vlc_meta_Album)); } } else if( !strcmp( psz_cmd, "longhelp" ) || !strncmp( psz_cmd, "h", 1 ) @@ -806,6 +828,8 @@ static void Help( intf_thread_t *p_intf) msg_rc("%s", _("| get_time . . seconds elapsed since stream's beginning")); msg_rc("%s", _("| is_playing . . . . 1 if a stream plays, 0 otherwise")); msg_rc("%s", _("| get_title . . . . . the title of the current stream")); + msg_rc("%s", _("| get_artist . . . . the artist of the current stream")); + msg_rc("%s", _("| get_album . . . . . the album of the current stream")); msg_rc("%s", _("| get_length . . . . the length of the current stream")); msg_rc( "| "); msg_rc("%s", _("| volume [X] . . . . . . . . . . set/get audio volume")); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
