flecs icon indicating copy to clipboard operation
flecs copied to clipboard

Scrobbling Issues

Open trevorraney opened this issue 2 years ago • 16 comments

Using version 1.15.0. When playing an album, only the first track will be properly scrobbled to Last.fm. Subsequent tracks will appear in Last.fm as "scrobbling now" but then not commit.

image image

trevorraney avatar Jan 04 '22 15:01 trevorraney

@semvis123 (the one who coded last-fm plugin)

Araxeus avatar Jan 04 '22 15:01 Araxeus

Hmm weird, are there any error messages in the console? (Scrobbles only get added once you listen +50% of the song, or pass the 4 minute mark. So if you skip the song before that it won't be added)

semvis123 avatar Jan 04 '22 16:01 semvis123

Do you just mean the console accessible through Shift+Control+I? Want to make sure I'm looking in the right place.

trevorraney avatar Jan 04 '22 17:01 trevorraney

Yes, the console in the devtools.

semvis123 avatar Jan 04 '22 17:01 semvis123

@semvis123 does it works for you on v1.15? (I've never actually used this plugin 😅)

something might have broke in the last updates (song-info was changed slightly tho I can't see how it would break things)

if it doesn't work for you either then maybe #537 could be a possible fix

Araxeus avatar Jan 04 '22 17:01 Araxeus

Lot of warnings that start with "DevTools failed to load source map: Could not parse content for..." No errors. image

trevorraney avatar Jan 04 '22 17:01 trevorraney

Can't reproduce the issue (everything gets logged correctly), i'm using 1.15 with no extra plugins enabled (except the plugins enabled by default)

(btw did not notice that this project had improved so much since I last checked, well done :) )

semvis123 avatar Jan 04 '22 18:01 semvis123

same issue... just saying ; )

thijsi123 avatar Jan 17 '22 14:01 thijsi123

Commenting just to say the problem still persists when playing an album in version 1.16.0. But when you play a song and autoplay is enabled, songs are scrobbled correctly.

Songs — played from an album or otherwise — appear correctly in Discord though.

(The latest release looks great though! Like the UI updates.)

trevorraney avatar Feb 23 '22 15:02 trevorraney

I've been experiencing this since 1.14 until now on 1.16 still the same issue. Since the plugin author doesn't experience this, I tried a clean reinstall of the app and found scrobbling working as intended. Then, I signed in to my Google account and scrobbling broke. Then I signed out and scrobbling works again.

bytang avatar Feb 24 '22 14:02 bytang

Not sure if it would be of any benefit to check them out, but I've been trying out Cider's Apple Music app, also based on Electron. Their implementation of Last.fm scrobbling and Discord rich presence has worked great for me so far.

trevorraney avatar Mar 02 '22 15:03 trevorraney

Giving this issue a bump as I have been coming across an issue which, although not exactly the same as OP's, is still fairly annoying. I'm not sure if I'm the only one experiencing this, but when I scrobble a track, all metadata except for the album is scrobbled which leaves gaps in my last.fm history. On the contrary, there are Chrome extensions that scrobble the album metadata, and I was wondering why this isn't the case for this application? Not entirely the end of the world, of course, but its the only obstacle stopping me from using this application full time. Don't get me wrong, this application is near perfect but I would still love for this issue to be looked at and fixed if possible.

(I'm currently on 1.16.)

tariqchhussain avatar Apr 17 '22 14:04 tariqchhussain

Album name is not available when the current song is a video, but it could still be sent when it is a normal song

should be easy to fix: https://github.com/th-ch/youtube-music/blob/23058729f3965deb0bff9b638feb5d419da6e913/plugins/last-fm/back.js#L88-L96 add album field (already present in songInfo)

 const postData = { 
 	track: songInfo.title, 
 	duration: songInfo.songDuration, 
 	artist: songInfo.artist, 
    album: songInfo.album, // will be undefined if current song is a video
 	api_key: config.api_key, 
 	sk: config.session_key, 
 	format: 'json', 
 	...data, 
 }; 

https://www.last.fm/api/show/track.scrobble

can someone here test if that works properly? (I can upload windows binaries if wanted)

Araxeus avatar Apr 17 '22 14:04 Araxeus

Hey, thanks for replying so swiftly! I've just tested the changes to the backend, and it appears that it works... kind of. It is indeed sending something to last.fm, but according to what I've seen in Pano Scrobbler, the album title is coming up as "undefined" instead of the actual title. I've tried with many songs (not videos) and it seems to be reproducing the same results. Any ideas?

EDIT: Quick update: I've worked around this issue by changing album: undefined, to album: "" in songInfo.js. As expected when watching videos the albums are scrobbled as "undefined", but I seldom watch them in this app anyway so hopefully it shouldn't matter too much. I can confirm that, for actual songs, the albums are being scrobbled correctly in Pano Scrobbler and the last.fm website. Now I can finally call this app perfect.

tariqchhussain avatar Apr 17 '22 16:04 tariqchhussain

use ...(songInfo.album ? { album: songInfo.album } : undefined)

^ I will commit a pr with this fix

 const postData = { 
 	track: songInfo.title, 
 	duration: songInfo.songDuration, 
 	artist: songInfo.artist, 
    ...(songInfo.album ? { album: songInfo.album } : undefined), // will be undefined if current song is a video
 	api_key: config.api_key, 
 	sk: config.session_key, 
 	format: 'json', 
 	...data, 
 }; 

Araxeus avatar Apr 17 '22 17:04 Araxeus

Hey, I'm having the issue here. I tried keeping the network tab issue but I'm not even seeing scrobbling requests there (even though I also see the tracks as "scrobbling now" but they never seem to be commited). I also tried upgrading to 1.17 to get the changes in #695 but it doesn't seem to make a difference.

renatolond avatar Aug 12 '22 13:08 renatolond