common/playlist: add playlist_set_params function
Helper function to set file local options for all entries. Will be used in the next commit.
This commit is contained in:
1 parent
8c67647b50
commit
97db44f89f
2 files changed
+11
No files matched your search
@@ -52,6 +52,15 @@ void playlist_entry_add_params(struct playlist_entry *e,
|
||||
playlist_entry_add_param(e, params[n].name, params[n].value);
|
||||
}
|
||||
|
||||
void playlist_set_params(struct playlist *pl, struct playlist_param *params,
|
||||
int num_params)
|
||||
{
|
||||
for (int n = 0; n < pl->num_entries; n++) {
|
||||
pl->entries[n]->num_params = 0;
|
||||
playlist_entry_add_params(pl->entries[n], params, num_params);
|
||||
}
|
||||
}
|
||||
|
||||
static void playlist_update_indexes(struct playlist *pl, int start, int end)
|
||||
{
|
||||
start = MPMAX(start, 0);
|
||||
|
||||
@@ -84,6 +84,8 @@ void playlist_entry_add_param(struct playlist_entry *e, bstr name, bstr value);
|
||||
void playlist_entry_add_params(struct playlist_entry *e,
|
||||
struct playlist_param *params,
|
||||
int params_count);
|
||||
void playlist_set_params(struct playlist *pl, struct playlist_param *params,
|
||||
int num_params);
|
||||
|
||||
struct playlist_entry *playlist_entry_new(const char *filename);
|
||||
|
||||
|
||||
Reference in new issue
Block a user