Commit dae78cbb authored by Uwe L. Korn's avatar Uwe L. Korn Committed by Jean-Baptiste Kempf

input: Add support for DiscNumber meta

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent c203a908
...@@ -74,7 +74,8 @@ typedef enum libvlc_meta_t { ...@@ -74,7 +74,8 @@ typedef enum libvlc_meta_t {
libvlc_meta_Episode, libvlc_meta_Episode,
libvlc_meta_ShowName, libvlc_meta_ShowName,
libvlc_meta_Actors, libvlc_meta_Actors,
libvlc_meta_AlbumArtist libvlc_meta_AlbumArtist,
libvlc_meta_DiscNumber
/* Add new meta types HERE */ /* Add new meta types HERE */
} libvlc_meta_t; } libvlc_meta_t;
......
...@@ -55,10 +55,11 @@ typedef enum vlc_meta_type_t ...@@ -55,10 +55,11 @@ typedef enum vlc_meta_type_t
vlc_meta_Episode, vlc_meta_Episode,
vlc_meta_ShowName, vlc_meta_ShowName,
vlc_meta_Actors, vlc_meta_Actors,
vlc_meta_AlbumArtist vlc_meta_AlbumArtist,
vlc_meta_DiscNumber
} vlc_meta_type_t; } vlc_meta_type_t;
#define VLC_META_TYPE_COUNT 24 #define VLC_META_TYPE_COUNT 25
#define ITEM_PREPARSED 1 #define ITEM_PREPARSED 1
#define ITEM_ARTURL_FETCHED 2 #define ITEM_ARTURL_FETCHED 2
...@@ -139,6 +140,7 @@ VLC_API int input_item_WriteMeta(vlc_object_t *, input_item_t *); ...@@ -139,6 +140,7 @@ VLC_API int input_item_WriteMeta(vlc_object_t *, input_item_t *);
#define vlc_meta_SetShowName( meta, b ) vlc_meta_Set( meta, vlc_meta_ShowName, b ) #define vlc_meta_SetShowName( meta, b ) vlc_meta_Set( meta, vlc_meta_ShowName, b )
#define vlc_meta_SetActors( meta, b ) vlc_meta_Set( meta, vlc_meta_Actors, b ) #define vlc_meta_SetActors( meta, b ) vlc_meta_Set( meta, vlc_meta_Actors, b )
#define vlc_meta_SetAlbumArtist( meta, b ) vlc_meta_Set( meta, vlc_meta_AlbumArtist, b ) #define vlc_meta_SetAlbumArtist( meta, b ) vlc_meta_Set( meta, vlc_meta_AlbumArtist, b )
#define vlc_meta_SetDiscNumber( meta, b ) vlc_meta_Set( meta, vlc_meta_DiscNumber, b )
#define VLC_META_TITLE vlc_meta_TypeToLocalizedString( vlc_meta_Title ) #define VLC_META_TITLE vlc_meta_TypeToLocalizedString( vlc_meta_Title )
#define VLC_META_ARTIST vlc_meta_TypeToLocalizedString( vlc_meta_Artist ) #define VLC_META_ARTIST vlc_meta_TypeToLocalizedString( vlc_meta_Artist )
...@@ -163,6 +165,7 @@ VLC_API int input_item_WriteMeta(vlc_object_t *, input_item_t *); ...@@ -163,6 +165,7 @@ VLC_API int input_item_WriteMeta(vlc_object_t *, input_item_t *);
#define VLC_META_SHOW_NAME vlc_meta_TypeToLocalizedString( vlc_meta_ShowName ) #define VLC_META_SHOW_NAME vlc_meta_TypeToLocalizedString( vlc_meta_ShowName )
#define VLC_META_ACTORS vlc_meta_TypeToLocalizedString( vlc_meta_Actors ) #define VLC_META_ACTORS vlc_meta_TypeToLocalizedString( vlc_meta_Actors )
#define VLC_META_ALBUMARTIST vlc_meta_TypeToLocalizedString( vlc_meta_AlbumArtist ) #define VLC_META_ALBUMARTIST vlc_meta_TypeToLocalizedString( vlc_meta_AlbumArtist )
#define VLC_META_DISCNUMBER vlc_meta_TypeToLocalizedString( vlc_meta_DiscNumber )
#define VLC_META_EXTRA_MB_ALBUMID "MB_ALBUMID" #define VLC_META_EXTRA_MB_ALBUMID "MB_ALBUMID"
......
...@@ -69,7 +69,8 @@ static const vlc_meta_type_t libvlc_to_vlc_meta[] = ...@@ -69,7 +69,8 @@ static const vlc_meta_type_t libvlc_to_vlc_meta[] =
[libvlc_meta_Episode] = vlc_meta_Episode, [libvlc_meta_Episode] = vlc_meta_Episode,
[libvlc_meta_ShowName] = vlc_meta_ShowName, [libvlc_meta_ShowName] = vlc_meta_ShowName,
[libvlc_meta_Actors] = vlc_meta_Actors, [libvlc_meta_Actors] = vlc_meta_Actors,
[libvlc_meta_AlbumArtist] = vlc_meta_AlbumArtist [libvlc_meta_AlbumArtist] = vlc_meta_AlbumArtist,
[libvlc_meta_DiscNumber] = vlc_meta_DiscNumber
}; };
static const libvlc_meta_t vlc_to_libvlc_meta[] = static const libvlc_meta_t vlc_to_libvlc_meta[] =
...@@ -97,7 +98,8 @@ static const libvlc_meta_t vlc_to_libvlc_meta[] = ...@@ -97,7 +98,8 @@ static const libvlc_meta_t vlc_to_libvlc_meta[] =
[vlc_meta_Episode] = libvlc_meta_Episode, [vlc_meta_Episode] = libvlc_meta_Episode,
[vlc_meta_ShowName] = libvlc_meta_ShowName, [vlc_meta_ShowName] = libvlc_meta_ShowName,
[vlc_meta_Actors] = libvlc_meta_Actors, [vlc_meta_Actors] = libvlc_meta_Actors,
[vlc_meta_AlbumArtist] = libvlc_meta_AlbumArtist [vlc_meta_AlbumArtist] = libvlc_meta_AlbumArtist,
[vlc_meta_DiscNumber] = libvlc_meta_DiscNumber
}; };
/************************************************************************** /**************************************************************************
......
...@@ -339,6 +339,7 @@ static int vlclua_input_item_set_meta( lua_State *L ) ...@@ -339,6 +339,7 @@ static int vlclua_input_item_set_meta( lua_State *L )
META_TYPE( ShowName, "show_name" ) META_TYPE( ShowName, "show_name" )
META_TYPE( Actors, "actors" ) META_TYPE( Actors, "actors" )
META_TYPE( AlbumArtist, "album_artist" ) META_TYPE( AlbumArtist, "album_artist" )
META_TYPE( DiscNumber, "disc_number" )
}; };
#undef META_TYPE #undef META_TYPE
......
...@@ -75,7 +75,8 @@ const char * vlc_meta_TypeToLocalizedString( vlc_meta_type_t meta_type ) ...@@ -75,7 +75,8 @@ const char * vlc_meta_TypeToLocalizedString( vlc_meta_type_t meta_type )
[vlc_meta_Episode] = N_("Episode"), [vlc_meta_Episode] = N_("Episode"),
[vlc_meta_ShowName] = N_("Show Name"), [vlc_meta_ShowName] = N_("Show Name"),
[vlc_meta_Actors] = N_("Actors"), [vlc_meta_Actors] = N_("Actors"),
[vlc_meta_AlbumArtist] = N_("Album Artist") [vlc_meta_AlbumArtist] = N_("Album Artist"),
[vlc_meta_DiscNumber] = N_("DiscNumber")
}; };
assert (meta_type < (sizeof(posix_names) / sizeof(posix_names[0]))); assert (meta_type < (sizeof(posix_names) / sizeof(posix_names[0])));
......
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