Open ghost opened 3 years ago
Is there any update on this issue?
The video progress (the AV: 00:01:19/00:51:08
row) in Rich Presence requires frequent updates to keep it real time.
But I don't think there is a workaround to bypass Discord's rate limit.
Perhaps a solution to this issue is to use something else rather than video progress for the text.
Any suggestions on what the text could be?
Would it be possible to add an option (maybe in the config) to update the video progress less frequently?
e.g. every 10 seconds, so Discord's rate limit wouldn't come into effect
Yes, that would be a great solution. I will try to implement it when I'm free.
I don't know much about go so I just changed https://github.com/tnychn/mpv-discord/blob/663f0e3ee1fa81c9833444d9bd8e40583e39bb29/mpv-discord/main.go#L155
to:
for range time.Tick(10 * time.Second) {
😄
The docs state that:
This has a rate limit of 5 updates per 20 seconds. https://discord.com/developers/docs/game-sdk/activities#updateactivity
So 10 seconds should be fine.
Don't know how much value there is in making in configurable?
Actually still gets rate limited, just later lol ^^
Maybe the rate needs to be even lower?
But also games like League of Legends show exact time of match so there probably is another way of doing this
It's already implemented inside of the rich presence, so the easiest way would just be to either remove the line or retool it into something more.. useful.
yeah that's what I was thinking about too. just deprecate that line and instead of updating based on an interval, updating after an action (pause,play,change title, etc) is performed.
side note: also created an action to build the binaries and attach them to releases if a tag is pushed https://github.com/tnychn/mpv-discord/commit/5ce0105391c4b28343cedc66077a16f85b2f75fd should probably put that on it's own branch and create a pr.
Throwing my hat into the ring here to say that I was even blocked by Cloudflare after around 2 hours:
My only guess is that Cloudflare thinks that it was an attempted DoS due to the amount of calls sent to the servers.
Now, while it's definitely possible that this didn't result from this integration, I've never got something like this in all my years of using Discord (even with spamming the Discord servers myself a bit) and it only appeared after starting to use this integration.
I honestly think that this is f*cking hilarious, but this is definitely a problem lmao
Throwing my hat into the ring here to say that I was even blocked by Cloudflare after around 2 hours:
![]()
My only guess is that Cloudflare thinks that it was an attempted DoS due to the amount of calls sent to the servers. Now, while it's definitely possible that this didn't result from this integration, I've never got something like this in all my years of using Discord (even with spamming the Discord servers myself a bit) and it only appeared after starting to use this integration.
I honestly think that this is f*cking hilarious, but this is definitely a problem lmao
This was a global problem just over an hour ago, unrelated to this tool 👍
This was a global problem just over an hour ago, unrelated to this tool 👍
Ah, then I apologize. 🙇🏻
Unfortunate timing for me to start using this.
After a little bit, Discord starts to ratelimit the![image](https://user-images.githubusercontent.com/46719718/120058319-d8831600-bffe-11eb-9bdf-f32a6cced687.png)
AV:
line, plus it's mostly useless because of the "xx:xx left" line (which isn't rate limited due to it being set once) anyway. This also means that it won't receive events for pausing once rate limited, causing it to keep counting down even after pausing.