refactor(main): sweep name.split(':', 1) -> display_name

Every standalone prefix-strip expression in app/main.py replaced with
tag.display_name (user-facing) or tag.name (identifier contexts). The
only remaining colon-splits are inside parse_kind_prefix and tag
suggestions canonicalization.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-22 15:44:17 -04:00
parent 1e5b2c0040
commit 7f4b1d3ba7
+2 -2
View File
@@ -474,7 +474,7 @@ def _get_tags_with_previews(kind=None, limit=35, offset=0, images_per_tag=3, sea
tag_ids = [t.id for t, _ in tags_with_counts]
tag_map = {}
for t, count in tags_with_counts:
label = t.name.split(":", 1)[1] if (":" in t.name) else t.name
label = t.display_name
tag_map[t.id] = {
"id": t.id,
"name": label,
@@ -2479,7 +2479,7 @@ def read_series(tag_id):
start_page = request.args.get('page', 1, type=int)
# Get series name (strip prefix if present)
series_name = tag.name.split(':', 1)[1] if ':' in tag.name else tag.name
series_name = tag.name
return render_template(
'reader.html',