diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index b4c87d0f9..9f2e3ddb9 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -447,19 +447,22 @@ class Application_Model_Schedule { $con = Propel::getConnection(); $baseQuery = "SELECT st.file_id AS file_id," - ." st.id as id," - ." st.instance_id as instance_id," + ." st.id AS id," + ." st.instance_id AS instance_id," ." st.starts AS start," ." st.ends AS end," ." st.cue_in AS cue_in," ." st.cue_out AS cue_out," ." st.fade_in AS fade_in," ." st.fade_out AS fade_out," - ." si.starts as show_start," - ." si.ends as show_end" - ." FROM $CC_CONFIG[scheduleTable] as st" - ." LEFT JOIN $CC_CONFIG[showInstances] as si" - ." ON st.instance_id = si.id"; + ." si.starts AS show_start," + ." si.ends AS show_end," + ." f.replay_gain AS replay_gain" + ." FROM $CC_CONFIG[scheduleTable] AS st" + ." LEFT JOIN $CC_CONFIG[showInstances] AS si" + ." ON st.instance_id = si.id" + ." LEFT JOIN $CC_CONFIG[filesTable] AS f" + ." ON st.file_id = f.id"; $predicates = " WHERE st.ends > '$p_startTime'" @@ -597,7 +600,8 @@ class Application_Model_Schedule { 'cue_out' => Application_Common_DateHelper::CalculateLengthInSeconds($item["cue_out"]), 'start' => $start, 'end' => Application_Model_Schedule::AirtimeTimeToPypoTime($item["end"]), - 'show_name' => $showName + 'show_name' => $showName, + 'replay_gain' => $item["replay_gain"] ); } diff --git a/install_minimal/upgrades/airtime-2.2.0/TODO b/install_minimal/upgrades/airtime-2.2.0/TODO new file mode 100644 index 000000000..c3dd88296 --- /dev/null +++ b/install_minimal/upgrades/airtime-2.2.0/TODO @@ -0,0 +1,6 @@ +need to install the following packages: + +mp3gain +vorbisgain +flac +vorbis-tools diff --git a/python_apps/pypo/liquidsoap_scripts/ls_script.liq b/python_apps/pypo/liquidsoap_scripts/ls_script.liq index e6a21777d..62e2f0c27 100644 --- a/python_apps/pypo/liquidsoap_scripts/ls_script.liq +++ b/python_apps/pypo/liquidsoap_scripts/ls_script.liq @@ -10,6 +10,7 @@ time = ref string_of(gettimeofday()) queue = audio_to_stereo(id="queue_src", request.equeue(id="queue", length=0.5)) queue = cue_cut(queue) +queue = amplify(1., override="replay_gain", queue) pypo_data = ref '0' web_stream_enabled = ref false diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index 67191f81f..88b9577ca 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -474,9 +474,9 @@ class PypoPush(Thread): self.telnet_lock.release() def create_liquidsoap_annotation(self, media): - # we need lia_start_next value in the annotate. That is the value that controlls overlap duration of crossfade. - return 'annotate:media_id="%s",liq_start_next="0",liq_fade_in="%s",liq_fade_out="%s",liq_cue_in="%s",liq_cue_out="%s",schedule_table_id="%s":%s' \ - % (media['id'], float(media['fade_in']) / 1000, float(media['fade_out']) / 1000, float(media['cue_in']), float(media['cue_out']), media['row_id'], media['dst']) + # We need liq_start_next value in the annotate. That is the value that controls overlap duration of crossfade. + return 'annotate:media_id="%s",liq_start_next="0",liq_fade_in="%s",liq_fade_out="%s",liq_cue_in="%s",liq_cue_out="%s",schedule_table_id="%s",replay_gain="%s dB":%s' \ + % (media['id'], float(media['fade_in']) / 1000, float(media['fade_out']) / 1000, float(media['cue_in']), float(media['cue_out']), media['row_id'], media['replay_gain'], media['dst']) def run(self): try: self.main()