From da8d8a3ddbcea8ad03d5502221b39217b032eb6a Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Fri, 19 Jan 2024 17:13:13 +0100 Subject: [PATCH] display more information about item --- htdocs/lib/MetaPanel.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/lib/MetaPanel.js b/htdocs/lib/MetaPanel.js index ee524c68..13544276 100644 --- a/htdocs/lib/MetaPanel.js +++ b/htdocs/lib/MetaPanel.js @@ -434,6 +434,15 @@ WfmMetaPanel.prototype.update = function(data) { if ('item.artist' in tags && 'item.title' in tags) { this.radiotext_plus.item = tags['item.artist'] + ' - ' + tags['item.title']; + } else { + var items = Object.entries(tags).filter(function (e) { + return e[0].startsWith("item.") + }) + if (items.length) { + this.radiotext_plus.item = items.map(function (e) { + return e[0].substr(5, 1).toUpperCase() + e[0].substr(6) + ': ' + e[1]; + }).join('; '); + } } if ('programme.now' in tags) {