Hi all I’m new here and I’m not shure is it a bug or not.
I have installed Volumio 2.861 on a Raspberry 4b.
My music library is very big and exacly tagged with genre and AlbumArtists. So I would use the genre to browse into the library. The problem is, when I press add to que or play on a complete album nothing is doing. When I start from a artist or album all is ok with the same album.
Now i have search a little bit in index.js from mpd and found follow mistakes (I think it’s a mistake):
The genre tag is using with quotation marks around the value but in the function prototype.explodeUri the quotation marks around the genre replaced with escaped quotation marks. The filled variable safeGenreName is used in find string GetMatches. But in this variable also quotation marks exist. So around the genre are escaped quotation marks and regular quotation marks from GetMatches string.
And so nothing is found and nothing is play, genre is not found.
I have change one line in this function and remove the quotation marks and play complete album from genre is now working
Here is the changed part of ControllerMpd.prototype.explodeUri = function (uri)
in /volumio/app/plugins/music_service/mpd/index.js
} else if (uri.startsWith('genres://')) {
// exploding search
var splitted = uri.split('/');
var genreName = decodeURIComponent(splitted[2]);
var artistName = decodeURIComponent(splitted[3]);
var albumName = decodeURIComponent(splitted[4]);
// Escape any " within the strings used to construct the 'find' cmd
// ------ fix genre quotation marks ----------
//var safeGenreName = genreName.replace(/"/g, '\\"');
var safeGenreName = genreName.replace(/"/g, '');
// ------ fix genre quotation marks end ------
var safeArtistName = artistName.replace(/"/g, '\\"');
var safeAlbumName = albumName.replace(/"/g, '\\"');
if (splitted.length == 4) {
var GetMatches = 'find genre "' + safeGenreName + '" artist "' + safeArtistName + '"';
} else if (splitted.length == 5) {
if (compilation.indexOf(artistName) > -1) { // artist is in compilation array so only find album
var GetMatches = 'find genre "' + safeGenreName + '" album "' + safeAlbumName + '"';
} else { // artist is NOT in compilation array so use artist
var GetMatches = 'find genre "' + safeGenreName + '" albumartist "' + safeArtistName + '" album "' + safeAlbumName + '"';
}
} else {
var GetMatches = 'find genre "' + safeGenreName + '"';
}
This is my workaround but I think its better you can reproduce this issue and fix in your source.
best regards
2aCD