dev #19
@ -180,10 +180,10 @@ if __name__ == "__main__":
|
|||||||
if configGet("post", "mode"):
|
if configGet("post", "mode"):
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
|
|
||||||
if configGet("api_based", "mode"):
|
#if configGet("api_based", "mode"):
|
||||||
token = authorize()
|
# 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:
|
# 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}"})
|
# 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()
|
idle()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user