krateng / maloja

Self-hosted music scrobble database to create personal listening statistics and charts
https://maloja.krateng.ch
GNU General Public License v3.0
1.17k stars 67 forks source link

Artists separated by commas are considered as a single entity (no option for commas as delimiters) #344

Open maluvola opened 7 months ago

maluvola commented 7 months ago

Hello,

Currently, the system lacks an option to treat artists separated by commas as distinct entities, unlike those separated by ampersands and "feat.". For instance, "X, Y, Z" is considered one artist, while "X, Y, Z" & "alpha" count as two.

I conducted tests across various scrobblers such as foo_listenbrainz2 (foobar2000 in Wine), mpdscribble (for MPD), multi-scrobbler using MPRIS with VLC (on Debian 12 Gnome), multi-scrobbler using Last.fm as a source, and Pano Scrobbler with VLC (on Android). Even with modified Last.fm exported files containing commas (see issue #339), the pattern remained consistent.

The only workaround I found was using a Python script to replace "," with " &" (space ampersand) in the already modified Last.fm exported file. However, this method is limited to importing files rather than directly scrobbling, and poses a risk to library integrity should Last.fm services become unavailable.

I'm deeply passionate about scrobbling my music collection, and wish to spend more time enjoying music rather than constantly editing and importing files. Currently, I'm still using my library with the artists separated by commas as a single entity.

Therefore, I kindly request the addition of an option allowing the use of commas as delimiters like ampersand and "feat.". This enhancement would ensure accurate representation of artists without the need for manual intervention. Additionally, if an artist were to have a comma as part of their project title (which does not apply to my case specifically), a rule could be implemented to address such occurrences.

Thank you for considering this improvement, which would not only resolve my current issue but also enrich the user experience for many music enthusiasts.

SirMartin commented 7 months ago

Maybe you can make a workaround with the Maloja rules. There you can separate/join different artists as you wish. https://github.com/krateng/maloja?tab=readme-ov-file#customization

SirMartin commented 7 months ago

I just found that probably the option you (@maluvola) need, exists already, I found this in the configuration page.

image

The only problem is that is not configurable from the Web Interface, so you probably need to change the environment variables, but it should not be so complicated.

maluvola commented 7 months ago

These lines are in settings.md. How do I enable commas as delimiters on settings.ini? I've had already tried it and it didn't work. Is there really an option for commas as delimiters or is it just to enable and disable "feat." and ampersand?

delimiters_feat | MALOJA_DELIMITERS_FEAT | Set | Delimiters used for extra artists, even when in the title field delimiters_informal | MALOJA_DELIMITERS_INFORMAL | Set | Delimiters in informal artist strings with spaces expected around them delimiters_formal | MALOJA_DELIMITERS_FORMAL | Set | Delimiters used to tag multiple artists when only one tag field is available

maluvola commented 7 months ago

Well, you said this is "probably" an option two times. You're not sure if it is.

SirMartin commented 7 months ago

As you said I have no idea, I just found it in the documentation, I checked a little bit in the source code, and appears to be an array of strings. As you can see here: https://github.com/krateng/maloja/blob/163746c06e2e071445b065eab2e00f0e9fab6d23/maloja/pkg_global/conf.py#L204

So my suggestion is that you should try adding the ones you want to the same array because I think that when you enter into the environment variable or setting it will override the original one.

So you probably can add " &" to the array and set it in the settings. If I were you, I would try in that way.