]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
WebUI: Allow categories to be represented by multiple icons
authorDavid Kalnischkies <david@kalnischkies.de>
Sun, 2 Jul 2023 10:00:22 +0000 (12:00 +0200)
committerFlole <Flole998@users.noreply.github.com>
Tue, 9 Sep 2025 18:31:51 +0000 (20:31 +0200)
A sports talk is a "talk" about "sports". Just giving it the talk icon
is misleading given a "normal" talk show usually has different topics.

src/webui/static/app/tvheadend.js

index b18cfe11796b4f7086fd61984e1eaaaa63351a09..4e8e7109f5d697f0ee7a6dfa61bdcc0a0111ba85 100644 (file)
@@ -132,7 +132,7 @@ var catmap_minor = {
   "skiing" : "skier",
   "soap" : "couch_and_lamp",
   "soccer" : "soccer_ball",
-  "sports talk" : "speaking_head_in_silhouette",
+  "sports talk" : [ "sports_medal", "speaking_head_in_silhouette" ],
   "spy": "spy",
   "standup" : "microphone",
   "swimming" : "swimmer",
@@ -229,7 +229,12 @@ tvheadend.getContentTypeIcons = function(rec, style) {
       var l = catmap_major[v];
       if (l) ret_major.push(l);
       l = catmap_minor[v];
-      if (l) ret_minor.push(l)
+      if (l) {
+        if (Array.isArray(l))
+          ret_minor.push(...l);
+        else
+          ret_minor.push(l);
+      }
     }
   }