liquidsoap_auth.py 420 B

12345678910111213141516171819202122
  1. from api_clients import *
  2. import sys
  3. api_clients = api_client.AirtimeApiClient()
  4. dj_type = sys.argv[1]
  5. username = sys.argv[2]
  6. password = sys.argv[3]
  7. source_type = ''
  8. if dj_type == '--master':
  9. source_type = 'master'
  10. elif dj_type == '--dj':
  11. source_type = 'dj'
  12. response = api_clients.check_live_stream_auth(username, password, source_type)
  13. if 'msg' in response:
  14. print response['msg']
  15. else:
  16. print False