Closed Bacadam closed 3 years ago
First of all, your English is fantastic - much better than I would be in your language. So, please no need to appologise :)
MPD's sticker DB is quite slow, as you have to (AFAIK) query per-track.
If this is to be Cantata specific, and if you only use the one instance of Cantata, you could instead update Cantata's SQLite database to have an (e.g.) 'library' column. Then add context menu entries to Cantata to assign artists/albums/tracks to libraries. Then all you need is a control somewhere to toggle which library to use. When Cantata queries its DB, it can then also filter by library. But you would need to handle the update case, which reads the MPD listing, to ensure your library assignments still hold.
However, even simpler would be to switch from MPD to Logitech Media Server (LMS), which is opensource. LMS separates the server (holding the library) from the player. LMS supports native Squeezeboxes, Squeezelite (a command line player like MPD), Airplay, UPnP, etc - with multi-room sync. See LMS forums for more info.
The reason I mention LMS is that it has support for 'Virtual Libraries' - which is what you are asking for here. These libraries can be created using a search term (e.g. all files in a path, etc.) or there are plugins to create these in other ways.
Personally I switched from Cantata/MPD to LMS about 4 years ago. And for the last 3 years I have been creating a Material-themed skin/webapp for LMS that allows me to use the same interface on mobile or desktop - just a browser required.
Not trying to persuade you to switch - but I think you'll find using LMS easier for this than updating Cantata.
Closing. This is not something I would personally implement, but am more than happy with pull requests.
Hi ! I need a new feature and I'm ready to implement a PR for it but I'd like to discuss with you how to do it before.
I need subcollections.
I have a big collection of music and I don't even know all the songs in it. I'd like to create a group with only my favorite tracks.
I can't restrict my MPD collection to my favorites as I'm not the only one using it. Other members of the family could also have their own subcollections with their own musical preferences.
We can also imagine contextual subcollections, for example one with songs for parties.
The idea is to be able to filter the library view by subcollection as this is done in Cantata with the genre ComboBox. This way I can see only my favorite music and scroll through it to pick the one that I want to listen on the moment. Subcollections could also be part of the rules for dynamic playlists.
I had a look on cantata's collections but this require one MPD instance by collection, which seems overkill (I've got all on a single machine). Also collections does not share the same queue so that make switching from one to another less comfortable.
I also considered stored playlists but this is not easy to use for hundreds of tracks as this is not sortable and not searchable.
I imagined two ways to implement it (but there may be others):
grouping
tag of files. This tag is supported by MPD but this seems like a devious usage. In fact if we look at ID3v2 definition we see:stickers
database, as this is done in Cantata with ratings. We can store in a sticker calledsubcollections
a list, let's say with comma-separated values, with all the subcollections this track belongs to.I know MPD lets clients implement standards for stickers name, but I haven't found any info on that kind of use so I don't know if it's frequent.
I prefer the second option as this does not impact files so I can still share my music folder with friends without bothering them with personal stuff in tags.
What do you think ?
PS: Sorry for my English which may not have been perfect, this is not my native language.