__license__ = "GPL"
-from os.path import getmtime
+from os.path import dirname, getmtime
import sys
from time import localtime, asctime
from eff_bdecode import decode
if 'piece length' in info:
meta.append(('.META/piece length', len(str(info['piece length']))))
+ paths += meta
+ dirs = set()
+ for name, size in paths:
+ if '/' in name:
+ dirs.add(dirname(name))
+
if not dt:
dt = decode_datetime(getmtime(sys.argv[2]))
- for name, size in paths + meta:
+ for name in sorted(dirs):
+ print "dr-xr-xr-x 1 user group 0 %s %s" % (dt, name)
+
+ for name, size in sorted(paths):
print "-r--r--r-- 1 user group %d %s %s" % (size, dt, name)
WHAT'S NEW
Version 1.2.3 (2015-07-08)
- Set files date/time to the content of ".META/creation date" file
+ Set directories/files date/time to the content of ".META/creation date" file
if it exists or to the last modification time of the torrent file itself.
Version 1.2.2 (2015-01-10)
Version 1.2.3 (2015-07-08)
- Set files date/time to the content of ".META/creation date" file
+ Set directories/files date/time to the content of ".META/creation date" file
if it exists or to the last modification time of the torrent file itself.
Version 1.2.2 (2015-01-10)