Commit d9322881 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

lua: Expose extra meta through vlc.item.metas.

parent bd26b2c1
......@@ -151,6 +151,21 @@ static int vlclua_input_metas_internal( lua_State *L, input_item_t *p_item )
#undef PUSH_META
vlc_mutex_lock(&p_item->lock);
if (p_item->p_meta) {
char ** names = vlc_meta_CopyExtraNames(p_item->p_meta);
for(int i = 0; names[i]; i++)
{
const char *meta = vlc_meta_GetExtra(p_item->p_meta, names[i]);
lua_pushstring( L, meta );
lua_setfield( L, -2, names[i] );
printf("setting %s=%s\n", names[i], meta);
free(names[i]);
}
free(names);
}
vlc_mutex_unlock(&p_item->lock);
return 1;
}
......
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