mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
improve user script media extension handling
This commit is contained in:
parent
9bd61af1bf
commit
bb6eff806e
3 changed files with 12 additions and 11 deletions
|
@ -95,6 +95,7 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
|||
Torrent_NoLink = int(section.get("Torrent_NoLink", 0))
|
||||
keep_archive = int(section.get("keep_archive", 0))
|
||||
extract = int(section.get('extract', 0))
|
||||
extensions = section.get('user_script_mediaExtensions', "").lower().split(',')
|
||||
uniquePath = int(section.get("unique_path", 1))
|
||||
|
||||
if clientAgent != 'manual':
|
||||
|
@ -138,9 +139,9 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
|||
now = datetime.datetime.now()
|
||||
|
||||
if extract == 1:
|
||||
inputFiles = core.listMediaFiles(inputDirectory, archives=False)
|
||||
inputFiles = core.listMediaFiles(inputDirectory, archives=False, other=True, otherext=extensions)
|
||||
else:
|
||||
inputFiles = core.listMediaFiles(inputDirectory)
|
||||
inputFiles = core.listMediaFiles(inputDirectory, other=True, otherext=extensions)
|
||||
logger.debug("Found {0} files in {1}".format(len(inputFiles), inputDirectory))
|
||||
for inputFile in inputFiles:
|
||||
filePath = os.path.dirname(inputFile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue