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..." 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