mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 18:47:09 -07:00
Fix PEP8 whitespace violations
This commit is contained in:
parent
e490f97a05
commit
52c6096b6a
14 changed files with 237 additions and 225 deletions
|
@ -26,9 +26,9 @@ class Movie(object):
|
|||
method = cfg["method"]
|
||||
else:
|
||||
method = None
|
||||
#added importMode for Radarr config
|
||||
# added importMode for Radarr config
|
||||
if section == "Radarr":
|
||||
import_mode = cfg.get("importMode","Move")
|
||||
import_mode = cfg.get("importMode", "Move")
|
||||
else:
|
||||
import_mode = None
|
||||
delete_failed = int(cfg["delete_failed"])
|
||||
|
@ -147,7 +147,7 @@ class Movie(object):
|
|||
logger.debug('Renaming: {0} to: {1}'.format(video, video2))
|
||||
os.rename(video, video2)
|
||||
|
||||
if not apikey: #If only using Transcoder functions, exit here.
|
||||
if not apikey: # If only using Transcoder functions, exit here.
|
||||
logger.info('No CouchPotato or Radarr apikey entered. Processing completed.')
|
||||
return [0, "{0}: Successfully post-processed {1}".format(section, input_name)]
|
||||
|
||||
|
@ -170,7 +170,7 @@ class Movie(object):
|
|||
logger.postprocess("Starting {0} scan for {1}".format(method, input_name), section)
|
||||
|
||||
if section == "Radarr":
|
||||
payload = {'name': 'DownloadedMoviesScan', 'path': params['media_folder'], 'downloadClientId': download_id,'importMode' : import_mode}
|
||||
payload = {'name': 'DownloadedMoviesScan', 'path': params['media_folder'], 'downloadClientId': download_id, 'importMode': import_mode}
|
||||
if not download_id:
|
||||
payload.pop("downloadClientId")
|
||||
logger.debug("Opening URL: {0} with PARAMS: {1}".format(base_url, payload), section)
|
||||
|
|
|
@ -61,9 +61,9 @@ class Music(object):
|
|||
core.extract_files(dir_name)
|
||||
input_name, dir_name = convert_to_ascii(input_name, dir_name)
|
||||
|
||||
#if listMediaFiles(dir_name, media=False, audio=True, meta=False, archives=False) and status:
|
||||
# logger.info("Status shown as failed from Downloader, but valid video files found. Setting as successful.", section)
|
||||
# status = 0
|
||||
# if listMediaFiles(dir_name, media=False, audio=True, meta=False, archives=False) and status:
|
||||
# logger.info("Status shown as failed from Downloader, but valid video files found. Setting as successful.", section)
|
||||
# status = 0
|
||||
|
||||
if status == 0 and section == "HeadPhones":
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class TV(object):
|
|||
delete_failed = int(cfg.get("delete_failed", 0))
|
||||
nzb_extraction_by = cfg.get("nzbExtractionBy", "Downloader")
|
||||
process_method = cfg.get("process_method")
|
||||
if client_agent == core.TORRENT_CLIENTAGENT and core.USELINK == "move-sym":
|
||||
if client_agent == core.TORRENT_CLIENTAGENT and core.USELINK == "move-sym":
|
||||
process_method = "symlink"
|
||||
remote_path = int(cfg.get("remote_path", 0))
|
||||
wait_for = int(cfg.get("wait_for", 2))
|
||||
|
@ -56,8 +56,8 @@ class TV(object):
|
|||
extract = 0
|
||||
else:
|
||||
extract = int(cfg.get("extract", 0))
|
||||
#get importmode, default to "Move" for consistency with legacy
|
||||
import_mode = cfg.get("importMode","Move")
|
||||
# get importmode, default to "Move" for consistency with legacy
|
||||
import_mode = cfg.get("importMode", "Move")
|
||||
|
||||
if not os.path.isdir(dir_name) and os.path.isfile(dir_name): # If the input directory is a file, assume single file download and split dir/name.
|
||||
dir_name = os.path.split(os.path.normpath(dir_name))[0]
|
||||
|
@ -256,7 +256,7 @@ class TV(object):
|
|||
if not apikey and username and password:
|
||||
login = "{0}{1}:{2}{3}/login".format(protocol, host, port, web_root)
|
||||
login_params = {'username': username, 'password': password}
|
||||
r = s.get(login, verify=False, timeout=(30,60))
|
||||
r = s.get(login, verify=False, timeout=(30, 60))
|
||||
if r.status_code == 401 and r.cookies.get('_xsrf'):
|
||||
login_params['_xsrf'] = r.cookies.get('_xsrf')
|
||||
s.post(login, data=login_params, stream=True, verify=False, timeout=(30, 60))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue