* Set timestamp right before writing index file, not before creating thumbnails files.
authorUrban Wallasch <urban.wallasch@freenet.de>
Tue, 18 May 2021 08:36:52 +0000 (10:36 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Tue, 18 May 2021 08:36:52 +0000 (10:36 +0200)
ffpreview.py

index b22eef0f7d244629ebf1bffcdf4e6a43e6c20984..f51fa09f7f4a1d29b43265815c3a688f430e3df9 100755 (executable)
@@ -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: