Last.fm Scrobble Improvements
Currently the Last.fm plugin scrobbles using the provided song title and author. However, many Youtube channels I listen to don't appear to have proper metadata for their videos so it ends up scrobbling like:
{
track: "Artist - Title",
artist: "Youtube Channel"
}
Would it be possible for the plugin to be modified such that it can parse the video title to see if the video title has the artist and track title?
The expected behavior can be seen in the Web Scrobbler Chrome extension
Would it be possible for the plugin to be modified such that it can parse the video title to see if the video title has the artist and track title?
how would we know if the video title has the artist and track title?
Looking at the code of Web Scrobbler: https://github.com/web-scrobbler/web-scrobbler/blob/f7ca2f3fb488afb3717f2681f6f5cd82608c6e3a/src/connectors/youtube-music.ts#L80-L96
it seems that they check if an album is available: -
if it is then the artist name is the channel name
if not then they assume the video title is artist - trackname
but thats a false assumption... there are many artists that have a channel page that is their name, and then the video name is only the trackname (for example https://music.youtube.com/watch?v=e7VveWeRwUU)
but thats a false assumption... there are many artists that have a channel page that is their name, and then the video name is only the trackname (for example https://music.youtube.com/watch?v=e7VveWeRwUU)
In this example, the channel is RÜFÜS DU SOL and the video title is "RÜFÜS DU SOL - Alive (Official Music Video)" and it was able to correctly scrobble it, because it has the correct song metadata (you can see it if you go to description of the Youtube video rather than the Youtube Music page). Usually if the channel is the official artist page, then they usually have the correct metadata for Youtube Music to natively detect it correctly.
Here are two examples where their algorithm works well: https://youtu.be/GE0DhtpadWs Channel: Trap Nation, Title: San Holo - All The Highs https://youtu.be/SQK4xjionNQ Channel: Cloud Kid, Title: Golden Features - Vigil
The first here is scrobbled using the extension, the bottom two are with the Youtube Music desktop app:

I do understand the fact that the assumptions made won't work for all videos, such as those in Trackname - Artist format or those similar to Artist - Trackname (Lyrics), etc. But from my experience using the Web Scrobbler extension, their rudimentary algorithm is able to correctly scrobble most channels I use and it would be an improvement over the naive approach currently used.
However, I do understand my use case is sort of niche, because most of my music is from these label or "curation" channels rather than from official artist channels. In which case, if you believe this isn't necessary, I'd be open to working on it myself and creating a PR for it
I've been using the web scrobbler plugin in firefox for about a year to save data to last.fm for youtube music, and the song/artist tags I customized have accumulated quite a bit. We can import or export these customized song/artist tags from web scrobbler with the “local-cache.json” file. It would be nice if we could import the “local-cache.json” file that holds these edits into the application. If it helps, I can share my own “local-cache.json” file as an example.
I've been using the web scrobbler plugin in firefox for about a year to save data to last.fm for youtube music, and the song/artist tags I customized have accumulated quite a bit. We can import or export these customized song/artist tags from web scrobbler with the “local-cache.json” file. It would be nice if we could import the “local-cache.json” file that holds these edits into the application. If it helps, I can share my own “local-cache.json” file as an example.
Import/export would probably be a separate issue, but you should drop your .json so we can compare it's parsing method.
Oh, and the repo for the plugin is a bit hidden, but here it is.
Sure, I can attach the file if it helps. local-cache.json
When this gets implemented, it would also be nice to be able to import scrobble edits from the Web Scrobbler extension and the Pano Scrobbler app.
The ability to manually set track metadata and remember it for future scrobbles is basically a necessity on a platform like YouTube Music since many songs aren't "official" and don't have proper metadata, honestly it's shocking to me this hasn't been added yet.
For something like a Spotify, you don't really need it unless your super nitpicky about not having any variations like "Live", "Remaster", etc. since otherwise, you know for sure the title and artist will be accurate, most people would be fine leaving it as is but here songs that are only in video form vary wildly all over the place. Some might have the completely wrong song name or even no song name at all (like a video game soundtrack calling the song by the level name, not what it actually is on the official soundtrack), no artist at all or it could come first or second in the title, no album info, the channel name might be used as the artist and isn't actually the artist, etc.
honestly it's shocking to me this hasn't been added yet.
well, up until now no contributor has been interested, it's not shocking really if you are interested in becoming a contributor, but do not know how, you can always ask for help!
There is no team of developers, no planning, just doing stuff we are interested in, and if what we make sounds good to the maintainers (th-ch, Jellybrick, SuYong), they merge it.
PS: In addition, you can always mention me in the PRs you make for review/assistance. (don't be surprised if I show up unannounced)
Edit: Maybe it would be a good idea to have some planning :^)