use correct mtime for folder thumbs;

mtime the file that was used to produce the folder thumbnail
(rather than the folder itself) since the folder-thumb is
always resolved to the file's thumb in the on-disk cache
This commit is contained in:
ed 2024-07-11 23:12:51 +02:00
parent c549f367c1
commit d76673e62d

View file

@ -4287,7 +4287,7 @@ class HttpCli(object):
if cfn: if cfn:
fn = cfn[0] fn = cfn[0]
fp = os.path.join(abspath, fn) fp = os.path.join(abspath, fn)
if bos.path.exists(fp): st = bos.stat(fp)
vrem = "{}/{}".format(vrem, fn).strip("/") vrem = "{}/{}".format(vrem, fn).strip("/")
is_dir = False is_dir = False
except: except:
@ -4295,10 +4295,13 @@ class HttpCli(object):
else: else:
for fn in self.args.th_covers: for fn in self.args.th_covers:
fp = os.path.join(abspath, fn) fp = os.path.join(abspath, fn)
if bos.path.exists(fp): try:
st = bos.stat(fp)
vrem = "{}/{}".format(vrem, fn).strip("/") vrem = "{}/{}".format(vrem, fn).strip("/")
is_dir = False is_dir = False
break break
except:
pass
if is_dir: if is_dir:
return self.tx_svg("folder") return self.tx_svg("folder")