mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
Simplified is_sample
This commit is contained in:
parent
e652fad813
commit
ec6398fcb6
1 changed files with 2 additions and 4 deletions
|
@ -125,12 +125,10 @@ def category_search(inputDirectory, inputName, inputCategory, root, categories):
|
||||||
|
|
||||||
def is_sample(filePath, inputName):
|
def is_sample(filePath, inputName):
|
||||||
# 200 MB in bytes
|
# 200 MB in bytes
|
||||||
|
# Maybe let the users change this?
|
||||||
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 filePath.lower()) and (not 'sample' in inputName) and (os.path.getsize(filePath) < SIZE_CUTOFF):
|
return ('sample' in filePath.lower()) and (not 'sample' in inputName) and (os.path.getsize(filePath) < SIZE_CUTOFF)
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def copy_link(source, target, useLink, outputDestination):
|
def copy_link(source, target, useLink, outputDestination):
|
||||||
# Create destination folder
|
# Create destination folder
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue