mirror of
https://github.com/karl0ss/bazarr-ai-sub-generator.git
synced 2025-04-26 14:59:21 +01:00
20 lines
468 B
Python
20 lines
468 B
Python
|
import requests
|
||
|
import json
|
||
|
|
||
|
|
||
|
def update_show_in_soarr(show_id):
|
||
|
url = "http://192.168.4.9:8989/api/v3/command"
|
||
|
|
||
|
payload = json.dumps({
|
||
|
"name": "RefreshSeries",
|
||
|
"seriesId": show_id
|
||
|
})
|
||
|
headers = {
|
||
|
'Content-Type': 'application/json',
|
||
|
'X-Api-Key': 'f6ea49a75a44469daec03969bdf6764d',
|
||
|
}
|
||
|
|
||
|
response = requests.request("POST", url, headers=headers, data=payload)
|
||
|
|
||
|
if response.status_code != 404:
|
||
|
print("Updated show in Sonarr")
|