[vlc-commits] Add the new metadata to lua code

Jean-Baptiste Kempf git at videolan.org
Thu Feb 6 21:47:39 CET 2014


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Feb  6 18:19:18 2014 +0100| [ccca9becbf63cfdc47516023a81b4c29021531ab] | committer: Jean-Baptiste Kempf

Add the new metadata to lua code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ccca9becbf63cfdc47516023a81b4c29021531ab
---

 modules/lua/libs/input.c |   10 ++++++++++
 modules/lua/libs/sd.c    |   10 ++++++++++
 modules/lua/vlc.c        |   15 ++++++++++-----
 3 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/modules/lua/libs/input.c b/modules/lua/libs/input.c
index 1cceb28..bdffbc9 100644
--- a/modules/lua/libs/input.c
+++ b/modules/lua/libs/input.c
@@ -152,6 +152,11 @@ static int vlclua_input_metas_internal( lua_State *L, input_item_t *p_item )
         PUSH_META( ArtworkURL, "artwork_url" );
         PUSH_META( TrackID, "track_id" );
         PUSH_META( TrackTotal, "track_total" );
+        PUSH_META( Director, "director" );
+        PUSH_META( Season, "season" );
+        PUSH_META( Episode, "episode" );
+        PUSH_META( ShowName, "show_name" );
+        PUSH_META( Actors, "actors" );
 
 #undef PUSH_META
 
@@ -349,6 +354,11 @@ static int vlclua_input_item_set_meta( lua_State *L )
         META_TYPE( ArtworkURL, "artwork_url" )
         META_TYPE( TrackID, "track_id" )
         META_TYPE( TrackTotal, "track_total" )
+        META_TYPE( Director, "director" )
+        META_TYPE( Season, "season" )
+        META_TYPE( Episode, "episode" )
+        META_TYPE( ShowName, "show_name" )
+        META_TYPE( Actors, "actors" )
     };
 #undef META_TYPE
 
diff --git a/modules/lua/libs/sd.c b/modules/lua/libs/sd.c
index fe5ac57..1b54ca6 100644
--- a/modules/lua/libs/sd.c
+++ b/modules/lua/libs/sd.c
@@ -91,6 +91,11 @@ vlclua_item_meta(encodedby, EncodedBy)
 vlclua_item_meta(arturl, ArtworkURL)
 vlclua_item_meta(trackid, TrackID)
 vlclua_item_meta(tracktotal, TrackTotal)
+vlclua_item_meta(director  , Director  )
+vlclua_item_meta(season    , Season    )
+vlclua_item_meta(episode   , Episode   )
+vlclua_item_meta(showname  , ShowName  )
+vlclua_item_meta(actors    , Actors    )
 
 static const luaL_Reg vlclua_item_reg[] = {
     vlclua_item_luareg(title)
@@ -111,6 +116,11 @@ static const luaL_Reg vlclua_item_reg[] = {
     vlclua_item_luareg(arturl)
     vlclua_item_luareg(trackid)
     vlclua_item_luareg(tracktotal)
+    vlclua_item_luareg(director  )
+    vlclua_item_luareg(season    )
+    vlclua_item_luareg(episode   )
+    vlclua_item_luareg(showname  )
+    vlclua_item_luareg(actors    )
     { NULL, NULL }
 };
 
diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c
index 6f9b505..af8d753 100644
--- a/modules/lua/vlc.c
+++ b/modules/lua/vlc.c
@@ -379,12 +379,17 @@ void vlclua_read_meta_data( vlc_object_t *p_this, lua_State *L,
     TRY_META( "date", Date );
     TRY_META( "setting", Setting );
     TRY_META( "url", URL );
-    TRY_META( "language", Language );
+    TRY_META( "language",  Language );
     TRY_META( "nowplaying", NowPlaying );
-    TRY_META( "publisher", Publisher );
-    TRY_META( "encodedby", EncodedBy );
-    TRY_META( "arturl", ArtURL );
-    TRY_META( "trackid", TrackID );
+    TRY_META( "publisher",  Publisher );
+    TRY_META( "encodedby",  EncodedBy );
+    TRY_META( "arturl",     ArtURL );
+    TRY_META( "trackid",    TrackID );
+    TRY_META( "director",   Director );
+    TRY_META( "season",     Season );
+    TRY_META( "episode",    Episode );
+    TRY_META( "show_name",  ShowName );
+    TRY_META( "actors",     Actors );
 }
 
 #undef vlclua_read_custom_meta_data



More information about the vlc-commits mailing list