medialibrary: expose `favorite_only` QueryParameter

Allow favorite only listing on various medialibrary objects.
This commit is contained in:
Alaric Senat 2024-03-27 16:43:27 +01:00 committed by Steve Lhomme
parent bbd81d4cf5
commit 9394e7eace
3 changed files with 4 additions and 0 deletions

View File

@ -442,6 +442,7 @@ typedef struct vlc_ml_query_params_t
uint32_t i_offset;
vlc_ml_sorting_criteria_t i_sort;
bool b_desc;
bool b_favorite_only;
} vlc_ml_query_params_t;
enum vlc_ml_get_queries

View File

@ -251,11 +251,13 @@ static void vlclua_ml_assign_params( lua_State *L, vlc_ml_query_params_t *params
*params = vlc_ml_query_params_create();
if (!lua_istable(L, paramIndex))
return;
lua_getfield(L, 1, "favorite_only" );
lua_getfield(L, 1, "limit" );
lua_getfield(L, 1, "offset" );
lua_getfield(L, 1, "desc" );
lua_getfield(L, 1, "sort" );
lua_getfield(L, 1, "pattern" );
params->b_favorite_only = lua_toboolean( L, -6 );
params->i_nbResults = lua_tointeger( L, -5 );
params->i_offset = lua_tointeger( L, -4 );
params->b_desc = lua_toboolean( L, -3 );

View File

@ -431,6 +431,7 @@ query_params = {
"desc": boolean,
"sort": integer,
"pattern": string,
"favorite_only": boolean,
}
vlc.ml.video(query_params): Get video media list