From e0402c88cf8bc9d24460af93d4a32299e693c7ab Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 22 Oct 2012 15:20:03 -0400 Subject: [PATCH 1/5] cc-4613: fixed --- airtime_mvc/application/models/Show.php | 2 +- airtime_mvc/application/models/ShowInstance.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 0006057f7..41ffbeefd 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1792,7 +1792,7 @@ SQL; $show["instance_id"]); $options["show_empty"] = (array_key_exists($show['instance_id'], - $content_count)) ? 1 : 0; + $content_count)) ? 0 : 1; $events[] = &self::makeFullCalendarEvent($show, $options, $startsDT, $endsDT, $startsEpochStr, $endsEpochStr); diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php index a73d1f7f0..3d1d1d055 100644 --- a/airtime_mvc/application/models/ShowInstance.php +++ b/airtime_mvc/application/models/ShowInstance.php @@ -681,7 +681,7 @@ SQL; return $counts; - } + } public function showEmpty() { From feac48a0035326ce1b8c0d8a8ed415b980e89043 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 22 Oct 2012 15:34:33 -0400 Subject: [PATCH 2/5] cc-4613: fixed --- airtime_mvc/application/models/Show.php | 2 ++ airtime_mvc/application/models/ShowInstance.php | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 41ffbeefd..5fce268c6 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1747,6 +1747,8 @@ SQL; $p_start, $p_end); $timezone = date_default_timezone_get(); + Logging::info( $content_count ); + foreach ($shows as $show) { $options = array(); diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php index 3d1d1d055..b6930766d 100644 --- a/airtime_mvc/application/models/ShowInstance.php +++ b/airtime_mvc/application/models/ShowInstance.php @@ -679,7 +679,12 @@ SQL; ':p_end' => $p_end->format("Y-m-d G:i:s")) , 'all'); - return $counts; + + $real_counts = array(); + foreach ($counts as $c) { + $real_counts[$c['instance_id']] = $c['instance_count']; + } + return $real_counts; } From b7b849a48f71848c6c7ea447cfbb60d89d0b3162 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 22 Oct 2012 15:35:01 -0400 Subject: [PATCH 3/5] CC-4612: Create index for cc_schedule during upgrade to improve the performance when cc_schedule's getting bigger - fixed --- install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql b/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql index 36b4f5734..771c3b13c 100644 --- a/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql +++ b/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql @@ -140,6 +140,12 @@ ALTER TABLE cc_playlistcontents ALTER TABLE cc_schedule ADD COLUMN stream_id integer; +CREATE INDEX cc_schedule_instance_id_idx + ON cc_schedule + USING btree + (instance_id); + + ALTER TABLE cc_subjs ADD COLUMN cell_phone character varying(255); From abf4319d67bc49eaf5fc9f20edc4fc19bbc0a9ec Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 22 Oct 2012 15:55:24 -0400 Subject: [PATCH 4/5] Removed logging --- airtime_mvc/application/models/Show.php | 2 -- airtime_mvc/application/models/ShowInstance.php | 1 - 2 files changed, 3 deletions(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 5fce268c6..41ffbeefd 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1747,8 +1747,6 @@ SQL; $p_start, $p_end); $timezone = date_default_timezone_get(); - Logging::info( $content_count ); - foreach ($shows as $show) { $options = array(); diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php index b6930766d..533118c29 100644 --- a/airtime_mvc/application/models/ShowInstance.php +++ b/airtime_mvc/application/models/ShowInstance.php @@ -679,7 +679,6 @@ SQL; ':p_end' => $p_end->format("Y-m-d G:i:s")) , 'all'); - $real_counts = array(); foreach ($counts as $c) { $real_counts[$c['instance_id']] = $c['instance_count']; From 780a05c2aa4121b2c5e2beb49ad50e1184c29949 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Mon, 22 Oct 2012 16:23:33 -0400 Subject: [PATCH 5/5] CC-2236: Overbooked shows do not respect default fade time -once a release we manage to break fades :) fixed. --- python_apps/pypo/liquidsoap_scripts/ls_lib.liq | 2 +- python_apps/pypo/liquidsoap_scripts/ls_script.liq | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq b/python_apps/pypo/liquidsoap_scripts/ls_lib.liq index 9e7903751..5c5919e2e 100644 --- a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq +++ b/python_apps/pypo/liquidsoap_scripts/ls_lib.liq @@ -27,7 +27,7 @@ def append_title(m) = end end -def crossfade(s) +def crossfade_airtime(s) #duration is automatically overwritten by metadata fields passed in #with audio s = fade.in(type="log", duration=0., s) diff --git a/python_apps/pypo/liquidsoap_scripts/ls_script.liq b/python_apps/pypo/liquidsoap_scripts/ls_script.liq index 7a6d8c61d..2c1ef9dee 100644 --- a/python_apps/pypo/liquidsoap_scripts/ls_script.liq +++ b/python_apps/pypo/liquidsoap_scripts/ls_script.liq @@ -44,9 +44,9 @@ web_stream = on_metadata(notify_stream, web_stream) output.dummy(fallible=true, web_stream) queue = on_metadata(notify, queue) -queue = map_metadata(update=false, append_title, queue) +queue = map_metadata(update=true, append_title, queue) # the crossfade function controls fade in/out -queue = crossfade(queue) +queue = crossfade_airtime(queue) output.dummy(fallible=true, queue)