mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
copy/link all for non-video categories.
This commit is contained in:
parent
848fe04ef3
commit
5ffedfc2d8
1 changed files with 4 additions and 8 deletions
|
@ -66,7 +66,10 @@ def main(inputDirectory, inputName, inputCategory, inputHash):
|
|||
else:
|
||||
continue # This file has not been recently moved or created, skip it
|
||||
|
||||
if fileExtension in mediaContainer: # If the file is a video file
|
||||
if not (inputCategory == cpsCategory or inputCategory == sbCategory): #process all for non-video categories.
|
||||
Logger.info("MAIN: Found file %s for category %s", filepath, inputCategory)
|
||||
copy_link(filePath, targetDirectory, useLink, outputDestination
|
||||
elif fileExtension in mediaContainer: # If the file is a video file
|
||||
if is_sample(filePath, inputName, minSampleSize): # Ignore samples
|
||||
Logger.info("MAIN: Ignoring sample file: %s ", filePath)
|
||||
continue
|
||||
|
@ -85,13 +88,6 @@ def main(inputDirectory, inputName, inputCategory, inputHash):
|
|||
except Exception as e:
|
||||
Logger.error("MAIN: Failed to link file: %s", file)
|
||||
Logger.debug(e)
|
||||
elif fileExtension in keepExtensions:
|
||||
Logger.info("MAIN: Found file of type %s. Processing file %s.", fileExtension, filePath)
|
||||
try:
|
||||
copy_link(filePath, targetDirectory, useLink, outputDestination)
|
||||
except Exception as e:
|
||||
Logger.error("MAIN: Failed to link file: %s", file)
|
||||
Logger.debug(e)
|
||||
elif fileExtension in compressedContainer:
|
||||
Logger.info("MAIN: Found compressed archive %s for file %s", fileExtension, filePath)
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue