cc-2055: switch to init.d
-Change all python apps to log directly to file -change airtime-pypo to airtime-playback -fix airtime install started/completed message bumpers
This commit is contained in:
parent
c05c2f1e28
commit
79e24e5af5
26 changed files with 75 additions and 269 deletions
|
@ -3,6 +3,7 @@ import sys
|
|||
import time
|
||||
import logging
|
||||
import logging.config
|
||||
import logging.handlers
|
||||
import pickle
|
||||
import telnetlib
|
||||
import calendar
|
||||
|
@ -15,6 +16,7 @@ from util import CueFile
|
|||
|
||||
from configobj import ConfigObj
|
||||
|
||||
|
||||
# configure logging
|
||||
logging.config.fileConfig("logging.cfg")
|
||||
|
||||
|
@ -130,14 +132,19 @@ class PypoPush(Thread):
|
|||
else:
|
||||
pass
|
||||
#logger.debug('Empty schedule')
|
||||
|
||||
if not currently_on_air and self.liquidsoap_state_play:
|
||||
logger.debug('Notifying Liquidsoap to stop playback.')
|
||||
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
||||
tn.write('source.skip\n')
|
||||
tn.write('exit\n')
|
||||
tn.read_all()
|
||||
|
||||
try:
|
||||
if not currently_on_air and self.liquidsoap_state_play:
|
||||
logger.debug('Notifying Liquidsoap to stop playback.')
|
||||
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
||||
tn.write('source.skip\n')
|
||||
tn.write('exit\n')
|
||||
tn.read_all()
|
||||
self.liquidsoap_state_play = False
|
||||
except Exception, e:
|
||||
self.liquidsoap_state_play = False
|
||||
logger.debug('Could not connect to liquidsoap')
|
||||
|
||||
|
||||
def push_liquidsoap(self, pkey, schedule, playlists):
|
||||
logger = logging.getLogger('push')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue