diff --git a/config.py.example b/config.py.example index d170f4d..65e3a41 100644 --- a/config.py.example +++ b/config.py.example @@ -1,19 +1,21 @@ -salt = '123' -title = 'My site' +title = 'My site' # root name -src = 'data/src' -dst = 'data/dst' -hidedst = 'data/hidedst' -mangle = 'm/' +salt = '123' # salt for names mangling +mangle = 'm/' # mangling prefix -url = 'https://my.site/files' -hideurl = 'https://my.site/private' +src = 'data/src' # directory where files has been stored +dst = 'data/dst' # target dir where hardlinks will be created +hidedst = 'data/hidedst' # dir to store indicies for hidden files +guardsecs = 60 # guard time to prevent indexing during file uploading -thumbw = 120 -thumbh = 90 -thumbcolor = 0xffffff +url = 'https://my.site/files' # external url +hideurl = 'https://my.site/private' # external url for hidden area -ffprobe = '/usr/bin/ffprobe' -ffmpeg = '/usr/bin/ffmpeg' -magick = '/usr/bin/convert' +thumbw = 120 # thumbnail width +thumbh = 90 # thumbnail height +thumbcolor = 0xffffff # thumbnail color + +ffprobe = '/usr/bin/ffprobe' # path to ffprobe executable +ffmpeg = '/usr/bin/ffmpeg' # path to ffmpeg executable +magick = '/usr/bin/convert' # path to imagemagick/convert executable diff --git a/indexer.py b/indexer.py index ccd5c14..815b702 100755 --- a/indexer.py +++ b/indexer.py @@ -231,10 +231,13 @@ hidetpl = template.TplLoader.load("tpl/hide.tpl") n = Node(None, config.src, '') n.scan() +if time.time() - n.date <= config.guardsecs: + print('files are being update just now') + exit(0) n.make() clean(config.dst) clean(config.hidedst) -print('done') +#print('done')