chore(playout): update api-client imports

This commit is contained in:
jo 2022-07-22 13:01:32 +02:00 committed by Kyle Robbertze
parent 8369d55eb9
commit 8cb9bd5f32
10 changed files with 22 additions and 31 deletions

View file

@ -5,7 +5,7 @@ import traceback
from pathlib import Path
from typing import Optional
from libretime_api_client.version1 import AirtimeApiClient
from libretime_api_client.v1 import AirtimeApiClient as ApiClient
from loguru import logger
@ -50,7 +50,7 @@ def generate_entrypoint(log_filepath: Optional[Path]):
while not successful:
try:
ac = AirtimeApiClient(logger)
ac = ApiClient(logger)
ss = ac.get_stream_setting()
generate_liquidsoap_config(ss, log_filepath)
successful = True

View file

@ -1,8 +1,8 @@
import sys
from libretime_api_client import version1 as api_client
from libretime_api_client.v1 import AirtimeApiClient as ApiClient
api_clients = api_client.AirtimeApiClient()
api_client = ApiClient()
dj_type = sys.argv[1]
username = sys.argv[2]
@ -14,7 +14,7 @@ if dj_type == "--master":
elif dj_type == "--dj":
source_type = "dj"
response = api_clients.check_live_stream_auth(username, password, source_type)
response = api_client.check_live_stream_auth(username, password, source_type)
if "msg" in response and response["msg"] == True:
print(response["msg"])