12-05-2020, 02:13 PM
Hi,
I noticed that some of my albums show a long date/time string (e.g. "1975-06-25T00:00:00Z") in stead of just the year.
This is in the Playback view where you also see the Album cover.
It looks like I was able to fix this by modifying function formatExtraTagsString() in file playerlib-nomin.js (added the green lines):
if (MPD.json[element] != null && MPD.json[element] != 'Disc tag missing' && MPD.json[element] != 'Unknown') {
elementDisplay = element == 'track' ? 'Track' : (element == 'disc' ? 'Disc' : '');
if (element === 'date' && MPD.json['date'].length > 4) {
MPD.json['date'] = MPD.json['date'].slice(0,4); // Only show the year.
}
extraTagsDisplay += ((elementDisplay == '' ? '' : elementDisplay + ' ') + MPD.json[element] + ' • ');
}
Maybe it would be better to create a MPD.json['year'] in stead of modifying the MPD.json[] source, but I don't know much about PHP ...
Thanks, Willem
(using Moode on an Allo USBridge Signature)
I noticed that some of my albums show a long date/time string (e.g. "1975-06-25T00:00:00Z") in stead of just the year.
This is in the Playback view where you also see the Album cover.
It looks like I was able to fix this by modifying function formatExtraTagsString() in file playerlib-nomin.js (added the green lines):
if (MPD.json[element] != null && MPD.json[element] != 'Disc tag missing' && MPD.json[element] != 'Unknown') {
elementDisplay = element == 'track' ? 'Track' : (element == 'disc' ? 'Disc' : '');
if (element === 'date' && MPD.json['date'].length > 4) {
MPD.json['date'] = MPD.json['date'].slice(0,4); // Only show the year.
}
extraTagsDisplay += ((elementDisplay == '' ? '' : elementDisplay + ' ') + MPD.json[element] + ' • ');
}
Maybe it would be better to create a MPD.json['year'] in stead of modifying the MPD.json[] source, but I don't know much about PHP ...
Thanks, Willem
(using Moode on an Allo USBridge Signature)
W