perform extraction, corruption checks, and transcoding when no server set. Fixes #1183

This commit is contained in:
clinton-hall 2017-02-10 23:12:04 +10:30
commit ad1017712d
2 changed files with 18 additions and 12 deletions

View file

@ -123,14 +123,17 @@ class autoProcessMovie(object):
else:
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)
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)
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
release_id = None
media_id = None