Skip to content

Commit 2f6edf1

Browse files
committed
fix no default playlist in player setting it to 0
1 parent 523c0e2 commit 2f6edf1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

controllers/players.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function save()
117117

118118
$data['timezone'] = trim($this->data('timezone'));
119119
$data['station_id_image_duration'] = trim($this->data('station_id_image_duration'));
120-
$data['default_playlist_id'] = $this->data('default_playlist');
120+
$data['default_playlist_id'] = $this->data('default_playlist') ?: null;
121121

122122
$data['parent_player_id'] = $this->data('parent_player_id');
123123
if (!empty($data['parent_player_id'])) {

models/players_model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public function save($data, $id = false)
322322

323323
$station_id_data['player_id'] = $id;
324324
if ($station_ids !== false) {
325-
// delete all station IDs for this player.
325+
// delete all station IDs for this player.
326326
$this->db->where('player_id', $id);
327327
$this->db->delete('players_station_ids');
328328

0 commit comments

Comments
 (0)