CC-2706: Streams should have a username field
- adding "User" field on stream setting form - change key name from "output_s1" to "s1_output" format to be consistent - changed order of inserting in default.sql file - hiding username field on shoutcast selection - liquidsoap and pypo takes care of user field input
This commit is contained in:
parent
9eb21cb327
commit
58837ff89b
8 changed files with 136 additions and 89 deletions
|
@ -139,25 +139,22 @@ class PypoFetch(Thread):
|
|||
|
||||
# look for changes
|
||||
for s in setting:
|
||||
if "output_" in s[u'keyname'] and s[u'keyname'] != "output_icecast_vorbis_metadata" and s[u'keyname'] != "output_sound_device":
|
||||
if "output_sound_device" in s[u'keyname']:
|
||||
dump, stream = s[u'keyname'].split('_', 1)
|
||||
state_change_restart[stream] = False
|
||||
# This is the case where restart is required no matter what
|
||||
if (existing[s[u'keyname']] != s[u'value']):
|
||||
logger.info("'Need-to-restart' state detected for %s...", s[u'keyname'])
|
||||
restart = True;
|
||||
# This is the case where we need further checking
|
||||
if s[u'value'] != 'disabled':
|
||||
state_change_restart[stream] = True
|
||||
else:
|
||||
if s[u'keyname'] == "output_sound_device":
|
||||
dump, stream = s[u'keyname'].split('_',1)
|
||||
state_change_restart[stream] = False
|
||||
if not (s[u'value'] == existing[s[u'keyname']]):
|
||||
stream, dump = s[u'keyname'].split('_',1)
|
||||
if "_output" in s[u'keyname']:
|
||||
if (existing[s[u'keyname']] != s[u'value']):
|
||||
logger.info("'Need-to-restart' state detected for %s...", s[u'keyname'])
|
||||
restart = True;
|
||||
elif ( s[u'value'] != 'disabled'):
|
||||
state_change_restart[stream] = True
|
||||
elif s[u'keyname'] != "output_icecast_vorbis_metadata" and s[u'keyname'] != "log_file":
|
||||
stream, dump = s[u'keyname'].split('_',1)
|
||||
else:
|
||||
# setting inital value
|
||||
if stream not in change:
|
||||
change[stream] = False
|
||||
|
@ -195,6 +192,8 @@ class PypoFetch(Thread):
|
|||
buffer += temp
|
||||
buffer += "\n"
|
||||
fh.write(buffer)
|
||||
fh.write("output_icecast_vorbis_metadata = false\n");
|
||||
fh.write("log_file = \"/var/log/airtime/pypo-liquidsoap/<script>.log\"\n");
|
||||
fh.close()
|
||||
# restarting pypo.
|
||||
# we could just restart liquidsoap but it take more time somehow.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue