mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 05:13:16 -07:00
PEP8: Fix formatting
* Remove redundant backslash between brackets * Fix multiple statements on one line * Fix missing/excess whitespace * Fix comments not starting with a single # and a space * Convert tabs to spaces * Use triple-quoted docstring
This commit is contained in:
parent
81ffe0456d
commit
8cd0e76ef8
35 changed files with 1342 additions and 947 deletions
|
@ -6,12 +6,14 @@ from core.transcoder import transcoder
|
|||
from core.nzbToMediaUtil import import_subs, listMediaFiles, rmDir
|
||||
from core import logger
|
||||
|
||||
|
||||
def external_script(outputDestination, torrentName, torrentLabel, settings):
|
||||
final_result = 0 # start at 0.
|
||||
num_files = 0
|
||||
try:
|
||||
core.USER_SCRIPT_MEDIAEXTENSIONS = settings["user_script_mediaExtensions"]
|
||||
if isinstance(core.USER_SCRIPT_MEDIAEXTENSIONS, str): core.USER_SCRIPT_MEDIAEXTENSIONS = core.USER_SCRIPT_MEDIAEXTENSIONS.split(',')
|
||||
if isinstance(core.USER_SCRIPT_MEDIAEXTENSIONS, str):
|
||||
core.USER_SCRIPT_MEDIAEXTENSIONS = core.USER_SCRIPT_MEDIAEXTENSIONS.split(',')
|
||||
except:
|
||||
core.USER_SCRIPT_MEDIAEXTENSIONS = []
|
||||
try:
|
||||
|
@ -22,12 +24,14 @@ def external_script(outputDestination, torrentName, torrentLabel, settings):
|
|||
return [0, ""]
|
||||
try:
|
||||
core.USER_SCRIPT_PARAM = settings["user_script_param"]
|
||||
if isinstance(core.USER_SCRIPT_PARAM, str): core.USER_SCRIPT_PARAM = core.USER_SCRIPT_PARAM.split(',')
|
||||
if isinstance(core.USER_SCRIPT_PARAM, str):
|
||||
core.USER_SCRIPT_PARAM = core.USER_SCRIPT_PARAM.split(',')
|
||||
except:
|
||||
core.USER_SCRIPT_PARAM = []
|
||||
try:
|
||||
core.USER_SCRIPT_SUCCESSCODES = settings["user_script_successCodes"]
|
||||
if isinstance(core.USER_SCRIPT_SUCCESSCODES, str): core.USER_SCRIPT_SUCCESSCODES = core.USER_SCRIPT_SUCCESSCODES.split(',')
|
||||
if isinstance(core.USER_SCRIPT_SUCCESSCODES, str):
|
||||
core.USER_SCRIPT_SUCCESSCODES = core.USER_SCRIPT_SUCCESSCODES.split(',')
|
||||
except:
|
||||
core.USER_SCRIPT_SUCCESSCODES = 0
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue