mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
minor fixes... now compiles. Should run
This commit is contained in:
parent
d086811270
commit
1cb0e7188b
1 changed files with 3 additions and 3 deletions
|
@ -82,7 +82,7 @@ def is_sample(file_path, Name):
|
||||||
# 200 MB in bytes
|
# 200 MB in bytes
|
||||||
SIZE_CUTOFF = 200 * 1024 * 1024
|
SIZE_CUTOFF = 200 * 1024 * 1024
|
||||||
# ignore 'sample' in files unless 'sample' in Torrent Name
|
# ignore 'sample' in files unless 'sample' in Torrent Name
|
||||||
if ('sample' in file_path.lower()) and (not 'sample' in Name) and (os.path.getsize(file_path) < SIZE_CUTOFF)):
|
if ('sample' in file_path.lower()) and (not 'sample' in Name) and (os.path.getsize(file_path) < SIZE_CUTOFF):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
@ -152,7 +152,7 @@ def unpack(dirpath, file, destination):
|
||||||
cmd = EXTRACT_COMMANDS[ext[1]]
|
cmd = EXTRACT_COMMANDS[ext[1]]
|
||||||
else:
|
else:
|
||||||
Logger.debug("Unknown file type: %s", ext[1])
|
Logger.debug("Unknown file type: %s", ext[1])
|
||||||
continue
|
return False
|
||||||
|
|
||||||
## Create destination folder
|
## Create destination folder
|
||||||
if not os.path.exists(destination):
|
if not os.path.exists(destination):
|
||||||
|
@ -317,7 +317,7 @@ for dirpath, dirnames, filenames in os.walk(Directory):
|
||||||
file_path = os.path.join(dirpath, file)
|
file_path = os.path.join(dirpath, file)
|
||||||
file_ext = os.path.splitext(file)
|
file_ext = os.path.splitext(file)
|
||||||
if file_ext in video_files: #if the file is a video file.
|
if file_ext in video_files: #if the file is a video file.
|
||||||
if is_sample(file_path, Name)
|
if is_sample(file_path, Name):
|
||||||
Logger.info("file %s is a sample file. Ignoring", file_path)
|
Logger.info("file %s is a sample file. Ignoring", file_path)
|
||||||
continue #ignore samples
|
continue #ignore samples
|
||||||
video = video + 1
|
video = video + 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue