Skip to content

Fix Steam achievements from always being disabled#700

Open
damirarh wants to merge 1 commit into
Lacro59:masterfrom
damirarh:fix/steam-achievements
Open

Fix Steam achievements from always being disabled#700
damirarh wants to merge 1 commit into
Lacro59:masterfrom
damirarh:fix/steam-achievements

Conversation

@damirarh

@damirarh damirarh commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #695

Summary by CodeRabbit

  • New Features
    • Added the ability to enable or disable Steam achievements integration through the application settings.

@coderabbitai

coderabbitai Bot commented Apr 25, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR adds an EnabledInSettings() method override to the SteamAchievements class that gates client activation based on plugin settings. The override checks PluginDatabase.PluginSettings.Settings.EnableSteam to conditionally enable or disable the Steam achievements client.

Changes

Cohort / File(s) Summary
Steam Achievements Settings Gate
source/Clients/SteamAchievements.cs
Adds EnabledInSettings() override method to condition the Steam achievements client's enabled state on the plugin's Steam setting configuration.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰✨ A little override to light the way,
The Steam achievements work again today!
No more flashing bars that fade too quick,
This settings gate was just the trick! 🎮⭐

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately describes the main change: adding an EnabledInSettings() override to fix Steam achievements being disabled.
Linked Issues check ✅ Passed The new EnabledInSettings() override directly addresses issue #695 by allowing Steam achievements to be enabled based on plugin settings.
Out of Scope Changes check ✅ Passed The code change is narrowly scoped to adding one method override in SteamAchievements, directly addressing the linked issue without extraneous modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
source/Clients/SteamAchievements.cs (1)

508-511: LGTM — correctly restores the Steam achievements gating.

This override addresses the regression in #695: without it, SteamAchievements inherited the base default EnabledInSettings() => false, so SuccessStoryDatabase.VerifToAddOrShow() would short-circuit and log "found no action" for every Steam game (matching the symptom in the linked issue). The implementation also mirrors the established pattern in PSNAchievements.EnabledInSettings(), keeping the achievement providers consistent.

📝 Optional: add an XML doc comment for consistency

Every other public override in this file (e.g., ValidateConfiguration, IsConnected, IsConfigured) carries an XML doc summary. Adding one here keeps the file uniform:

+        /// <summary>
+        /// Indicates whether the Steam achievements client is enabled in the plugin settings.
+        /// </summary>
+        /// <returns>True if <see cref="SuccessStorySettings.EnableSteam"/> is set, otherwise false.</returns>
         public override bool EnabledInSettings()
         {
             return PluginDatabase.PluginSettings.Settings.EnableSteam;
         }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@source/Clients/SteamAchievements.cs` around lines 508 - 511, Restore the
Steam gating by keeping the EnabledInSettings override in SteamAchievements
(public override bool EnabledInSettings()) and add a concise XML doc summary
above it consistent with other overrides (e.g., ValidateConfiguration,
IsConnected, IsConfigured) describing that it returns whether Steam integration
is enabled in PluginSettings.Settings.EnableSteam; ensure the method body
remains "return PluginDatabase.PluginSettings.Settings.EnableSteam;" and the XML
comment uses the same style as the other public overrides.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@source/Clients/SteamAchievements.cs`:
- Around line 508-511: Restore the Steam gating by keeping the EnabledInSettings
override in SteamAchievements (public override bool EnabledInSettings()) and add
a concise XML doc summary above it consistent with other overrides (e.g.,
ValidateConfiguration, IsConnected, IsConfigured) describing that it returns
whether Steam integration is enabled in PluginSettings.Settings.EnableSteam;
ensure the method body remains "return
PluginDatabase.PluginSettings.Settings.EnableSteam;" and the XML comment uses
the same style as the other public overrides.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4936762a-0a60-4c7c-9c41-da9f01621add

📥 Commits

Reviewing files that changed from the base of the PR and between 36a09ba and 9399924.

📒 Files selected for processing (1)
  • source/Clients/SteamAchievements.cs

@avi-r99

avi-r99 commented May 27, 2026

Copy link
Copy Markdown

Works, thank you!

@uWaazy

uWaazy commented Jun 18, 2026

Copy link
Copy Markdown

playnite-successstory-plugin-fixsteam.zip

Hi! Since the official update isn't out yet, I compiled a ready-to-use version incorporating this PR #700 fix to make Steam sync work again.

In addition to this, I also applied a database fix in ItemCollection.cs (changing .Add to .TryAdd) to prevent the plugin from crashing when it tries to save data concurrently.

You can download the .pext file in the zip attached below. Just drag and drop it into Playnite to install. Hope this helps!

@GhostOfRaistlin

Copy link
Copy Markdown

playnite-successstory-plugin-fixsteam.zip

Hi! Since the official update isn't out yet, I compiled a ready-to-use version incorporating this PR #700 fix to make Steam sync work again.

In addition to this, I also applied a database fix in ItemCollection.cs (changing .Add to .TryAdd) to prevent the plugin from crashing when it tries to save data concurrently.

You can download the .pext file in the zip attached below. Just drag and drop it into Playnite to install. Hope this helps!

This is what I was looking for: An easy install! I consider myself a superuser, but everything above your post simply gave me a headache, so thank you uWaazy

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.

3.7.1 Update breaks Steam achievements.

4 participants