CC-1469:
Crossfading support (non-equal power) -initial commit
This commit is contained in:
parent
e68e6d9160
commit
91d1243554
7 changed files with 463 additions and 65 deletions
|
@ -7,16 +7,16 @@ import logging.config
|
|||
import json
|
||||
import telnetlib
|
||||
import copy
|
||||
from threading import Thread
|
||||
import subprocess
|
||||
import datetime
|
||||
|
||||
from Queue import Empty
|
||||
from threading import Thread
|
||||
from subprocess import Popen, PIPE
|
||||
from configobj import ConfigObj
|
||||
|
||||
from api_clients import api_client
|
||||
from std_err_override import LogWriter
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
from configobj import ConfigObj
|
||||
|
||||
# configure logging
|
||||
logging_cfg = os.path.join(os.path.dirname(__file__), "logging.cfg")
|
||||
|
@ -481,6 +481,7 @@ class PypoFetch(Thread):
|
|||
except Exception, e:
|
||||
pass
|
||||
|
||||
media_copy = {}
|
||||
for key in media:
|
||||
media_item = media[key]
|
||||
if (media_item['type'] == 'file'):
|
||||
|
@ -490,12 +491,17 @@ 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
|
||||
|
||||
|
||||
self.media_prepare_queue.put(copy.copy(media_filtered))
|
||||
except Exception, e: self.logger.error("%s", e)
|
||||
|
||||
# Send the data to pypo-push
|
||||
self.logger.debug("Pushing to pypo-push")
|
||||
self.push_queue.put(media)
|
||||
self.push_queue.put(media_copy)
|
||||
|
||||
|
||||
# cleanup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue