TheQwertiest / foo_discord_rich

foobar2000 component for integration with Discord Rich Presence
https://theqwertiest.github.io/foo_discord_rich/
MIT License
433 stars 43 forks source link

Album art from previous track mid-upload gets applied on current track #65

Closed okdargy closed 3 months ago

okdargy commented 3 months ago

Issue

If switching tracks whilst the first track is being uploaded, the second track's art pin query gets applied to the first track's upload URL. This causes the second track's URL to show as the first track's album cover.

Demo

https://github.com/user-attachments/assets/06fb5b61-61ff-4b33-ad78-5199846001a9

TheQwertiest commented 3 months ago

Thanks for the report, but the thing you see here is not the bug you think it is (or rather it's not a bug at all): Discord API severely limits the frequency of Rich Presence update - it's only once per 15 seconds. Every Rich Presence update is counted towards that limit, whether it's text change or image url change (heck, even hover text change).

So, what you see here is the result of that throttling: rapid track switching caused several Rich Presence updates in short period of time, which made following requests to be ignored/throttled.

okdargy commented 3 months ago

But this is clearly a bug, at the least the upload URL should be applied on the correct track in art_urls.json, right?

TheQwertiest commented 3 months ago

To be fair you did not mention the json before :) (and I didn't notice background in your video at first...)