controllers / playlist.php
Playlist
Controller
The playlist controller manages all playlists on the server, including dynamic selections.
public
delete
(
)
public
delete
(
)
Delete a playlist. Requires the usual 'user_can_edit()' permissions.
id |
An array of playlist IDs. Can be a single ID. |
public
get
(
)
public
get
(
)
Get a single playlist. Only get the advanced permissions if the user has the 'playlists_advanced_permissions' permission.
id |
playlist
public
save
(
)
public
save
(
)
Edit a playlist. Requires 'manage_playlists' or 'create_own_playlists' permission when creating new playlists, and the usual permissions from 'user_can_edit()' for editing.
id |
ID of the playlist. Optional, not provided when creating a new playlist. |
name |
|
description |
|
status |
Visibility: private, visible, or public. |
type |
Standard, advanced, or liveassist. |
items |
|
liveassist_button_items |
id
public
search
(
)
public
search
(
)
Playlist search.
q |
Query |
l |
Limit |
o |
Offset |
sort_by |
|
sort_dir |
|
my |
Ownership. Set to filter for playlists owned by user. |
[num_results, playlists]
private
user_can_edit
(
playlist
)
private
user_can_edit
(
playlist
)
Checks if the current user can edit playlists. Private method used by many other playlist management methods in this controller.
The rules are as follows: If the user has the 'manage_playlists' permission, return TRUE. If the player owns the playlist AND the user has the 'create_own_playlists' permission, return TRUE. If the user is in the permissions array for this playlist, return TRUE. If the user is in a group that is in the group permissions array for this playlist, return TRUE. Otherwise, return FALSE.
playlist |
can_edit
public
validate_dynamic_properties
(
)
public
validate_dynamic_properties
(
)
Validate dynamic selection and provide running estimate.
search_query |
|
num_items |
|
num_items_all |
Boolean set to TRUE to use all items. Overrides num_items. |
image_duration |
Duration static images are displayed in seconds. |
[duration]