mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -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):
|
||||
# 200 MB in bytes
|
||||
# Maybe let the users change this?
|
||||
SIZE_CUTOFF = 200 * 1024 * 1024
|
||||
# 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 True
|
||||
else:
|
||||
return False
|
||||
return ('sample' in filePath.lower()) and (not 'sample' in inputName) and (os.path.getsize(filePath) < SIZE_CUTOFF)
|
||||
|
||||
def copy_link(source, target, useLink, outputDestination):
|
||||
# Create destination folder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue