Commit c17290dc authored by Antoine Cellerier's avatar Antoine Cellerier

[patch] unifying meta-information access, the 2nd by Daniel Stränger

parent 8fbceb81
...@@ -38,7 +38,7 @@ Colin Simmonds <colin_simmonds at Mac.lover.org> - compile fix for Mac OS X ...@@ -38,7 +38,7 @@ Colin Simmonds <colin_simmonds at Mac.lover.org> - compile fix for Mac OS X
Damian Ivereigh <damian at cisco.com> - ac3dec uninitialized data structure fix Damian Ivereigh <damian at cisco.com> - ac3dec uninitialized data structure fix
Damien Fouilleul <damien.fouilleul at laposte.net> - DirectShow input improvements Damien Fouilleul <damien.fouilleul at laposte.net> - DirectShow input improvements
Daniel Fischer <dan at subsignal dot org> - Shoutcast output support Daniel Fischer <dan at subsignal dot org> - Shoutcast output support
Daniel Stränger <vlc at schmaller d0t de> - M3U, xtag and playlist improvements Daniel Stränger <vlc at schmaller d0t de> - M3U, xtag and playlist improvements. Meta information core fixes
David Kennedy <dkennedy at tinytoad.com> - X11 fullscreen patch David Kennedy <dkennedy at tinytoad.com> - X11 fullscreen patch
Daniel Nylander <info@danielnylander at se> - Swedish translation Daniel Nylander <info@danielnylander at se> - Swedish translation
David Weber <david_weber at gmx.de> - Mac OS X interface design & graphics (v0.5.0) David Weber <david_weber at gmx.de> - Mac OS X interface design & graphics (v0.5.0)
......
...@@ -25,11 +25,14 @@ ...@@ -25,11 +25,14 @@
#define _VLC_META_H 1 #define _VLC_META_H 1
/* VLC meta name */ /* VLC meta name */
#define VLC_META_INFO_CAT N_("Meta-information")
#define VLC_META_TITLE N_("Title") #define VLC_META_TITLE N_("Title")
#define VLC_META_AUTHOR N_("Author") #define VLC_META_AUTHOR N_("Author")
#define VLC_META_ARTIST N_("Artist") #define VLC_META_ARTIST N_("Artist")
#define VLC_META_GENRE N_("Genre") #define VLC_META_GENRE N_("Genre")
#define VLC_META_COPYRIGHT N_("Copyright") #define VLC_META_COPYRIGHT N_("Copyright")
#define VLC_META_COLLECTION N_("Album/movie/show title")
#define VLC_META_SEQ_NUM N_("Track number/position in set")
#define VLC_META_DESCRIPTION N_("Description") #define VLC_META_DESCRIPTION N_("Description")
#define VLC_META_RATING N_("Rating") #define VLC_META_RATING N_("Rating")
#define VLC_META_DATE N_("Date") #define VLC_META_DATE N_("Date")
......
...@@ -508,7 +508,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -508,7 +508,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
p_access->info.i_title+1 ); p_access->info.i_title+1 );
pp_meta = (vlc_meta_t**)va_arg( args, vlc_meta_t** ); pp_meta = (vlc_meta_t**)va_arg( args, vlc_meta_t** );
*pp_meta = vlc_meta_New(); *pp_meta = vlc_meta_New();
vlc_meta_Add( *pp_meta, VLC_META_TITLE, psz_title ); vlc_meta_Add( *pp_meta, _(VLC_META_TITLE), psz_title );
free( psz_title ); free( psz_title );
break; break;
...@@ -593,7 +593,7 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate, ...@@ -593,7 +593,7 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate,
} }
else else
{ {
char *psz_uri; int i_size, i_length; char *psz_uri;
int i_path_len = p_access->psz_path ? strlen( p_access->psz_path ) int i_path_len = p_access->psz_path ? strlen( p_access->psz_path )
: 0; : 0;
char *psz_opt; char *psz_opt;
...@@ -624,8 +624,8 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate, ...@@ -624,8 +624,8 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate,
if( cddb_track_get_title( t ) != NULL ) if( cddb_track_get_title( t ) != NULL )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
VLC_META_TITLE, _(VLC_META_TITLE),
cddb_track_get_title( t ) ); cddb_track_get_title( t ) );
if( p_item->input.psz_name ) if( p_item->input.psz_name )
free( p_item->input.psz_name ); free( p_item->input.psz_name );
...@@ -636,8 +636,8 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate, ...@@ -636,8 +636,8 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate,
if( psz_result ) if( psz_result )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
VLC_META_ARTIST, psz_result ); _(VLC_META_ARTIST), psz_result );
} }
} }
} }
......
...@@ -617,11 +617,11 @@ static void ParseVorbisComments( decoder_t *p_dec ) ...@@ -617,11 +617,11 @@ static void ParseVorbisComments( decoder_t *p_dec )
psz_value++; psz_value++;
input_Control( p_input, INPUT_ADD_INFO, _("Vorbis comment"), input_Control( p_input, INPUT_ADD_INFO, _("Vorbis comment"),
psz_name, psz_value ); psz_name, psz_value );
/* HACK, we should use meta */
if( strcasestr( psz_name, "artist" ) ) if( strcasestr( psz_name, "artist" ) )
{ {
input_Control( p_input, INPUT_ADD_INFO, _("Meta-information"), vlc_input_item_AddInfo( p_input->input.p_item,
_("Artist"), psz_value ); _(VLC_META_INFO_CAT), _(VLC_META_ARTIST),
"%s", psz_value );
} }
else if( strcasestr( psz_name, "title" ) ) else if( strcasestr( psz_name, "title" ) )
{ {
......
...@@ -321,7 +321,7 @@ static int Demux( demux_t *p_demux ) ...@@ -321,7 +321,7 @@ static int Demux( demux_t *p_demux )
if( psz_now ) if( psz_now )
{ {
vlc_input_item_AddInfo( &(p_item->input), vlc_input_item_AddInfo( &(p_item->input),
_("Meta-information"), _(VLC_META_INFO_CAT),
_( VLC_META_NOW_PLAYING ), _( VLC_META_NOW_PLAYING ),
"%s", "%s",
psz_now ); psz_now );
...@@ -329,7 +329,7 @@ static int Demux( demux_t *p_demux ) ...@@ -329,7 +329,7 @@ static int Demux( demux_t *p_demux )
if( psz_genre ) if( psz_genre )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( VLC_META_GENRE ), _( VLC_META_GENRE ),
"%s", "%s",
psz_genre ); psz_genre );
...@@ -337,7 +337,7 @@ static int Demux( demux_t *p_demux ) ...@@ -337,7 +337,7 @@ static int Demux( demux_t *p_demux )
if( psz_listeners ) if( psz_listeners )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Listeners" ), _( "Listeners" ),
"%s", "%s",
psz_listeners ); psz_listeners );
...@@ -345,7 +345,7 @@ static int Demux( demux_t *p_demux ) ...@@ -345,7 +345,7 @@ static int Demux( demux_t *p_demux )
if( psz_bitrate ) if( psz_bitrate )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Bitrate" ), _( "Bitrate" ),
"%s", "%s",
psz_bitrate ); psz_bitrate );
......
...@@ -206,8 +206,8 @@ static int Demux( demux_t *p_demux ) ...@@ -206,8 +206,8 @@ static int Demux( demux_t *p_demux )
} }
p_item->input.i_duration = i_duration; p_item->input.i_duration = i_duration;
if ( psz_artist && *psz_artist ) if ( psz_artist && *psz_artist )
vlc_input_item_AddInfo( &p_item->input, _("Meta-information"), vlc_input_item_AddInfo( &p_item->input, _(VLC_META_INFO_CAT),
_("Artist"), "%s", psz_artist ); _(VLC_META_ARTIST), "%s", psz_artist );
playlist_NodeAddItem( p_playlist, p_item, playlist_NodeAddItem( p_playlist, p_item,
p_current->pp_parents[0]->i_view, p_current->pp_parents[0]->i_view,
p_current, PLAYLIST_APPEND, p_current, PLAYLIST_APPEND,
......
...@@ -286,7 +286,7 @@ static int Demux( demux_t *p_demux ) ...@@ -286,7 +286,7 @@ static int Demux( demux_t *p_demux )
&& !strcmp( psz_elname, "link" ) ) && !strcmp( psz_elname, "link" ) )
{ {
vlc_input_item_AddInfo( &(p_current->input), vlc_input_item_AddInfo( &(p_current->input),
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Link" ), _( "Podcast Link" ),
"%s", "%s",
psz_text ); psz_text );
...@@ -295,7 +295,7 @@ static int Demux( demux_t *p_demux ) ...@@ -295,7 +295,7 @@ static int Demux( demux_t *p_demux )
&& !strcmp( psz_elname, "copyright" ) ) && !strcmp( psz_elname, "copyright" ) )
{ {
vlc_input_item_AddInfo( &(p_current->input), vlc_input_item_AddInfo( &(p_current->input),
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Copyright" ), _( "Podcast Copyright" ),
"%s", "%s",
psz_text ); psz_text );
...@@ -304,7 +304,7 @@ static int Demux( demux_t *p_demux ) ...@@ -304,7 +304,7 @@ static int Demux( demux_t *p_demux )
&& !strcmp( psz_elname, "itunes:category" ) ) && !strcmp( psz_elname, "itunes:category" ) )
{ {
vlc_input_item_AddInfo( &(p_current->input), vlc_input_item_AddInfo( &(p_current->input),
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Category" ), _( "Podcast Category" ),
"%s", "%s",
psz_text ); psz_text );
...@@ -313,7 +313,7 @@ static int Demux( demux_t *p_demux ) ...@@ -313,7 +313,7 @@ static int Demux( demux_t *p_demux )
&& !strcmp( psz_elname, "itunes:keywords" ) ) && !strcmp( psz_elname, "itunes:keywords" ) )
{ {
vlc_input_item_AddInfo( &(p_current->input), vlc_input_item_AddInfo( &(p_current->input),
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Keywords" ), _( "Podcast Keywords" ),
"%s", "%s",
psz_text ); psz_text );
...@@ -322,7 +322,7 @@ static int Demux( demux_t *p_demux ) ...@@ -322,7 +322,7 @@ static int Demux( demux_t *p_demux )
&& !strcmp( psz_elname, "itunes:subtitle" ) ) && !strcmp( psz_elname, "itunes:subtitle" ) )
{ {
vlc_input_item_AddInfo( &(p_current->input), vlc_input_item_AddInfo( &(p_current->input),
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Subtitle" ), _( "Podcast Subtitle" ),
"%s", "%s",
psz_text ); psz_text );
...@@ -332,7 +332,7 @@ static int Demux( demux_t *p_demux ) ...@@ -332,7 +332,7 @@ static int Demux( demux_t *p_demux )
||!strcmp( psz_elname, "description" ) ) ) ||!strcmp( psz_elname, "description" ) ) )
{ /* <description> isn't standard iTunes podcast stuff */ { /* <description> isn't standard iTunes podcast stuff */
vlc_input_item_AddInfo( &(p_current->input), vlc_input_item_AddInfo( &(p_current->input),
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Summary" ), _( "Podcast Summary" ),
"%s", "%s",
psz_text ); psz_text );
...@@ -369,7 +369,7 @@ static int Demux( demux_t *p_demux ) ...@@ -369,7 +369,7 @@ static int Demux( demux_t *p_demux )
if( psz_item_date ) if( psz_item_date )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Publication Date" ), _( "Podcast Publication Date" ),
"%s", "%s",
psz_item_date ); psz_item_date );
...@@ -377,7 +377,7 @@ static int Demux( demux_t *p_demux ) ...@@ -377,7 +377,7 @@ static int Demux( demux_t *p_demux )
if( psz_item_author ) if( psz_item_author )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Author" ), _( "Podcast Author" ),
"%s", "%s",
psz_item_author ); psz_item_author );
...@@ -385,7 +385,7 @@ static int Demux( demux_t *p_demux ) ...@@ -385,7 +385,7 @@ static int Demux( demux_t *p_demux )
if( psz_item_category ) if( psz_item_category )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Subcategory" ), _( "Podcast Subcategory" ),
"%s", "%s",
psz_item_category ); psz_item_category );
...@@ -393,7 +393,7 @@ static int Demux( demux_t *p_demux ) ...@@ -393,7 +393,7 @@ static int Demux( demux_t *p_demux )
if( psz_item_duration ) if( psz_item_duration )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Duration" ), _( "Podcast Duration" ),
"%s", "%s",
psz_item_duration ); psz_item_duration );
...@@ -401,7 +401,7 @@ static int Demux( demux_t *p_demux ) ...@@ -401,7 +401,7 @@ static int Demux( demux_t *p_demux )
if( psz_item_keywords ) if( psz_item_keywords )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Keywords" ), _( "Podcast Keywords" ),
"%s", "%s",
psz_item_keywords ); psz_item_keywords );
...@@ -409,7 +409,7 @@ static int Demux( demux_t *p_demux ) ...@@ -409,7 +409,7 @@ static int Demux( demux_t *p_demux )
if( psz_item_subtitle ) if( psz_item_subtitle )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Subtitle" ), _( "Podcast Subtitle" ),
"%s", "%s",
psz_item_subtitle ); psz_item_subtitle );
...@@ -417,7 +417,7 @@ static int Demux( demux_t *p_demux ) ...@@ -417,7 +417,7 @@ static int Demux( demux_t *p_demux )
if( psz_item_summary ) if( psz_item_summary )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Summary" ), _( "Podcast Summary" ),
"%s", "%s",
psz_item_summary ); psz_item_summary );
...@@ -425,7 +425,7 @@ static int Demux( demux_t *p_demux ) ...@@ -425,7 +425,7 @@ static int Demux( demux_t *p_demux )
if( psz_item_size ) if( psz_item_size )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Size" ), _( "Podcast Size" ),
"%s bytes", "%s bytes",
psz_item_size ); psz_item_size );
...@@ -433,7 +433,7 @@ static int Demux( demux_t *p_demux ) ...@@ -433,7 +433,7 @@ static int Demux( demux_t *p_demux )
if( psz_item_type ) if( psz_item_type )
{ {
vlc_input_item_AddInfo( &p_item->input, vlc_input_item_AddInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT),
_( "Podcast Type" ), _( "Podcast Type" ),
"%s", "%s",
psz_item_type ); psz_item_type );
......
...@@ -62,9 +62,9 @@ static int PlaylistNext( vlc_object_t *, const char *, ...@@ -62,9 +62,9 @@ static int PlaylistNext( vlc_object_t *, const char *,
static int ItemChanged( vlc_object_t *, const char *, static int ItemChanged( vlc_object_t *, const char *,
vlc_value_t, vlc_value_t, void * ); vlc_value_t, vlc_value_t, void * );
static int ItemAppended( vlc_object_t *p_this, const char *psz_variable, static int ItemAppended( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t oval, vlc_value_t nval, void *param ); vlc_value_t oval, vlc_value_t nval, void *param );
static int ItemDeleted( vlc_object_t *p_this, const char *psz_variable, static int ItemDeleted( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t oval, vlc_value_t nval, void *param ); vlc_value_t oval, vlc_value_t nval, void *param );
/***************************************************************************** /*****************************************************************************
* Event Table. * Event Table.
...@@ -494,8 +494,7 @@ void Playlist::UpdateTreeItem( wxTreeItemId item ) ...@@ -494,8 +494,7 @@ void Playlist::UpdateTreeItem( wxTreeItemId item )
wxString msg; wxString msg;
wxString duration = wxU( "" ); wxString duration = wxU( "" );
char *psz_author = vlc_input_item_GetInfo( &p_item->input, char *psz_author = vlc_input_item_GetInfo( &p_item->input,
_("Meta-information"), _(VLC_META_INFO_CAT), _(VLC_META_ARTIST) );
VLC_META_ARTIST );
if( !psz_author ) if( !psz_author )
{ {
UnlockPlaylist( p_intf->p_sys, p_playlist ); UnlockPlaylist( p_intf->p_sys, p_playlist );
...@@ -519,7 +518,7 @@ void Playlist::UpdateTreeItem( wxTreeItemId item ) ...@@ -519,7 +518,7 @@ void Playlist::UpdateTreeItem( wxTreeItemId item )
else else
{ {
msg = wxString(wxU( psz_author )) + wxT(" - ") + msg = wxString(wxU( psz_author )) + wxT(" - ") +
wxString(wxU(p_item->input.psz_name)) + duration; wxString(wxU(p_item->input.psz_name)) + duration;
} }
free( psz_author ); free( psz_author );
treectrl->SetItemText( item , msg ); treectrl->SetItemText( item , msg );
......
...@@ -145,7 +145,7 @@ void InputManager::UpdateInput() ...@@ -145,7 +145,7 @@ void InputManager::UpdateInput()
void InputManager::UpdateNowPlaying() void InputManager::UpdateNowPlaying()
{ {
char *psz_now_playing = vlc_input_item_GetInfo( p_input->input.p_item, char *psz_now_playing = vlc_input_item_GetInfo( p_input->input.p_item,
_("Meta-information"), _(VLC_META_NOW_PLAYING) ); _(VLC_META_INFO_CAT), _(VLC_META_NOW_PLAYING) );
if( psz_now_playing && *psz_now_playing ) if( psz_now_playing && *psz_now_playing )
{ {
p_main_intf->statusbar->SetStatusText( p_main_intf->statusbar->SetStatusText(
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <wx/dynarray.h> #include <wx/dynarray.h>
#include <wx/imaglist.h> #include <wx/imaglist.h>
#include "vlc_meta.h"
namespace wxvlc { namespace wxvlc {
/* Callback prototype */ /* Callback prototype */
...@@ -291,7 +292,7 @@ void PlaylistManager::UpdateTreeItem( wxTreeItemId item ) ...@@ -291,7 +292,7 @@ void PlaylistManager::UpdateTreeItem( wxTreeItemId item )
wxString duration = wxU( "" ); wxString duration = wxU( "" );
char *psz_author = char *psz_author =
vlc_input_item_GetInfo( &p_item->input, vlc_input_item_GetInfo( &p_item->input,
_("Meta-information"), _("Artist")); _(VLC_META_INFO_CAT), _(VLC_META_ARTIST) );
if( !psz_author ) if( !psz_author )
{ {
UnlockPlaylist( p_intf->p_sys, p_playlist ); UnlockPlaylist( p_intf->p_sys, p_playlist );
......
...@@ -190,11 +190,11 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -190,11 +190,11 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
/* Playing something ... */ /* Playing something ... */
psz_artist = vlc_input_item_GetInfo( p_input->input.p_item, psz_artist = vlc_input_item_GetInfo( p_input->input.p_item,
_("Meta-information"), _(VLC_META_INFO_CAT),
_(VLC_META_ARTIST) ); _(VLC_META_ARTIST) );
psz_album = vlc_input_item_GetInfo( p_input->input.p_item, psz_album = vlc_input_item_GetInfo( p_input->input.p_item,
_("Meta-information"), _(VLC_META_INFO_CAT),
_("Album/movie/show title" ) ); _(VLC_META_COLLECTION) );
psz_title = strdup( p_input->input.p_item->psz_name ); psz_title = strdup( p_input->input.p_item->psz_name );
if( psz_title == NULL ) psz_title = strdup( N_("(no title)") ); if( psz_title == NULL ) psz_title = strdup( N_("(no title)") );
if( psz_artist == NULL ) psz_artist = strdup( N_("(no artist)") ); if( psz_artist == NULL ) psz_artist = strdup( N_("(no artist)") );
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/intf.h> #include <vlc/intf.h>
#include <vlc_meta.h>
#include <errno.h> /* ENOMEM */ #include <errno.h> /* ENOMEM */
...@@ -65,7 +66,7 @@ int Export_M3U( vlc_object_t *p_this ) ...@@ -65,7 +66,7 @@ int Export_M3U( vlc_object_t *p_this )
{ {
char *psz_artist = char *psz_artist =
vlc_input_item_GetInfo( &p_playlist->pp_items[i]->input, vlc_input_item_GetInfo( &p_playlist->pp_items[i]->input,
_("Meta-information"), _("Artist") ); _(VLC_META_INFO_CAT), _(VLC_META_ARTIST) );
if( psz_artist && *psz_artist ) if( psz_artist && *psz_artist )
{ {
/* write EXTINF with artist */ /* write EXTINF with artist */
......
...@@ -604,10 +604,10 @@ static void ProcessHost( services_discovery_t *p_sd, dhost_t *p_host ) ...@@ -604,10 +604,10 @@ static void ProcessHost( services_discovery_t *p_sd, dhost_t *p_host )
p_host->p_songs[i].id ); p_host->p_songs[i].id );
p_item = playlist_ItemNew( p_sd, psz_buff, p_item = playlist_ItemNew( p_sd, psz_buff,
p_host->p_songs[i].itemname ); p_host->p_songs[i].itemname );
vlc_input_item_AddInfo( &p_item->input, _("Meta-information"), vlc_input_item_AddInfo( &p_item->input, _(VLC_META_INFO_CAT),
_("Artist"), p_host->p_songs[i].songartist ); _(VLC_META_ARTIST), p_host->p_songs[i].songartist );
vlc_input_item_AddInfo( &p_item->input, _("Meta-information"), vlc_input_item_AddInfo( &p_item->input, _(VLC_META_INFO_CAT),
_("Album"), p_host->p_songs[i].songalbum ); _(VLC_META_COLLECTION), p_host->p_songs[i].songalbum );
playlist_NodeAddItem( p_playlist, p_item, VIEW_CATEGORY, playlist_NodeAddItem( p_playlist, p_item, VIEW_CATEGORY,
p_host->p_node, PLAYLIST_APPEND, PLAYLIST_END ); p_host->p_node, PLAYLIST_APPEND, PLAYLIST_END );
......
...@@ -462,8 +462,8 @@ static void EsOutProgramSelect( es_out_t *out, es_out_pgrm_t *p_pgrm ) ...@@ -462,8 +462,8 @@ static void EsOutProgramSelect( es_out_t *out, es_out_pgrm_t *p_pgrm )
char *psz_cat = malloc( strlen(_("Program")) + 10 ); char *psz_cat = malloc( strlen(_("Program")) + 10 );
sprintf( psz_cat, "%s %d", _("Program"), p_pgrm->i_id ); sprintf( psz_cat, "%s %d", _("Program"), p_pgrm->i_id );
input_Control( p_input, INPUT_ADD_INFO, _("Meta-information"), input_Control( p_input, INPUT_ADD_INFO, _(VLC_META_INFO_CAT),
VLC_META_NOW_PLAYING, "%s", p_pgrm->psz_now_playing ); _(VLC_META_NOW_PLAYING), "%s", p_pgrm->psz_now_playing );
free( psz_cat ); free( psz_cat );
} }
...@@ -631,8 +631,8 @@ static void EsOutProgramMeta( es_out_t *out, int i_group, vlc_meta_t *p_meta ) ...@@ -631,8 +631,8 @@ static void EsOutProgramMeta( es_out_t *out, int i_group, vlc_meta_t *p_meta )
if( p_sys->p_pgrm == p_pgrm ) if( p_sys->p_pgrm == p_pgrm )
{ {
input_Control( p_input, INPUT_ADD_INFO, _("Meta-information"), input_Control( p_input, INPUT_ADD_INFO, _(VLC_META_INFO_CAT),
VLC_META_NOW_PLAYING, "%s", psz_now_playing ); _(VLC_META_NOW_PLAYING), "%s", psz_now_playing );
} }
} }
free( psz_cat ); free( psz_cat );
......
...@@ -223,8 +223,8 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item, ...@@ -223,8 +223,8 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
} }
/* Remove 'Now playing' info as it is probably outdated */ /* Remove 'Now playing' info as it is probably outdated */
input_Control( p_input, INPUT_DEL_INFO, _("Meta-information"), input_Control( p_input, INPUT_DEL_INFO, _(VLC_META_INFO_CAT),
VLC_META_NOW_PLAYING ); VLC_META_NOW_PLAYING ); /* ? Don't translate as it might has been copied ? */
return p_input; return p_input;
} }
...@@ -1896,15 +1896,15 @@ static int UpdateMeta( input_thread_t *p_input, vlc_bool_t b_quick ) ...@@ -1896,15 +1896,15 @@ static int UpdateMeta( input_thread_t *p_input, vlc_bool_t b_quick )
msg_Dbg( p_input, " - '%s' = '%s'", msg_Dbg( p_input, " - '%s' = '%s'",
_(p_meta->name[i]), p_meta->value[i] ); _(p_meta->name[i]), p_meta->value[i] );
if( !strcmp(p_meta->name[i], VLC_META_TITLE) && p_meta->value[i] && if( !strcmp(p_meta->name[i], _(VLC_META_TITLE)) && p_meta->value[i] &&
!p_input->input.p_item->b_fixed_name ) !p_input->input.p_item->b_fixed_name )
input_Control( p_input, INPUT_SET_NAME, p_meta->value[i] ); input_Control( p_input, INPUT_SET_NAME, p_meta->value[i] );
if( !strcmp( p_meta->name[i], VLC_META_AUTHOR ) ) if( !strcmp( p_meta->name[i], _(VLC_META_AUTHOR) ) )
input_Control( p_input, INPUT_ADD_INFO, _("General"), input_Control( p_input, INPUT_ADD_INFO, _("General"),
_("Author"), p_meta->value[i] ); _(VLC_META_AUTHOR), p_meta->value[i] );
input_Control( p_input, INPUT_ADD_INFO, _("Meta-information"), input_Control( p_input, INPUT_ADD_INFO, _(VLC_META_INFO_CAT),
_(p_meta->name[i]), "%s", p_meta->value[i] ); _(p_meta->name[i]), "%s", p_meta->value[i] );
} }
...@@ -2362,7 +2362,7 @@ static vlc_meta_t *InputMetaUser( input_thread_t *p_input ) ...@@ -2362,7 +2362,7 @@ static vlc_meta_t *InputMetaUser( input_thread_t *p_input )
#define GET_META( c, s ) \ #define GET_META( c, s ) \
var_Get( p_input, (s), &val ); \ var_Get( p_input, (s), &val ); \
if( *val.psz_string ) \ if( *val.psz_string ) \
vlc_meta_Add( p_meta, c, val.psz_string ); \ vlc_meta_Add( p_meta, _(c), val.psz_string ); \
free( val.psz_string ) free( val.psz_string )
GET_META( VLC_META_TITLE, "meta-title" ); GET_META( VLC_META_TITLE, "meta-title" );
......
...@@ -187,10 +187,10 @@ int playlist_ItemArraySort( playlist_t *p_playlist, int i_items, ...@@ -187,10 +187,10 @@ int playlist_ItemArraySort( playlist_t *p_playlist, int i_items,
{ {
char *psz_a = vlc_input_item_GetInfo( char *psz_a = vlc_input_item_GetInfo(
&pp_items[i]->input, &pp_items[i]->input,
_( "Meta-information"), _("Artist") ); _(VLC_META_INFO_CAT), _(VLC_META_ARTIST) );
char *psz_b = vlc_input_item_GetInfo( char *psz_b = vlc_input_item_GetInfo(
&pp_items[i_small]->input, &pp_items[i_small]->input,
_( "Meta-information"), _("Artist") ); _(VLC_META_INFO_CAT), _(VLC_META_ARTIST) );
if( pp_items[i]->i_children == -1 && if( pp_items[i]->i_children == -1 &&
pp_items[i_small]->i_children >= 0 ) pp_items[i_small]->i_children >= 0 )
{ {
...@@ -230,10 +230,10 @@ int playlist_ItemArraySort( playlist_t *p_playlist, int i_items, ...@@ -230,10 +230,10 @@ int playlist_ItemArraySort( playlist_t *p_playlist, int i_items,
{ {
char *psz_a = vlc_input_item_GetInfo( char *psz_a = vlc_input_item_GetInfo(
&pp_items[i]->input, &pp_items[i]->input,
_( "Meta-information"), _("Album/movie/show title") ); _(VLC_META_INFO_CAT), _(VLC_META_COLLECTION) );
char *psz_b = vlc_input_item_GetInfo( char *psz_b = vlc_input_item_GetInfo(
&pp_items[i_small]->input, &pp_items[i_small]->input,
_( "Meta-information"), _("Album/movie/show title") ); _(VLC_META_INFO_CAT), _(VLC_META_COLLECTION) );
if( pp_items[i]->i_children == -1 && if( pp_items[i]->i_children == -1 &&
pp_items[i_small]->i_children >= 0 ) pp_items[i_small]->i_children >= 0 )
{ {
...@@ -325,17 +325,17 @@ int playlist_NodeGroup( playlist_t * p_playlist , int i_view, ...@@ -325,17 +325,17 @@ int playlist_NodeGroup( playlist_t * p_playlist , int i_view,
else if ( i_mode == SORT_AUTHOR ) else if ( i_mode == SORT_AUTHOR )
{ {
psz_search = vlc_input_item_GetInfo( &pp_items[i]->input, psz_search = vlc_input_item_GetInfo( &pp_items[i]->input,
_("Meta-information"), _( "Artist" ) ); _(VLC_META_INFO_CAT), _(VLC_META_ARTIST) );
} }
else if ( i_mode == SORT_ALBUM ) else if ( i_mode == SORT_ALBUM )
{ {
psz_search = vlc_input_item_GetInfo( &pp_items[i]->input, psz_search = vlc_input_item_GetInfo( &pp_items[i]->input,
_("Meta-information"), _( "Album/movie/show title" ) ); _(VLC_META_INFO_CAT), _(VLC_META_COLLECTION) );
} }
else if ( i_mode == SORT_GENRE ) else if ( i_mode == SORT_GENRE )
{ {
psz_search = vlc_input_item_GetInfo( &pp_items[i]->input, psz_search = vlc_input_item_GetInfo( &pp_items[i]->input,
_("Meta-information"), _( "Genre" ) ); _(VLC_META_INFO_CAT), _(VLC_META_GENRE) );
} }
if( psz_search && !strcmp( psz_search, "" ) ) if( psz_search && !strcmp( psz_search, "" ) )
......
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