Keep shop/item meta in git and fix category icon filenames.
Drop the accidental itemcat_*.png.png downloads by stripping the existing .png suffix before download_icons appends one. Leave daily leaderboards/streamers and ignored OpenDota/STRATZ caches uncommitted. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+10
-1
@@ -337,8 +337,17 @@ def main() -> None:
|
||||
saved, skipped, fail = download_shop_icons(icon_keys, force=args.force_icons)
|
||||
print(f" item icons saved={saved} skipped={skipped} fail={fail}", flush=True)
|
||||
print(f"downloading {len(cat_files)} category icons...", flush=True)
|
||||
# CAT_ICON_BY_LABEL values already include ".png"; download_icons appends
|
||||
# another ".png", so pass bare stems + a full URL template.
|
||||
cat_keys = {
|
||||
name[:-4] if name.endswith(".png") else name for name in cat_files
|
||||
}
|
||||
c_saved, c_skipped, c_fail = download_icons(
|
||||
cat_files, CAT_ICON_BASE + "{key}", ITEM_CAT_ICONS, force=args.force_icons, delay=0.05
|
||||
cat_keys,
|
||||
CAT_ICON_BASE + "{key}.png",
|
||||
ITEM_CAT_ICONS,
|
||||
force=args.force_icons,
|
||||
delay=0.05,
|
||||
)
|
||||
print(f" cat icons saved={c_saved} skipped={c_skipped} fail={c_fail}", flush=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user