From 13f7c3941d51a9b3b48310b14a830c23be28be09 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Tue, 28 May 2013 16:47:06 -0400 Subject: [PATCH 1/2] update gen-snapshot for 2.4.x git branch --- gen-snapshot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen-snapshot.sh b/gen-snapshot.sh index 41e38cd22..0321a0b67 100755 --- a/gen-snapshot.sh +++ b/gen-snapshot.sh @@ -6,7 +6,7 @@ VERSION=2.4.0~$(date "+%Y%m%d") BUILDDEST=/tmp/airtime-${VERSION}/ DEBDIR=`pwd`/debian -git checkout master +git checkout 2.4.x git pull echo "cleaning up previous build..." From 6fddabdd7c1f12ec7b94dea1246c38d8989bf0ad Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 30 May 2013 14:02:05 -0400 Subject: [PATCH 2/2] CC-5192 Pypo: Live Streaming in first show will block the next show's first track -fixed. Was caused by clashing keys --- python_apps/pypo/pypofetch.py | 8 +++++--- python_apps/pypo/pypoliqqueue.py | 6 ++++-- python_apps/pypo/pypopush.py | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/python_apps/pypo/pypofetch.py b/python_apps/pypo/pypofetch.py index 22455c505..6c3344248 100644 --- a/python_apps/pypo/pypofetch.py +++ b/python_apps/pypo/pypofetch.py @@ -441,9 +441,11 @@ class PypoFetch(Thread): media_item['file_ready'] = False media_filtered[key] = media_item - media_item['start'] = datetime.strptime(media_item['start'], "%Y-%m-%d-%H-%M-%S") - media_item['end'] = datetime.strptime(media_item['end'], "%Y-%m-%d-%H-%M-%S") - media_copy[media_item['start']] = media_item + media_item['start'] = datetime.strptime(media_item['start'], + "%Y-%m-%d-%H-%M-%S") + media_item['end'] = datetime.strptime(media_item['end'], + "%Y-%m-%d-%H-%M-%S") + media_copy[key] = media_item self.media_prepare_queue.put(copy.copy(media_filtered)) diff --git a/python_apps/pypo/pypoliqqueue.py b/python_apps/pypo/pypoliqqueue.py index a5e50831e..8f664c7d7 100644 --- a/python_apps/pypo/pypoliqqueue.py +++ b/python_apps/pypo/pypoliqqueue.py @@ -61,8 +61,10 @@ class PypoLiqQueue(Thread): schedule_deque.append(media_schedule[i]) if len(keys): - time_until_next_play = self.date_interval_to_seconds(\ - keys[0] - datetime.utcnow()) + time_until_next_play = self.date_interval_to_seconds( + media_schedule[keys[0]]['start'] - + datetime.utcnow()) + else: time_until_next_play = None diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index d032ac3c6..071936a68 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -110,7 +110,7 @@ class PypoPush(Thread): if diff_sec >= 0: present.append(media_item) else: - future[media_item['start']] = media_item + future[mkey] = media_item return present, future