Closed darrell-k closed 1 year ago
I do clean up some additions. But Remastered isn't any of them. Maybe it's indeed the service I'm calling...
Actually, you do ;)
sub _fetchLyrics {
my ($args, $cb, $ecb) = @_;
# some cleanup... music services add too many appendices
$args->{title} =~ s/[([][^)\]]*?(deluxe|edition|remaster|live|anniversary)[^)\]]*?[)\]]//ig;
$args->{title} =~ s/ -[^-]*(deluxe|edition|remaster|live|anniversary).*//ig;
Do you think we could add:
$args->{title} =~ s/\[E\]$//; # remove Parental Warning/Explicit flag (from Qobuz plugin)
OK, still assuming that the little change to MAI for the "Explicit" flag is possible (see above), I've redone the track number/disc number stuff:
I'm no longer adding numbers to the track titles. I've managed to implement the more complex solution of creating playlist headers in the track listing for each disc, which puts us ahead of the Qobuz native app and will make at least one user very happy :)
These disc playlists will not be created when classical works processing is active and works are found, that would be extremely confusing (works split across discs, etc) even if it didn't completely break things. I've put a note about this in the settings screen, with translations using Google - I hope they're not completely meaningless!
The "Show Discs" option will also add the "disc x of y" thing to the subsidiary lines in the album listing and the player queue.
For track numbers, I've added metadata which persuades Material to show track numbers in the player queue/now playing screens, if the relevant option is set in the Material options. No track numbers in the album listing, but no-one has actually asked for that.
Oh... f...ing inconsistencies: I was looking at other parts of the code where I do a cleanup on the album title, but not the lyrics. Thanks for pointing that out!
Oh2... and that album name cleanup actually would remove anything, or almost anything anyway.
# remove everything between () or []... But don't for PG's eponymous first four albums :-)
$album =~ s/(?<!^)[\(\[].*?[\)\]]//g if $album !~ /Peter Gabriel .*\b[1-4]\b/i && $album !~ /beatles.*white album/i;
....
Yes, I 'd have run through that code when testing to ensure that adding (disc x of y) to the album name in the player queue didn't have any bad effects on the MAI album-based lookups.
So, any further comments/suggestions on this? Or are we about ready?
Thanks!!
You're right about the impact on MAI, at least when amending
$meta->{title}
as sent to the player queue. I'm not sure either the [E] flag or the disc/track number are required there anyway, so I might just remove. I think we're OK with the album/track listings, there isn't a way into MAI from there, is there?One interesting thing I found was that MAI does work with certain strings appended, but not others. For example when retrieving lyrics with the option to add the version to the title enabled (this is The Clash box set Sound System), London's Burning (Remastered) is OK, but London's Burning (Beaconsfield Film School Session) is not. Is this just the online services you use being (slightly) intelligent?