mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 22:03:13 -07:00
parent
87da2d9811
commit
149484ff0a
4 changed files with 0 additions and 45 deletions
|
@ -70,14 +70,6 @@ def process_torrent(input_directory, input_name, input_category, input_hash, inp
|
|||
input_category = 'UNCAT'
|
||||
|
||||
usercat = input_category
|
||||
# try:
|
||||
# input_name = input_name.encode(core.SYS_ENCODING)
|
||||
# except UnicodeError:
|
||||
# pass
|
||||
# try:
|
||||
# input_directory = input_directory.encode(core.SYS_ENCODING)
|
||||
# except UnicodeError:
|
||||
# pass
|
||||
|
||||
logger.debug('Determined Directory: {0} | Name: {1} | Category: {2}'.format
|
||||
(input_directory, input_name, input_category))
|
||||
|
@ -135,10 +127,6 @@ def process_torrent(input_directory, input_name, input_category, input_hash, inp
|
|||
else:
|
||||
output_destination = os.path.normpath(
|
||||
core.os.path.join(core.OUTPUT_DIRECTORY, input_category))
|
||||
# try:
|
||||
# output_destination = output_destination.encode(core.SYS_ENCODING)
|
||||
# except UnicodeError:
|
||||
# pass
|
||||
|
||||
if output_destination in input_directory:
|
||||
output_destination = input_directory
|
||||
|
@ -180,10 +168,6 @@ def process_torrent(input_directory, input_name, input_category, input_hash, inp
|
|||
core.os.path.join(output_destination, os.path.basename(file_path)), full_file_name)
|
||||
logger.debug('Setting outputDestination to {0} to preserve folder structure'.format
|
||||
(os.path.dirname(target_file)))
|
||||
# try:
|
||||
# target_file = target_file.encode(core.SYS_ENCODING)
|
||||
# except UnicodeError:
|
||||
# pass
|
||||
if root == 1:
|
||||
if not found_file:
|
||||
logger.debug('Looking for {0} in: {1}'.format(input_name, inputFile))
|
||||
|
@ -362,15 +346,7 @@ def main(args):
|
|||
if client_agent.lower() not in core.TORRENT_CLIENTS:
|
||||
continue
|
||||
|
||||
# try:
|
||||
# dir_name = dir_name.encode(core.SYS_ENCODING)
|
||||
# except UnicodeError:
|
||||
# pass
|
||||
input_name = os.path.basename(dir_name)
|
||||
# try:
|
||||
# input_name = input_name.encode(core.SYS_ENCODING)
|
||||
# except UnicodeError:
|
||||
# pass
|
||||
|
||||
results = process_torrent(dir_name, input_name, subsection, input_hash or None, input_id or None,
|
||||
client_agent)
|
||||
|
|
|
@ -96,15 +96,6 @@ def find_imdbid(dir_name, input_name, omdb_api_key):
|
|||
def category_search(input_directory, input_name, input_category, root, categories):
|
||||
tordir = False
|
||||
|
||||
# try:
|
||||
# input_name = input_name.encode(core.SYS_ENCODING)
|
||||
# except Exception:
|
||||
# pass
|
||||
# try:
|
||||
# input_directory = input_directory.encode(core.SYS_ENCODING)
|
||||
# except Exception:
|
||||
# pass
|
||||
|
||||
if input_directory is None: # =Nothing to process here.
|
||||
return input_directory, input_name, input_category, root
|
||||
|
||||
|
|
|
@ -26,10 +26,6 @@ def sanitize_name(name):
|
|||
|
||||
# remove leading/trailing periods and spaces
|
||||
name = name.strip(' .')
|
||||
# try:
|
||||
# name = name.encode(core.SYS_ENCODING)
|
||||
# except Exception:
|
||||
# pass
|
||||
|
||||
return name
|
||||
|
||||
|
|
|
@ -973,15 +973,7 @@ def main(args, section=None):
|
|||
if client_agent and client_agent.lower() not in core.NZB_CLIENTS:
|
||||
continue
|
||||
|
||||
try:
|
||||
dir_name = dir_name.encode(core.SYS_ENCODING)
|
||||
except:
|
||||
pass
|
||||
input_name = os.path.basename(dir_name)
|
||||
try:
|
||||
input_name = input_name.encode(core.SYS_ENCODING)
|
||||
except:
|
||||
pass
|
||||
|
||||
results = process(dir_name, input_name, 0, client_agent=client_agent,
|
||||
download_id=download_id or None, input_category=subsection)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue