Hi,
So I am a classical buff, and 80% of my library is classical music. Being able to add a field for composers is necessary for me, otherwise I have to look for another solution. I have made some amendments to the code but not successfully it seems. Could someone give me a few pointers?
The composer tag is already indexed by MPD, I verified that in the tag_cache database, so it should be a mere issue of querying the database and populating a webpage.
So far I have made amendments in volumio/app/musiclibrary.js and volumio/http/www/scripts/app-697d229700.js (from the 26 March image). Somewhat naively, I simply looked for the areas in the code where artist/album/genre appeared in proximity to each other, figuring that has to do with creating the views and the buttons that lead to them, and then simply making a duplicate of the “artist-block” found and substituting ‘composer/Composers’ for ‘artist/Artists’ in the relevant fields.
This seems not to be enough. I can’t really decipher the huge angular block at the bottom of app-697d229700.js, which is where I think the html is being generated. I find the part where the buttons are created, but it is only one block apparently being iterated for all buttons, but then I don’t understand why a button for the composers aren’t added (
…etc…)
Is anyone willing to give me some pointers?
Best regards!
Hi,
you don’t need to edit the UI at all, but just the backend, and specifically the mpd plugin and music library.js
Basically, add another entry with the proper uri here (like we do for artists)
github.com/volumio/Volumio2/blo … ry.js#L110
Take a look at how we present artists and replicate it
github.com/volumio/Volumio2/blo … x.js#L3204
That would be a really nice addition, if you make it and do a pull request I will help you 
Hi!
Thanks. The …/mpd/index.js is what I couldn’t find 
I’ll get cracking and see how it goes.
Okay I have advanced somewhat, but am stuck since a few days. If someone wants to help that would be super!
I have created the composer button and when clicked it loads a page with composers. However, when a composer is clicked I get a toast message signaling a browse error ‘An error occurred while browsing the folder.’ I have tracked this message down to originating in …/app/plugins/user_interface/websocket/index.js at line 366, but at this stage I do not know how to proceed (I am not succeeding in debugging that function since when I add e.g., console.log(curUri) I get no output to the browser console (reason=server-side JS?)).
[spoiler][code]connWebSocket.on(‘browseLibrary’, function (data) {
var selfConnWebSocket = this;
var curUri = data.uri;
var response;
response=self.musicLibrary.executeBrowseSource(curUri);
if (response != undefined) {
response.then(function (result) {
selfConnWebSocket.emit('pushBrowseLibrary', result);
})
.fail(function () {
self.printToastMessage('error', "Browse error", 'An error occurred while browsing the folder.');
});
}
});[/code][/spoiler]
I did not do a pull request as I didn’t want to risk polluting the volumio github with bad/erroneous/low quality pushes (I am not quite sure of the collaboration do’s and don’ts). Instead I uploaded my tweaks for inspection to a repo of my own. If any dev would prefer me to create a pull request I’d be happy to do so and delete my own repo.
You need to handle correctly the uri you’re having for composer in the index.js of mpd plugin.
What you’re looking for is to add a further entry in the lsInfo or explodeUri functions