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

UICommon/DiscordPresence: Use GameTDB covers for RPC #11751

Merged
merged 1 commit into from May 19, 2023

Conversation

noahpistilli
Copy link
Contributor

Rehash of #10390 but cleaner. Discord allows for using URL's for their RPC images. Documented as of this PR.

The image will be the Dolphin logo if GameTDB does not have a cover for the current game.
Screenshot 2023-04-11 at 10 12 21 PM

Otherwise, the cover of the game will appear in the RPC.
Screenshot 2023-04-11 at 10 16 42 PM

Source/Core/Core/ConfigManager.cpp Outdated Show resolved Hide resolved
@noahpistilli noahpistilli force-pushed the discord-rpc branch 3 times, most recently from decba29 to 8bb04c4 Compare April 19, 2023 02:19
@OatmealDome
Copy link
Member

My concerns with this PR:

  • We should probably avoid downloading the image if possible, even if it is a relatively small size. We can probably do this with a HEAD request instead of using GET. (Dolphin's code doesn't currently support this, though. Shouldn't be that hard to add.)
  • What happens if the network request takes a long time? If the user's network is slow, for example, will UpdateDiscordPresence hang the emulator while it attempts to contact GameTDB?

@OatmealDome
Copy link
Member

OK, as we discussed on Discord, I've set up a server-side script that will handle the cover art lookup for us:

https://discord.dolphin-emu.org/cover-art/<region>/<game ID>.png

Here's some example URLs:

With this, you should be able to get rid of the network request code.

@AdmiralCurtiss AdmiralCurtiss merged commit 4efa10c into dolphin-emu:master May 19, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants