From: David Kalnischkies Date: Sun, 2 Jul 2023 10:00:22 +0000 (+0200) Subject: WebUI: Allow categories to be represented by multiple icons X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1edfaba452b4cdfca8994a1b881e2fb5e0f9c467;p=thirdparty%2Ftvheadend.git WebUI: Allow categories to be represented by multiple icons 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. --- diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index b18cfe117..4e8e7109f 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -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); + } } }