strawberrymusicplayer / strawberry

:strawberry: Strawberry Music Player
https://www.strawberrymusicplayer.org/
GNU General Public License v3.0
2.66k stars 183 forks source link

Scrobbler removes "(Remastered)" from song titles #1387

Closed SnootyInk8302 closed 6 months ago

SnootyInk8302 commented 6 months ago

Describe the bug If I scrobble a track that has the word Remastered, (Remastered), Remastered) or any variation of this, it is sent without it to last.fm. Doesn't affect "Remaster".

To Reproduce Play a song with the word in the title.

Expected behavior It should scrobble the entire title

System Information:

Screenshots: Screenshot from 2024-02-29 23-13-54 Screenshot from 2024-02-29 23-14-26

SnootyInk8302 commented 6 months ago

Found it. It is line 172 from "strawberry/src/core/song.cpp" right? Can we get an option to toggle it on and off?

SnootyInk8302 commented 6 months ago

Update: managed to fix it by replacing:

const QRegularExpression Song::kAlbumRemoveDisc(" ?-? ((\\(|\\[)?)(Disc|CD) ?([0-9]{1,2})((\\)|\\])?)$", QRegularExpression::CaseInsensitiveOption);
const QRegularExpression Song::kAlbumRemoveMisc(" ?-? ((\\(|\\[)?)(Remastered|([0-9]{1,4}) *Remaster|Explicit) ?((\\)|\\])?)$", QRegularExpression::CaseInsensitiveOption);
const QRegularExpression Song::kTitleRemoveMisc(" ?-? ((\\(|\\[)?)(Remastered|Remastered Version|([0-9]{1,4}) *Remaster) ?((\\)|\\])?)$", QRegularExpression::CaseInsensitiveOption);

with:

const QRegularExpression Song::kAlbumRemoveDisc("", QRegularExpression::CaseInsensitiveOption);
const QRegularExpression Song::kAlbumRemoveMisc("", QRegularExpression::CaseInsensitiveOption);
const QRegularExpression Song::kTitleRemoveMisc("", QRegularExpression::CaseInsensitiveOption);

before compiling.

Screenshot from 2024-03-02 17-27-37

I don't know if I would call this solved though.

jonaski commented 6 months ago

It's supposed to strip of remastered from the album title to get better matches for cover, lyrics searches, and the scrobbler also uses it, does Last.fm or Listenbrainz have a match for the songs with "Remastered" in it? In that case we should create an option or not do it at all.

But I see it does not handle "(Mono / Remastered)" properly, stripping of half of it, and that's of course a bug.

jonaski commented 6 months ago
const QRegularExpression Song::kAlbumRemoveDisc("", QRegularExpression::CaseInsensitiveOption);
const QRegularExpression Song::kAlbumRemoveMisc("", QRegularExpression::CaseInsensitiveOption);
const QRegularExpression Song::kTitleRemoveMisc("", QRegularExpression::CaseInsensitiveOption);

This is a really bad idea, these constants are used for much more than just the scrobbler.

SnootyInk8302 commented 6 months ago

Yes, it is a slipshoded way of doing it and I do NOT endorse this approach. However it works for me right now so I thought I should share it with others in the meantime. A toggle would definitely be preferred, but I don't know C/C++ so I sadly can't help.

SnootyInk8302 commented 6 months ago

Can confirm the new commit fixed the (Mono / Remastered) problem. Thanks a lot!

Screenshot from 2024-03-02 22-13-59

jonaski commented 5 months ago

I've made an option for turning stripping of remastered off in the scrobbler settings now.

SnootyInk8302 commented 5 months ago

Thank you very much. Glad this was officially added. I was stuck with my old modified version of the app.