mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
perform extraction, corruption checks, and transcoding when no server set. Fixes #1183
This commit is contained in:
parent
a7fcb7be9e
commit
ad1017712d
2 changed files with 18 additions and 12 deletions
|
@ -123,14 +123,17 @@ class autoProcessMovie(object):
|
||||||
else:
|
else:
|
||||||
extract = int(cfg.get("extract", 0))
|
extract = int(cfg.get("extract", 0))
|
||||||
|
|
||||||
|
imdbid = find_imdbid(dirName, inputName)
|
||||||
baseURL = "{0}{1}:{2}{3}/api/{4}".format(protocol, host, port, web_root, apikey)
|
baseURL = "{0}{1}:{2}{3}/api/{4}".format(protocol, host, port, web_root, apikey)
|
||||||
if not server_responding(baseURL):
|
if not apikey:
|
||||||
|
logger.info('No CouchPotato apikey entered. Performing transcoder functions only')
|
||||||
|
release = None
|
||||||
|
elif server_responding(baseURL):
|
||||||
|
release = self.get_release(baseURL, imdbid, download_id)
|
||||||
|
else:
|
||||||
logger.error("Server did not respond. Exiting", section)
|
logger.error("Server did not respond. Exiting", section)
|
||||||
return [1, "{0}: Failed to post-process - {1} did not respond.".format(section, section)]
|
return [1, "{0}: Failed to post-process - {1} did not respond.".format(section, section)]
|
||||||
|
|
||||||
imdbid = find_imdbid(dirName, inputName)
|
|
||||||
release = self.get_release(baseURL, imdbid, download_id)
|
|
||||||
|
|
||||||
# pull info from release found if available
|
# pull info from release found if available
|
||||||
release_id = None
|
release_id = None
|
||||||
media_id = None
|
media_id = None
|
||||||
|
|
|
@ -60,17 +60,20 @@ class autoProcessTV(object):
|
||||||
ssl = int(cfg.get("ssl", 0))
|
ssl = int(cfg.get("ssl", 0))
|
||||||
web_root = cfg.get("web_root", "")
|
web_root = cfg.get("web_root", "")
|
||||||
protocol = "https://" if ssl else "http://"
|
protocol = "https://" if ssl else "http://"
|
||||||
|
|
||||||
if not server_responding("{0}{1}:{2}{3}".format(protocol, host, port, web_root)):
|
|
||||||
logger.error("Server did not respond. Exiting", section)
|
|
||||||
return [1, "{0}: Failed to post-process - {1} did not respond.".format(section, section)]
|
|
||||||
|
|
||||||
# auto-detect correct fork
|
|
||||||
fork, fork_params = autoFork(section, inputCategory)
|
|
||||||
|
|
||||||
username = cfg.get("username", "")
|
username = cfg.get("username", "")
|
||||||
password = cfg.get("password", "")
|
password = cfg.get("password", "")
|
||||||
apikey = cfg.get("apikey", "")
|
apikey = cfg.get("apikey", "")
|
||||||
|
|
||||||
|
if not username and not apikey:
|
||||||
|
logger.info('No SickBeard username or Sonarr apikey entered. Performing transcoder functions only')
|
||||||
|
fork, fork_params = "None", []
|
||||||
|
elif server_responding("{0}{1}:{2}{3}".format(protocol, host, port, web_root)):
|
||||||
|
# auto-detect correct fork
|
||||||
|
fork, fork_params = autoFork(section, inputCategory)
|
||||||
|
else:
|
||||||
|
logger.error("Server did not respond. Exiting", section)
|
||||||
|
return [1, "{0}: Failed to post-process - {1} did not respond.".format(section, section)]
|
||||||
|
|
||||||
delete_failed = int(cfg.get("delete_failed", 0))
|
delete_failed = int(cfg.get("delete_failed", 0))
|
||||||
nzbExtractionBy = cfg.get("nzbExtractionBy", "Downloader")
|
nzbExtractionBy = cfg.get("nzbExtractionBy", "Downloader")
|
||||||
process_method = cfg.get("process_method")
|
process_method = cfg.get("process_method")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue