Complete re-code of linking in TorrentToMedia

This commit is contained in:
echel0n 2014-04-19 22:47:10 -07:00
parent 06c2dae5ce
commit 6a0158d801
14 changed files with 291 additions and 208 deletions

View file

@ -32,6 +32,8 @@
import os
import sys
import nzbtomedia
from nzbtomedia.nzbToMediaUtil import joinPath
def is_sample(filePath, inputName, maxSampleSize, SampleIDs):
# 200 MB in bytes
@ -101,7 +103,7 @@ if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5
for dirpath, dirnames, filenames in os.walk(os.environ['NZBPP_DIRECTORY']):
for file in filenames:
filePath = os.path.join(dirpath, file)
filePath = joinPath(dirpath, file)
fileName, fileExtension = os.path.splitext(file)
if fileExtension in mediaContainer: # If the file is a video file