Open xipmix opened 4 years ago
Actually it could be viewed as a code problem. This https://github.com/volumio/Volumio2/blob/2488f384538546350daead0ec9c4ab706450c79a/app/plugins/miscellanea/albumart/albumart.js#L480
is the only instance where a .svg
file is sent, the other sendFile()
calls try a .jpg
and then .png
, e.g. https://github.com/volumio/Volumio2/blob/2488f384538546350daead0ec9c4ab706450c79a/app/plugins/miscellanea/albumart/albumart.js#L491-L495
which suggests this change
@@ -477,7 +477,15 @@ var processExpressRequest = function (req, res) {
.fail(function () {
res.setHeader('Cache-Control', 'public, max-age=' + maxage);
if(icon!==undefined){
- res.sendFile(__dirname + '/icons/'+icon+'.svg');
+ try {
+ res.sendFile(__dirname + '/icons/'+icon+'.svg');
+ } catch(e) {
+ try {
+ res.sendFile(__dirname + '/icons/'+icon+'.jpg');
+ } catch(e) {
+ res.sendFile(__dirname + '/icons/'+icon+'.png');
+ }
+ }
Of course the 'icon' case is a special case, is it true to say that all icons should be SVG format?
This has been going on for quite a while (at least 2018, see #1690). Probably not urgent but simple to fix.
There is a
fa-tags.jpg
but no.svg
equivalent. The full list of files like this is