mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-24 06:55:21 -07:00
Standardize auto-processor signature and imports
This commit is contained in:
parent
08104ed18d
commit
0ab920675c
6 changed files with 137 additions and 20 deletions
|
@ -1,11 +1,33 @@
|
||||||
|
import copy
|
||||||
|
import errno
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
from oauthlib.oauth2 import LegacyApplicationClient
|
||||||
|
from requests_oauthlib import OAuth2Session
|
||||||
|
|
||||||
import core
|
import core
|
||||||
from core import logger
|
from core import logger, transcoder
|
||||||
from core.auto_process.common import ProcessResult
|
from core.auto_process.common import (
|
||||||
|
ProcessResult,
|
||||||
|
command_complete,
|
||||||
|
completed_download_handling,
|
||||||
|
)
|
||||||
|
from core.auto_process.managers.sickbeard import InitSickBeard
|
||||||
|
from core.plugins.downloaders.nzb.utils import report_nzb
|
||||||
|
from core.plugins.subtitles import import_subs, rename_subs
|
||||||
|
from core.scene_exceptions import process_all_exceptions
|
||||||
from core.utils import (
|
from core.utils import (
|
||||||
convert_to_ascii,
|
convert_to_ascii,
|
||||||
|
find_download,
|
||||||
|
find_imdbid,
|
||||||
|
flatten,
|
||||||
|
list_media_files,
|
||||||
remote_dir,
|
remote_dir,
|
||||||
|
remove_dir,
|
||||||
server_responding,
|
server_responding,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -17,11 +39,13 @@ def process(
|
||||||
section,
|
section,
|
||||||
dir_name,
|
dir_name,
|
||||||
input_name=None,
|
input_name=None,
|
||||||
status=0,
|
status: int = 0,
|
||||||
|
failed=False,
|
||||||
client_agent='manual',
|
client_agent='manual',
|
||||||
|
download_id='',
|
||||||
input_category=None,
|
input_category=None,
|
||||||
|
failure_link=None,
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
status = int(status)
|
|
||||||
|
|
||||||
cfg = dict(core.CFG[section][input_category])
|
cfg = dict(core.CFG[section][input_category])
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,36 @@
|
||||||
|
import copy
|
||||||
|
import errno
|
||||||
|
import json
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
from oauthlib.oauth2 import LegacyApplicationClient
|
||||||
|
from requests_oauthlib import OAuth2Session
|
||||||
|
|
||||||
import core
|
import core
|
||||||
from core import logger
|
from core import logger, transcoder
|
||||||
from core.auto_process.common import ProcessResult
|
from core.auto_process.common import (
|
||||||
from core.utils import convert_to_ascii, remote_dir, server_responding
|
ProcessResult,
|
||||||
|
command_complete,
|
||||||
|
completed_download_handling,
|
||||||
|
)
|
||||||
|
from core.auto_process.managers.sickbeard import InitSickBeard
|
||||||
|
from core.plugins.downloaders.nzb.utils import report_nzb
|
||||||
|
from core.plugins.subtitles import import_subs, rename_subs
|
||||||
|
from core.scene_exceptions import process_all_exceptions
|
||||||
|
from core.utils import (
|
||||||
|
convert_to_ascii,
|
||||||
|
find_download,
|
||||||
|
find_imdbid,
|
||||||
|
flatten,
|
||||||
|
list_media_files,
|
||||||
|
remote_dir,
|
||||||
|
remove_dir,
|
||||||
|
server_responding,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
||||||
|
@ -14,9 +39,12 @@ def process(
|
||||||
section,
|
section,
|
||||||
dir_name,
|
dir_name,
|
||||||
input_name=None,
|
input_name=None,
|
||||||
status=0,
|
status: int = 0,
|
||||||
|
failed=False,
|
||||||
client_agent='manual',
|
client_agent='manual',
|
||||||
|
download_id='',
|
||||||
input_category=None,
|
input_category=None,
|
||||||
|
failure_link=None,
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
apc_version = '2.04'
|
apc_version = '2.04'
|
||||||
comicrn_version = '1.01'
|
comicrn_version = '1.01'
|
||||||
|
|
|
@ -1,12 +1,36 @@
|
||||||
|
import copy
|
||||||
|
import errno
|
||||||
|
import json
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
from oauthlib.oauth2 import LegacyApplicationClient
|
||||||
|
from requests_oauthlib import OAuth2Session
|
||||||
|
|
||||||
import core
|
import core
|
||||||
from core import logger
|
from core import logger, transcoder
|
||||||
from core.auto_process.common import ProcessResult
|
from core.auto_process.common import (
|
||||||
from core.utils import convert_to_ascii, server_responding
|
ProcessResult,
|
||||||
|
command_complete,
|
||||||
|
completed_download_handling,
|
||||||
|
)
|
||||||
|
from core.auto_process.managers.sickbeard import InitSickBeard
|
||||||
|
from core.plugins.downloaders.nzb.utils import report_nzb
|
||||||
|
from core.plugins.subtitles import import_subs, rename_subs
|
||||||
|
from core.scene_exceptions import process_all_exceptions
|
||||||
|
from core.utils import (
|
||||||
|
convert_to_ascii,
|
||||||
|
find_download,
|
||||||
|
find_imdbid,
|
||||||
|
flatten,
|
||||||
|
list_media_files,
|
||||||
|
remote_dir,
|
||||||
|
remove_dir,
|
||||||
|
server_responding,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
||||||
|
@ -15,11 +39,13 @@ def process(
|
||||||
section,
|
section,
|
||||||
dir_name,
|
dir_name,
|
||||||
input_name=None,
|
input_name=None,
|
||||||
status=0,
|
status: int = 0,
|
||||||
|
failed=False,
|
||||||
client_agent='manual',
|
client_agent='manual',
|
||||||
|
download_id='',
|
||||||
input_category=None,
|
input_category=None,
|
||||||
|
failure_link=None,
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
status = int(status)
|
|
||||||
|
|
||||||
cfg = dict(core.CFG[section][input_category])
|
cfg = dict(core.CFG[section][input_category])
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
|
import copy
|
||||||
|
import errno
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
from oauthlib.oauth2 import LegacyApplicationClient
|
||||||
|
from requests_oauthlib import OAuth2Session
|
||||||
|
|
||||||
import core
|
import core
|
||||||
from core import logger, transcoder
|
from core import logger, transcoder
|
||||||
|
@ -11,6 +16,7 @@ from core.auto_process.common import (
|
||||||
command_complete,
|
command_complete,
|
||||||
completed_download_handling,
|
completed_download_handling,
|
||||||
)
|
)
|
||||||
|
from core.auto_process.managers.sickbeard import InitSickBeard
|
||||||
from core.plugins.downloaders.nzb.utils import report_nzb
|
from core.plugins.downloaders.nzb.utils import report_nzb
|
||||||
from core.plugins.subtitles import import_subs, rename_subs
|
from core.plugins.subtitles import import_subs, rename_subs
|
||||||
from core.scene_exceptions import process_all_exceptions
|
from core.scene_exceptions import process_all_exceptions
|
||||||
|
@ -18,12 +24,14 @@ from core.utils import (
|
||||||
convert_to_ascii,
|
convert_to_ascii,
|
||||||
find_download,
|
find_download,
|
||||||
find_imdbid,
|
find_imdbid,
|
||||||
|
flatten,
|
||||||
list_media_files,
|
list_media_files,
|
||||||
remote_dir,
|
remote_dir,
|
||||||
remove_dir,
|
remove_dir,
|
||||||
server_responding,
|
server_responding,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,12 +39,14 @@ def process(
|
||||||
section,
|
section,
|
||||||
dir_name,
|
dir_name,
|
||||||
input_name=None,
|
input_name=None,
|
||||||
status=0,
|
status: int = 0,
|
||||||
|
failed=False,
|
||||||
client_agent='manual',
|
client_agent='manual',
|
||||||
download_id='',
|
download_id='',
|
||||||
input_category=None,
|
input_category=None,
|
||||||
failure_link=None,
|
failure_link=None,
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
|
|
||||||
cfg = dict(core.CFG[section][input_category])
|
cfg = dict(core.CFG[section][input_category])
|
||||||
|
|
||||||
host = cfg['host']
|
host = cfg['host']
|
||||||
|
|
|
@ -1,14 +1,36 @@
|
||||||
|
import copy
|
||||||
|
import errno
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
from oauthlib.oauth2 import LegacyApplicationClient
|
||||||
|
from requests_oauthlib import OAuth2Session
|
||||||
|
|
||||||
import core
|
import core
|
||||||
from core import logger
|
from core import logger, transcoder
|
||||||
from core.auto_process.common import command_complete, ProcessResult
|
from core.auto_process.common import (
|
||||||
|
ProcessResult,
|
||||||
|
command_complete,
|
||||||
|
completed_download_handling,
|
||||||
|
)
|
||||||
|
from core.auto_process.managers.sickbeard import InitSickBeard
|
||||||
|
from core.plugins.downloaders.nzb.utils import report_nzb
|
||||||
|
from core.plugins.subtitles import import_subs, rename_subs
|
||||||
from core.scene_exceptions import process_all_exceptions
|
from core.scene_exceptions import process_all_exceptions
|
||||||
from core.utils import convert_to_ascii, list_media_files, remote_dir, remove_dir, server_responding
|
from core.utils import (
|
||||||
|
convert_to_ascii,
|
||||||
|
find_download,
|
||||||
|
find_imdbid,
|
||||||
|
flatten,
|
||||||
|
list_media_files,
|
||||||
|
remote_dir,
|
||||||
|
remove_dir,
|
||||||
|
server_responding,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
||||||
|
@ -17,11 +39,13 @@ def process(
|
||||||
section,
|
section,
|
||||||
dir_name,
|
dir_name,
|
||||||
input_name=None,
|
input_name=None,
|
||||||
status=0,
|
status: int = 0,
|
||||||
|
failed=False,
|
||||||
client_agent='manual',
|
client_agent='manual',
|
||||||
|
download_id='',
|
||||||
input_category=None,
|
input_category=None,
|
||||||
|
failure_link=None,
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
status = int(status)
|
|
||||||
|
|
||||||
cfg = dict(core.CFG[section][input_category])
|
cfg = dict(core.CFG[section][input_category])
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ import copy
|
||||||
import errno
|
import errno
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
@ -21,6 +22,8 @@ from core.plugins.subtitles import import_subs, rename_subs
|
||||||
from core.scene_exceptions import process_all_exceptions
|
from core.scene_exceptions import process_all_exceptions
|
||||||
from core.utils import (
|
from core.utils import (
|
||||||
convert_to_ascii,
|
convert_to_ascii,
|
||||||
|
find_download,
|
||||||
|
find_imdbid,
|
||||||
flatten,
|
flatten,
|
||||||
list_media_files,
|
list_media_files,
|
||||||
remote_dir,
|
remote_dir,
|
||||||
|
@ -36,12 +39,14 @@ def process(
|
||||||
section,
|
section,
|
||||||
dir_name,
|
dir_name,
|
||||||
input_name=None,
|
input_name=None,
|
||||||
|
status: int = 0,
|
||||||
failed=False,
|
failed=False,
|
||||||
client_agent='manual',
|
client_agent='manual',
|
||||||
download_id=None,
|
download_id='',
|
||||||
input_category=None,
|
input_category=None,
|
||||||
failure_link=None,
|
failure_link=None,
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
|
|
||||||
cfg = dict(core.CFG[section][input_category])
|
cfg = dict(core.CFG[section][input_category])
|
||||||
|
|
||||||
host = cfg['host']
|
host = cfg['host']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue