Temporarily disabled album creation on start

This commit is contained in:
Profitroll 2023-02-24 13:25:57 -05:00
parent c7228a006b
commit c27b1c5a5b

View File

@ -180,10 +180,10 @@ if __name__ == "__main__":
if configGet("post", "mode"):
scheduler.start()
if configGet("api_based", "mode"):
token = authorize()
if len(get(f'{configGet("address", "posting", "api")}/albums?q={configGet("queue", "posting", "api", "albums")}', headers={"Authorization": f"Bearer {token}"}).json()["results"]) == 0:
post(f'{configGet("address", "posting", "api")}/albums?name={configGet("queue", "posting", "api", "albums")}&title={configGet("queue", "posting", "api", "albums")}', headers={"Authorization": f"Bearer {token}"})
#if configGet("api_based", "mode"):
# token = await authorize()
# if len(get(f'{configGet("address", "posting", "api")}/albums?q={configGet("queue", "posting", "api", "albums")}', headers={"Authorization": f"Bearer {token}"}).json()["results"]) == 0:
# post(f'{configGet("address", "posting", "api")}/albums?name={configGet("queue", "posting", "api", "albums")}&title={configGet("queue", "posting", "api", "albums")}', headers={"Authorization": f"Bearer {token}"})
idle()