Skip to content

Add TheRun.gg Integration#70

Open
pniedzielski wants to merge 3 commits into
LiveSplit:masterfrom
pniedzielski:therun.gg
Open

Add TheRun.gg Integration#70
pniedzielski wants to merge 3 commits into
LiveSplit:masterfrom
pniedzielski:therun.gg

Conversation

@pniedzielski

@pniedzielski pniedzielski commented Apr 2, 2026

Copy link
Copy Markdown

This pull request adds integration with TheRun.gg to the OBS plugin for LiveSplit One, following the changes in LiveSplit/livesplit-core#903 and LiveSplit/LiveSplitOne#1128. Most of the work required in this PR making sure the TheRun.gg client and the tokio runtime it (via reqwest) requires are set up correctly, and managing the settings UI. I've manually tested these changes with my own TheRun.gg key to make sure that splits are properly tracked.

This is how the settings UI looks now:

Ekrankopio de 2026-04-02 02-52-13

I took the localizations from the LiveSplitOne web UI PR linked above, except for the TheRunGetApiKey/"Get Upload Key` string, which I used an LLM to translate into each supported language. Spot checking the languages I'm familiar with, it looks reasonable. I would appreciate native speaker input though.

Please see the commit messages for each patch in this pull request for more details.

@MinoFloof

MinoFloof commented Apr 9, 2026

Copy link
Copy Markdown

Hey! I tried compiling your repo with "cargo build --release" and copied over the .so file to my OBS, yet I do not see this part of the UI. I'd love to use this feature, but for some reason it's not working.

Maybe the latest version of OBS-Studio that released a couple days ago is messing with something?
I'm appending the logs.
logs.txt

`livesplit-core` was recently updated to provide a `therun_gg::Client`
obkect that sends live split data and uploads .lss files to
therun.gg.  This functionality has been integrated with the web
version of LiveSplit One, but not this OBS plugin.

This patch adds the necessary infrastructure to send timer events to
therun.gg.  Because the `therun_gg::Client` uses `reqwest`, we
initialize its required tokio runtime at module load and share it
across all timer instances.  Each InnerTimer now holds a
`therun_gg_client` that receives events from every `CommandSink`
method, spawning async work on that tokio runtime.

In this patch, we default the client to an empty API key so it won't
communicate with therun.gg.  A subsequent patch will introduce the OBS
settings integration.
The previous patch hooks up the infastructure for therun.gg
integration, but it leaves settings hard-coded.  We want users to be
able to configure these settings from the OBS source properties
dialog.

This patch adds the settings UI for therun.gg integration, allowing
users to set their API key, whether to track live runs, and whether to
upload stats automatically.  These settings are configurable in a
group that also includes a button to open the page on the therun.gg
website where users can retrieve their API key.

The structure of this patch is meant to match closely the way
autosplitter settings are fed from the UI back into the timer.  In
particular, when settings are updated in the UI, a new
`therun_gg::Client` is created with the new API key and settings.
@pniedzielski

Copy link
Copy Markdown
Author

Hey! I tried compiling your repo with "cargo build --release" and copied over the .so file to my OBS, yet I do not see this part of the UI. I'd love to use this feature, but for some reason it's not working.

Maybe the latest version of OBS-Studio that released a couple days ago is messing with something? I'm appending the logs. logs.txt

Please make sure you're building against the branch in this pull request, which has the therun-gg feature enabled by default and installing it correctly.

cargo build --profile max-opt

is all you need to do before installing.

@pniedzielski

Copy link
Copy Markdown
Author

@CryZe Could you take a look at this? It follows closely the other therun.gg integrations. I've been using it for a few months on my own streams, and would love for it to be built in the official Flatpak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants