Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #title = show title
- #season = season #
- #fileNameBase is file name without path
- #dbName is your tdarr database name
- #adjust arrayOrPath to path name of fileNameBase
- tdarr_url = "http://192.168.1.122:8266/api/v2/scan-files"
- payload = {"data": {"scanConfig": { "dbID": dbName, "arrayOrPath": ["/media/TVShows/" + title + "/Season " + season + "/" + fileNameBase[:-3] + '.mkv'], "mode": "scanFolderWatcher"}}}
- headers = {"content-type": "application/json"}
- response = requests.post(tdarr_url, json=payload, headers=headers)
Advertisement
Add Comment
Please, Sign In to add comment