Skip to content

Commit

Permalink
Release v0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
dcampillo committed Nov 6, 2022
1 parent c732ba3 commit 19b0af3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
13 changes: 9 additions & 4 deletions radarr-unmonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
###################################
# Unmonitor Script for Radarr
# Author : MadSurfer
# Date : 04.11.2021
# Version : 0.8
# Date : 06.11.2021
# Version : 0.9
# Description : Automatically unmonitor movie on "Import"
# Release note: Import changes in the configuration of the script!!!
###################################

import logging, json, ssl, re, sys
Expand Down Expand Up @@ -35,7 +36,11 @@ def getMovie(movieID):
return MovieData

def setMonitoring(movieID, MonitoringStatus):
apireq = "{0}/api/v3/movie/{1}?moveFiles=false".format(ARR_HOST, movieID)
if ARR_USE_SSL:
apireq = "https://{host}:{port}/api/v3/movie/{movieid}?moveFiles=false".format(host=ARR_HOST, port=ARR_PORT, movieid=movieID)
else:
apireq = "http://{host}:{port}/api/v3/movie/{movieid}?moveFiles=false".format(host=ARR_HOST, port=ARR_PORT, movieid=movieID)

try:
movieItem = getMovie(movieID)
if movieItem:
Expand Down Expand Up @@ -70,7 +75,7 @@ def main():
if ARR_PORT != "":
print("CONFIG_CHECK: PORT is set!")
else:
sys.stderr.write("CONFIG_CHECK ERROR API_KEY: ARR_PORT '' is a NOT VALID API PORT!")
sys.stderr.write("CONFIG_CHECK ERROR ARR_PORT: ARR_PORT '' is a NOT VALID API PORT!")
sys.exit("CONFIG_CHECK_ERROR")

else:
Expand Down
11 changes: 8 additions & 3 deletions sonarr-unmonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
###################################
# Unmonitor Script for Sonarr
# Author : MadSurfer
# Date : 04.11.2021
# Version : 0.8
# Date : 06.11.2021
# Version : 0.9
# Description : Automatically unmonitor episde on "Import"
# Release note: Import changes in the configuration of the script!!!
###################################

import logging, json, ssl, re, sys
Expand Down Expand Up @@ -34,7 +35,11 @@ def getEpisode(episodeID):
return epData

def setMonitoring(episodeID, MonitorStatus):
apireq = "{0}/api/episode/{1}".format(ARR_HOST, episodeID)
if ARR_USE_SSL:
apireq = "https://{host}:{port}/api/episode/{epid}".format(host=ARR_HOST, port=ARR_PORT, epid=episodeID)
else:
apireq = "http://{host}:{port}/api/episode/{epid}".format(host=ARR_HOST, port=ARR_PORT, epid=episodeID)

try:
episodeInfos = getEpisode(episodeID)
if episodeInfos:
Expand Down

0 comments on commit 19b0af3

Please sign in to comment.