models / playlists_model.php
PlaylistsModel
Model
Manages playlist data, dynamic selections, their permissions, and LiveAssist items.
public
delete
(
id
)
public
delete
(
id
)
Delete playlist, associated items, and scheduled content.
id |
public
delete_items
(
playlist_id
)
public
delete_items
(
playlist_id
)
Delete playlist items associated with playlist.
playlist_id |
public
dynamic_selection_duration
(
search_query, num_items, image_duration
)
public
dynamic_selection_duration
(
search_query, num_items, image_duration
)
Figure out the dynamic selection duration. An estimate unless all items are selected.
search_query |
|
num_items |
|
image_duration |
duration
public
get_by_id
(
id
)
public
get_by_id
(
id
)
Get a playlist.
id |
playlist
public
get_items
(
id
)
public
get_items
(
id
)
Get detailed media items for a playlist ID.
id |
playlist_items
public
get_liveassist_items
(
id
)
public
get_liveassist_items
(
id
)
Get LiveAssist buttons associated with a playlist.
id |
liveassist_buttons
public
get_permissions
(
playlist_id
)
public
get_permissions
(
playlist_id
)
Get the user and group permissions for a specified playlist.
playlist_id |
[groups, users]
public
insert
(
data
)
public
insert
(
data
)
Insert a playlist.
data |
public
resolve
(
playlist_id, player_id, parent_player_id = false, start_time = null, max_duration = null
)
public
resolve
(
playlist_id, player_id, parent_player_id = false, start_time = null, max_duration = null
)
Resolve playlist to create a set of media items only from variable/dynamic data.
playlist_id |
|
player_id |
|
parent_player_id |
|
start_time |
Datetime object |
public
search
(
query, limit, offset, sort_by, sort_dir, my=false
)
public
search
(
query, limit, offset, sort_by, sort_dir, my=false
)
Search for playlists.
query, |
|
limit |
|
offset |
|
sort_by |
|
sort_dir |
|
my |
Limit results to currently logged in user. Default FALSE. |
[num_results, playlists]
public
update
(
data
)
public
update
(
data
)
Update a playlist.
data |
public
update_liveassist_items
(
playlist_id, items
)
public
update_liveassist_items
(
playlist_id, items
)
Update the LiveAssist buttons using a specific playlist.
playlist_id |
|
items |
public
update_permissions_groups
(
playlist_id, group_ids
)
public
update_permissions_groups
(
playlist_id, group_ids
)
Update the groups who have permissions for a specified playlist.
playlist_id |
|
group_ids |
public
update_permissions_users
(
playlist_id, user_ids
)
public
update_permissions_users
(
playlist_id, user_ids
)
Update the users who have permissions for a specified playlist.
playlist_id |
|
user_ids |
public
validate_dynamic_properties
(
search_query, num_items, num_items_all, image_duration
)
public
validate_dynamic_properties
(
search_query, num_items, num_items_all, image_duration
)
Validate dynamic properties.
search_query |
|
num_items |
|
num_items_all |
Boolean set to TRUE to use all items. Overrides num_items. |
image_duration |
[is_valid, msg]
public
validate_liveassist_button_item
(
playlist_id
)
public
validate_liveassist_button_item
(
playlist_id
)
Validate that a LiveAssist button's playlist ID exists.
playlist_id |
[exists, msg]
public
validate_playlist
(
data
)
public
validate_playlist
(
data
)
Validate a playlist.
data |
is_valid
public
validate_playlist_item
(
item, playlist_id = null
)
public
validate_playlist_item
(
item, playlist_id = null
)
Validate a single playlist item.
item |
|
playlist_id |
Set if validating an existing playlist. Default NULL. |
is_valid
public
where_used
(
id
)
public
where_used
(
id
)
Provide information about where a playlist is used. This includes player schedules, default playlists, and LiveAssist buttons.
id |
[used, id, can_delate]