scan for additional folder thumbnails

This commit is contained in:
ed 2021-06-30 00:19:39 +02:00
parent b4d6f4e24d
commit 0f09b98a39
3 changed files with 2 additions and 2 deletions

View file

@ -621,7 +621,6 @@ roughly sorted by priority
* readme.md as epilogue
* thx kip:
* pause button for uploads
* also look for cover.*
* reduce up2k roundtrips
* start from a chunk index and just go
* terminate client on bad data

View file

@ -305,6 +305,7 @@ def run_argparse(argv, formatter):
ap2.add_argument("--th-poke", metavar="SEC", type=int, default=300, help="activity labeling cooldown")
ap2.add_argument("--th-clean", metavar="SEC", type=int, default=43200, help="cleanup interval")
ap2.add_argument("--th-maxage", metavar="SEC", type=int, default=604800, help="max folder age")
ap2.add_argument("--th-covers", metavar="NAMES", type=str, default="folder.png,folder.jpg,cover.png,cover.jpg", help="folder thumbnails to stat for")
ap2 = ap.add_argument_group('database options')
ap2.add_argument("-e2d", action="store_true", help="enable up2k database")

View file

@ -1562,7 +1562,7 @@ class HttpCli(object):
th_fmt = self.uparam.get("th")
if th_fmt is not None:
if is_dir:
for fn in ["folder.png", "folder.jpg"]:
for fn in self.args.th_covers.split(','):
fp = os.path.join(abspath, fn)
if os.path.exists(fp):
vrem = "{}/{}".format(vrem.rstrip("/"), fn)