Lutris: Discord Rich Presence

Created on 18 May 2019  路  4Comments  路  Source: lutris/lutris

The current Implementation doesn't work and it cause problems with certain games. It also spam the terminal with "Discord Rich Presence enabled".

I Tested it, as it is currently implemented , there is no way to activate it as https://github.com/lutris/lutris/commit/780ef9713f91f8c09d59c3a0923bc2713722a7b0 implement the "if PyPresence is not None" the wrong way around, but even fixing it (locally) it still don't work. My guess is that it detects pypresence incorrectly.

Using "pip freeze" it states that pypresence==3.3.2 yet "Discord Rich Presence not available due to lack of pypresence" get spammed to the terminal.

Another issue is that you can't turn Discord Rich Presence of globally, you need to do it for every game, that can be tedious on a large library, Better implementation would be to have DRP turned of globally, and either have a option to turn it on or of globally or independently per game.

@jaymehoward @tannisroot

bug

Most helpful comment

I installed pypresence but even then Discord shows playing Lutris. What am I missing?

All 4 comments

Not at all planning to go with "works on my box" here. I'm jumping on this right now to figure out where I've gone wrong. (Also, further commits will be done with my personal user. I realized after this was merged that my commits were made with my work email.) I clearly put the log lines in reverse there, like you called out. Beyond that, I don't immediately see why it wouldn't be working. The global toggle is a valid callout and I can see about a reasonable way to provide that. Is there a particular place in the UI that'd be desired?

Okay, so it spams the console because when you select the game, you init both the Game and the Runner. Additionally, when you open Lutris, the Runner for every game in the app inits. When the Runner initializes, it has to build a Presence object to know whether or not it should be providing config options for the Discord config. That's fixable by just killing the log lines on the init, but that seems valid to exist from a debugging perspective.

I definitely had the log lines for the true and false cases reversed, and will open a PR to fix that for sure.

Would you mind if I pinged you on Discord to discuss further so I can better understand what's not working beyond the logging indicator problem?

A couple more things on this: pypresence being not installed is intended as the way to disable it globally, by making it an optional feature, which was done at the request of @strycore in the PR.

Maybe a good compromise would be to set the default state of the per-game flag to false instead of true? This could also be a good case for exposing the configuration on each runner, so users could do something like disable it for all Libretro games without having to configure each game individually.

If you get some time, feel free to tag me in here on the issue again, or message me on discord at isugimpy#6812, I'd love to talk this out further and see if I can address your concerns, because I think there's a ton of value in this feature for users.

I installed pypresence but even then Discord shows playing Lutris. What am I missing?

Was this page helpful?
0 / 5 - 0 ratings