models / players_model.php
PlayersModel
Model
Manages players that play the content managed on the server.
public
delete
(
id
)
public
delete
(
id
)
Delete a player.
id |
public
delete_check_permission
(
id
)
public
delete_check_permission
(
id
)
Validate whether it is possible to delete a player. Return FALSE in cases where a player has emergency broadcast content associated with it, or schedule data that the current user has no permission to delete.
id |
is_deletable
public
get
(
params
)
public
get
(
params
)
Retrieve players filtered by parameters.
params |
Filters used when selecting players. See controller for specifics. |
players
public
get_all
(
)
public
get_all
(
)
Retrieve all players.
players
public
get_one
(
id
)
public
get_one
(
id
)
Retrieve data from a single player. ID passed as parameter, rather than in a data array. Also includes all station IDs for that player.
id |
player
public
get_station_ids
(
id
)
public
get_station_ids
(
id
)
Get station IDs for a player. ID passed as single parameter, not in data array.
id |
media_ids
public
monitor_csv
(
results
)
public
monitor_csv
(
results
)
Convert monitor results into CSV format.
results |
csv
public
monitor_search
(
params
)
public
monitor_search
(
params
)
Search the player monitor log.
params |
[results, numrows]
public
now_playing
(
player_id
)
public
now_playing
(
player_id
)
Return what's currently playing on a player.
id |
[show_name, show_time_left, media]
public
player_is_parent
(
id
)
public
player_is_parent
(
id
)
Check whether the player is a parent of any other players.
id |
is_parent
public
save
(
data, id=false
)
public
save
(
data, id=false
)
Insert or update a player.
data |
|
id |
id
public
station_id_average_duration
(
)
public
station_id_average_duration
(
)
Very unintelligently guess at a station ID duration. Since this is used in playlists which are not tied to a player, and since station ID durations can vary considerably, this is probably going to be a pretty terrible estimate.
duration
public
update_location
(
id, longitude, latitude
)
public
update_location
(
id, longitude, latitude
)
Update player location.
id |
|
longitude |
|
latitude |
public
update_version
(
id, version
)
public
update_version
(
id, version
)
Update player version.
id |
|
version |
public
validate
(
data, id=false
)
public
validate
(
data, id=false
)
Validate data for updating/insert a player.
data |
Data array. See controller for details. |
id |
player ID. FALSE when inserting a new player. |
[status, msg]