Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrobbling Issues #540

Closed
trevorraney opened this issue Jan 4, 2022 · 16 comments · Fixed by #1032
Closed

Scrobbling Issues #540

trevorraney opened this issue Jan 4, 2022 · 16 comments · Fixed by #1032

Comments

@trevorraney
Copy link

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

@Araxeus
Copy link
Collaborator

Araxeus commented Jan 4, 2022

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

@semvis123
Copy link
Contributor

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)

@trevorraney
Copy link
Author

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

@semvis123
Copy link
Contributor

Yes, the console in the devtools.

@Araxeus
Copy link
Collaborator

Araxeus commented Jan 4, 2022

@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

@trevorraney
Copy link
Author

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

@semvis123
Copy link
Contributor

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 :) )

@thijsi123
Copy link

same issue... just saying ; )

@trevorraney
Copy link
Author

trevorraney commented Feb 23, 2022

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.)

@bytang
Copy link

bytang commented Feb 24, 2022

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.

@trevorraney
Copy link
Author

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.

@tariqchhussain
Copy link

tariqchhussain commented Apr 17, 2022

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.)

@Araxeus
Copy link
Collaborator

Araxeus commented Apr 17, 2022

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:

const postData = {
track: songInfo.title,
duration: songInfo.songDuration,
artist: songInfo.artist,
api_key: config.api_key,
sk: config.session_key,
format: 'json',
...data,
};

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)

@tariqchhussain
Copy link

tariqchhussain commented Apr 17, 2022

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.

@Araxeus
Copy link
Collaborator

Araxeus commented Apr 17, 2022

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, 
 }; 

@renatolond
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants