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

bug: (YTM) some songs get scrobbled twice, no discernable pattern #228

Closed
2 tasks done
xathon opened this issue Nov 12, 2024 · 13 comments
Closed
2 tasks done

bug: (YTM) some songs get scrobbled twice, no discernable pattern #228

xathon opened this issue Nov 12, 2024 · 13 comments
Labels
bug Something isn't working
Milestone

Comments

@xathon
Copy link

xathon commented Nov 12, 2024

Please check existing knowledge before opening an issue

Describe the Bug

Some songs from YouTube Music get scrobbled twice. Sometimes Maloja detects this and rejects the scrobble (like with the song Feuertaufe by In Extremo in this log excerpt), but most of the time it just shows up duplicated.

I've attached a log (mentions of Spotify removed due to relevance) where I restarted the container, manually reauthenticated, and just played around a bit and skipped songs in the middle, in the beginning, paused for a bit, etc., but never went backwards. The only thing close to a pattern I've been seeing is that these duplicates seem to show up more often if I have paused playback for a bit and then skipped to the next song, or if it's the first song in a while, but this isn't 100% either.

Let me know if there are any other things I should test.

Maloja Scrobbles page:
image

YTM History (ignore top 2, I kept listening; but note how far down A Rash Decision is vs Maloja/Scrobbler Logs):
image

Platform

Docker

Versions

  • multi-scrobbler: docker image foxxmd/multi-scrobbler:pr-203 (for yt auth)
  • maloja: 3.2.2

Logs

too long, see https://termbin.com/g8si 

Additional Context

The log also shows instances of #226 and #227.

@xathon xathon added the bug Something isn't working label Nov 12, 2024
@xathon
Copy link
Author

xathon commented Nov 12, 2024

logs.txt
Alternatively, logs as github download here

@FoxxMD
Copy link
Owner

FoxxMD commented Dec 10, 2024

Thanks for the report and detailed logs. Just want to acknowledge I've seen this. End of the year is a busy time for me (socially). The YTM auth issues have been a larger priority but I will get to this soon ™️

@xathon
Copy link
Author

xathon commented Dec 10, 2024

Oh no worries! I did throw a lot at you :D thanks for the ack, hope you have some quality time!

@xathon
Copy link
Author

xathon commented Dec 10, 2024

Linking my comment from the other issue here as the same thing happens and the logs are a bit more detailed:

#227 (comment)

@nrosier
Copy link

nrosier commented Dec 31, 2024

Also noticed this issue. I just manually remove the duplicates until this gets fixed.

@FoxxMD
Copy link
Owner

FoxxMD commented Jan 2, 2025

@xathon @nrosier please try docker image foxxmd/multi-scrobbler:pr-248 with logDiff and logToFile active and let me know if this fixes anything for you. The changes in PR #248 were made mainly with #227 in mind but they may also address this and #226

If you are still experiencing issues please make sure to post logs and give me a detailed explanation of what is happening, thanks.

@nrosier
Copy link

nrosier commented Jan 8, 2025

@FoxxMD been using pr248-dd4b2eb for a couple of days now. about 50 scrobbles and no duplicates so far. usually I had some every 10-20 scrobbles so it's looking promising.

@FoxxMD
Copy link
Owner

FoxxMD commented Jan 13, 2025

Hi @xathon @nrosier any more updates on whether this fix is holding?

@FoxxMD FoxxMD added this to the 0.9.0 milestone Jan 14, 2025
@xathon
Copy link
Author

xathon commented Jan 14, 2025

Looking good so far, the regular duplicate scrobbles are gone! I did discover what's probably an edge case - I think I listened to a song at like 00:06 today, but didn't finish it. When I opened YTM just now, it was the song that was in Now Playing, but at 0:00. It did show up twice in the scrobbeled tracks though, but both as 22 hours ago. I'll get the logs and attach them here.

scrobble-2025-01-13.9.log
ytmusic-YTMusic-2025-01-13.9.log

Edit: after looking through the logs, I think it's a different reason. The song that was scrobbled twice (They don't care about us) was in the list before, just in a lower position.

@FoxxMD
Copy link
Owner

FoxxMD commented Jan 15, 2025

I don't think that is avoidable, unfortunately. Since YTM does not timestamp anything and MS is at the mercy of this one list...if YTM decides to bump that track because its its in now playing when the browser is opened then MS is going to see that as a play. Even if that's not the exact behavior (reopening browser or player) the bump is valid as far as MS is concerned.

This might not be 100% perfect but it's a huge improvement over the previous detection and seems to have fixed the original cause of this issue. For the sake of getting the new YTM authentication and detection code into a proper release I'm going to consider this fixed for now. If you see this edge case continue to appear let's open a new issue to address it.

EDIT: I'm also going to close #226 #227 as I think all of these changes to detection were related and have addressed these issues. If you find they are still occurring I am happy to re-open them.

@FoxxMD FoxxMD closed this as completed Jan 15, 2025
@FoxxMD FoxxMD reopened this Jan 15, 2025
@FoxxMD
Copy link
Owner

FoxxMD commented Jan 15, 2025

Fixed in v0.9.0

@FoxxMD FoxxMD closed this as completed Jan 15, 2025
@xathon
Copy link
Author

xathon commented Jan 15, 2025

Yeah, agree that this probably can't be avoided. Just wanted to mention it since it fit the issue at hand.

But yeah, I think the other issues were related to that as well. Thanks a lot for your work!

@nrosier
Copy link

nrosier commented Jan 16, 2025

I have over 150 scrobbles with 0 duplicates so this seems to fix it. Thanks a lot for the great work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants