CC-3449: Live Stream: Kick out live dj at the end of the show

- done
This commit is contained in:
James 2012-03-28 15:12:01 -04:00
parent d12ef1c7a2
commit 4f5d7efaa1
3 changed files with 41 additions and 13 deletions

View file

@ -376,6 +376,7 @@ class PypoFetch(Thread):
def process_schedule(self, schedule_data):
self.logger.debug(schedule_data)
media = schedule_data["media"]
media_filtered = {}
# Download all the media and put playlists in liquidsoap "annotate" format
try:
@ -391,13 +392,14 @@ class PypoFetch(Thread):
for key in media:
media_item = media[key]
fileExt = os.path.splitext(media_item['uri'])[1]
dst = os.path.join(download_dir, media_item['id']+fileExt)
media_item['dst'] = dst
if(media_item['type'] == 'file'):
fileExt = os.path.splitext(media_item['uri'])[1]
dst = os.path.join(download_dir, media_item['id']+fileExt)
media_item['dst'] = dst
media_filtered[key] = media_item
self.media_prepare_queue.put(copy.copy(media))
self.prepare_media(media)
self.media_prepare_queue.put(copy.copy(media_filtered))
self.prepare_media(media_filtered)
except Exception, e: self.logger.error("%s", e)
# Send the data to pypo-push