Merge pull request #1019 from codenift/podcast-feed-update
Track Type Default
This commit is contained in:
commit
8498029cd9
8 changed files with 92 additions and 63 deletions
|
@ -442,7 +442,7 @@ class FileDataHelper {
|
|||
$tt = $_COOKIE['tt_upload'];
|
||||
} else {
|
||||
// Use default track type
|
||||
$tt = "MUS";
|
||||
$tt = Application_Model_Preference::GetTrackTypeDefault();
|
||||
}
|
||||
return $tt;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
{
|
||||
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
|
||||
Application_Model_Preference::SetStationDescription($values["stationDescription"]);
|
||||
Application_Model_Preference::SetTrackTypeDefault($values["tracktypeDefault"]);
|
||||
Application_Model_Preference::SetDefaultCrossfadeDuration($values["stationDefaultCrossfadeDuration"]);
|
||||
Application_Model_Preference::SetDefaultFadeIn($values["stationDefaultFadeIn"]);
|
||||
Application_Model_Preference::SetDefaultFadeOut($values["stationDefaultFadeOut"]);
|
||||
|
|
|
@ -100,6 +100,11 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
'value' => $defaultFadeOut,
|
||||
));
|
||||
|
||||
$tracktypeDefault = new Zend_Form_Element_Select("tracktypeDefault");
|
||||
$tracktypeDefault->setLabel(_("Track Type Upload Default"));
|
||||
$tracktypeDefault->setMultiOptions(Application_Model_Library::getTracktypes());
|
||||
$tracktypeDefault->setValue(Application_Model_Preference::GetTrackTypeDefault());
|
||||
$this->addElement($tracktypeDefault);
|
||||
|
||||
// add intro playlist select here
|
||||
$introPlaylistSelect = new Zend_Form_Element_Select("introPlaylistSelect");
|
||||
|
@ -114,8 +119,6 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$outroPlaylistSelect->setValue(Application_Model_Preference::GetOutroPlaylist());
|
||||
$this->addElement($outroPlaylistSelect);
|
||||
|
||||
|
||||
|
||||
$podcast_album_override = new Zend_Form_Element_Radio('podcastAlbumOverride');
|
||||
$podcast_album_override->setLabel(_('Overwrite Podcast Episode Metatags'));
|
||||
$podcast_album_override->setMultiOptions(array(
|
||||
|
|
|
@ -56,4 +56,15 @@ class Application_Model_Library
|
|||
|
||||
return $playlistNames;
|
||||
}
|
||||
|
||||
public static function getTracktypes()
|
||||
{
|
||||
$track_type_options = array(NULL => _("None"));
|
||||
$track_types = Application_Model_Tracktype::getTracktypes();
|
||||
foreach ($track_types as $key => $tt) {
|
||||
$track_type_options[$tt['code']] = $tt['type_name'];
|
||||
}
|
||||
|
||||
return $track_type_options;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -388,6 +388,16 @@ class Application_Model_Preference
|
|||
return $val === '1' ? true : false;
|
||||
}
|
||||
|
||||
public static function SetTrackTypeDefault($tracktype)
|
||||
{
|
||||
self::setValue("tracktype_default", $tracktype);
|
||||
}
|
||||
|
||||
public static function GetTrackTypeDefault()
|
||||
{
|
||||
return self::getValue("tracktype_default");
|
||||
}
|
||||
|
||||
public static function GetIntroPlaylist()
|
||||
{
|
||||
return self::getValue("intro_playlist");
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
<?php echo $this->element->getElement('weekStartDay')->render() ?>
|
||||
|
||||
<?php echo $this->element->getElement('tracktypeDefault')->render() ?>
|
||||
|
||||
<?php echo $this->element->getElement('stationDefaultFadeIn')->render() ?>
|
||||
|
||||
<?php echo $this->element->getElement('stationDefaultFadeOut')->render() ?>
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
if (isset($_COOKIE['tt_upload'])) {
|
||||
$ttsaved = $_COOKIE['tt_upload'];
|
||||
} else {
|
||||
// Use default track type
|
||||
$ttsaved = "MUS";
|
||||
// Use default track type
|
||||
$ttsaved = Application_Model_Preference::GetTrackTypeDefault();
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ time for the convenience of your station staff. You can also set the day of the
|
|||
week that you wish to start your station's weekly schedule on, which defaults
|
||||
to Sunday.
|
||||
|
||||
The **Track Type Default** enables you to select a track type default for uploads.
|
||||
|
||||
Initially, the **Default Fade In** and **Default Fade Out** times for automated
|
||||
fades are set to half a second, and the **Default Crossfade Duration** is set to
|
||||
zero seconds. Custom fade and crossfade times can be set for adjacent items in a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue