dev #19
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user