From: Urban Wallasch Date: Tue, 18 May 2021 08:36:52 +0000 (+0200) Subject: * Set timestamp right before writing index file, not before creating thumbnails files. X-Git-Tag: v0.3~34 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=f456fcb13f20f351d304bb5bcc1c237a8fd063a0;p=ffpreview.git * Set timestamp right before writing index file, not before creating thumbnails files. --- diff --git a/ffpreview.py b/ffpreview.py index b22eef0..f51fa09 100755 --- a/ffpreview.py +++ b/ffpreview.py @@ -1090,6 +1090,7 @@ def make_thumbs(vidfile, thinfo, thdir, prog_cb=None): eprint(1, ebuf) thinfo['count'] = cnt with open(os.path.join(thdir, _FFPREVIEW_IDX), 'w') as idxfile: + thinfo['date'] = int(time.time()) json.dump(thinfo, idxfile, indent=2) rc = True except Exception as e: @@ -1169,7 +1170,6 @@ def get_thinfo(vfile, thdir): if not ok: return None, False thinfo.update(meta) - thinfo['date'] = int(time.time()) if not cfg['force']: chk = chk_idxfile(thinfo, thdir) if chk: