mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-13 04:36:41 +00:00
#1094 -- Better filtering of non-duplicated values during station cloning.
This commit is contained in:
parent
981a09483d
commit
fefbb5d573
|
@ -165,7 +165,19 @@ class StationsController
|
||||||
$new_record_data['name'] = $data['name'];
|
$new_record_data['name'] = $data['name'];
|
||||||
$new_record_data['description'] = $data['description'];
|
$new_record_data['description'] = $data['description'];
|
||||||
|
|
||||||
unset($new_record_data['short_name'], $new_record_data['radio_base_dir']);
|
$unset_values = [
|
||||||
|
'short_name',
|
||||||
|
'radio_base_dir',
|
||||||
|
'nowplaying',
|
||||||
|
'nowplaying_timestamp',
|
||||||
|
'is_streamer_live',
|
||||||
|
'needs_restart',
|
||||||
|
'has_started',
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach($unset_values as $unset_value) {
|
||||||
|
unset($new_record_data[$unset_value]);
|
||||||
|
}
|
||||||
|
|
||||||
if ($data['clone_media'] === 'share') {
|
if ($data['clone_media'] === 'share') {
|
||||||
$new_record_data['radio_media_dir'] = $record->getRadioMediaDir();
|
$new_record_data['radio_media_dir'] = $record->getRadioMediaDir();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user