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

@ -15,6 +15,7 @@
import os
import sys
import nzbtomedia
from nzbtomedia.nzbToMediaUtil import joinPath
if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5] < '11.0':
print "Script triggered from NZBGet (11.0 or later)."
@ -66,7 +67,7 @@ if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5
directory = os.path.normpath(os.environ['NZBPP_DIRECTORY'])
for dirpath, dirnames, filenames in os.walk(directory):
for file in filenames:
filepath = os.path.join(dirpath, file)
filepath = joinPath(dirpath, file)
print "reseting datetime for file", filepath
try:
os.utime(filepath, None)