sintonia/python_apps/pypo/liquidsoap_scripts/liquidsoap_auth.py
James 128a497059 CC-3224: "On-the-fly" stream rebroadcasting
- frond-end implementation for master dj and live dj
- db implementation
- liquidsoap is broken on this commit
2012-03-14 14:41:00 -04:00

27 lines
No EOL
517 B
Python

from api_clients import *
from configobj import ConfigObj
import sys
import json
try:
config = ConfigObj('/etc/airtime/pypo.cfg')
except Exception, e:
print 'error: ', e
sys.exit()
api_clients = api_client.api_client_factory(config)
dj_type = sys.argv[1]
username = sys.argv[2]
password = sys.argv[3]
type = ''
if dj_type == '--master':
type = 'master'
elif dj_type == '--dj':
type = 'dj'
response = api_clients.check_live_stream_auth(username, password, type)
print response['msg']