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

feat: add PlayCount Plugin #736

Merged
merged 14 commits into from
Jan 14, 2025
Merged

feat: add PlayCount Plugin #736

merged 14 commits into from
Jan 14, 2025

Conversation

itsOwen
Copy link
Contributor

@itsOwen itsOwen commented Dec 28, 2024

Plugin Description

PlayCount is a Steam Deck plugin that shows real-time player counts for Steam games directly in the UI. It helps users see how active a game's community is before launching.

Features

  • Clean and minimal interface
  • Display Live Player Count in Steam Store.
  • Display Live Player Count in Steam Library Games

Developer Checklist

  • I am the original author or an authorized maintainer of this plugin.
  • I have abided by the licenses of the libraries I am utilizing, including attaching license notices where appropriate.

Plugin Checklist

  • I have verified that my plugin works properly on the Stable and Beta update channels of SteamOS.
  • I have verified my plugin is unique or alternatively provides more/alternative functionality to a similar plugin already on the store.

Plugin Backend Checklist

  • Using custom backend other than Python: ✅ No
  • Using 3rd party FOSS project tools without static linking: ✅ No
  • Using custom binary with static linking: ✅ No

Testing

  • Tested on SteamOS Stable Update Channel.

  • or

  • Tested on SteamOS Beta Update Channel.

  • ✅ No special dependencies required

  • ✅ No known conflicts with other plugins

Additional Notes

  • ✅ Plugin uses Steam's public API for player counts
  • ✅ Lightweight implementation with minimal system impact
  • ✅ All code is open source and well-documented

Copy link
Member

@TrainDoctor TrainDoctor left a comment

Choose a reason for hiding this comment

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

Please properly gitignore your dist folder from the repo, update your DFL dependency to the latest version. An update to match the websockets plugin template is not required but is highly recommended. You would be able to drop any python at that point as well.
I'm pretty sure that these are the only changes needed.

@TrainDoctor TrainDoctor added the needsfix An issue/change request needs to be resolved label Dec 29, 2024
@itsOwen
Copy link
Contributor Author

itsOwen commented Dec 30, 2024

  • frontlib is 3.25 already latest
  • dist added in gitignore
  • removed py files

@itsOwen
Copy link
Contributor Author

itsOwen commented Dec 30, 2024

Moved to the latest decky plugin template :)

Thanks to all the supporters

Copy link
Member

@TrainDoctor TrainDoctor left a comment

Choose a reason for hiding this comment

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

Changes look good. Off to testing.

@itsOwen
Copy link
Contributor Author

itsOwen commented Dec 31, 2024

Lock file added.

Copy link
Member

@TrainDoctor TrainDoctor left a comment

Choose a reason for hiding this comment

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

Image needs to be changed to an actual URL in plugin.json, once that's done the plugin will actually finish CI/CD.

@TrainDoctor TrainDoctor requested review from TrainDoctor and a team January 2, 2025 19:05
@itsOwen
Copy link
Contributor Author

itsOwen commented Jan 2, 2025

Added an actual URL in plugin.json as requested by Train!

Copy link
Member

@TrainDoctor TrainDoctor left a comment

Choose a reason for hiding this comment

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

Already in testing, but giving it official stamp.

@FrogTheFrog
Copy link
Contributor

The plugin does not properly remove the injected banner into the app page, resulting in multiple layered banners when the plugin is reloaded or uninstalled.

@itsOwen
Copy link
Contributor Author

itsOwen commented Jan 12, 2025

The plugin does not properly remove the injected banner into the app page, resulting in multiple layered banners when the plugin is reloaded or uninstalled.

Wdym frog can you please explain everything seems to be working fine on my end woth no duplication.

@FrogTheFrog
Copy link
Contributor

The easiest way to test it is uninstall the plugin. Then navigate to the app page and the playcount banner is still there.

I think this is incorrect:
https://github.com/itsOwen/playcount-decky/blob/aa62d6af42cbc0cd681ec12d596cd12a255156bc/src/patches/LibraryPatch.ts#L120

It should be something like this:
routerHook.removePatch('/library/app/:appid', unpatch);

Copy link
Member

@TrainDoctor TrainDoctor left a comment

Choose a reason for hiding this comment

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

The easiest way to test it is uninstall the plugin. Then navigate to the app page and the playcount banner is still there.

I think this is incorrect: https://github.com/itsOwen/playcount-decky/blob/aa62d6af42cbc0cd681ec12d596cd12a255156bc/src/patches/LibraryPatch.ts#L120

It should be something like this: routerHook.removePatch('/library/app/:appid', unpatch);

I am considering this a blocking issue until resolved.

@TrainDoctor TrainDoctor removed the needsfix An issue/change request needs to be resolved label Jan 13, 2025
@TrainDoctor TrainDoctor requested a review from a team January 13, 2025 06:30
@Tormak9970
Copy link
Contributor

Testing Report

Versions

Decky: v3.1.2-pre1
SteamOS: v3.6.20

Summary

Major blocking issues

  • None

Minor issues

  • The menu bar patch for the store page causes the following:
    • Button labels in the menu bar are hidden when not navigating
    • Button labels in the menu bar flicker constantly when navigating

Currently installed plugins

  • TabMaster - Dev (essentially v2.7.3)
  • CSS Loader - 2.1.2
  • SteamGridDB - 1.4.0

Yay/nay on to send to the production store or if it requires more testing.

  • I think the button flickering / hiding is a pretty big cosmetic issue, and should be fixed before the plugin is released, but other than that it looks great! Looking forward to using this

@itsOwen
Copy link
Contributor Author

itsOwen commented Jan 13, 2025

@Tormak9970

  1. Button labels in the menu bar are hidden when not navigating
  • i dont understand what are you trying to say here.
  1. Button labels in the menu bar flicker constantly when navigating
  • do you mean footer playcount text? if yes I have never seen it flicker neither the library playercount. I will try to reproduce it with the same version of plugins you are using.

edit: do you mean menu button and select A button flickering? If yes then I dont see it either. I will keep trying to reproduce the issue.

@Tormak9970 Tormak9970 mentioned this pull request Jan 13, 2025
6 tasks
@jessebofill
Copy link
Contributor

yeah I believe you a some issue with your footer patching.

Here is one example where the footer items disappear.
https://github.com/user-attachments/assets/ce60bc23-40c6-4d89-9a08-2b4a7a92259e

It seems to happen in specific cases, but it's a bit unpredictable what those are. So far it seems reliably reproducible when first starting the store and also when navigating to a game page (in the store) and then reloading the store (as demonstrated in video). There may be other cases and imo further testing is necessary.

@itsOwen
Copy link
Contributor Author

itsOwen commented Jan 14, 2025

Decky-Recorder_2025-01-14_04-19-07.mp4

@jessebofill @Tormak9970 So I tested the issue you were discussing. I think the problem might be with the Decky Loader pre1 itself, but I'm not sure. I uninstalled all plugins, uninstalled Decky Loader, and reinstalled Decky. After that, I tested the issue and confirmed it's unrelated to my plugin or any other plugin, as it happens without them. So I installed Decky Recorder and recorded it for you.

@Tormak9970
Copy link
Contributor

Decky-Recorder_2025-01-14_04-19-07.mp4

@jessebofill @Tormak9970 So I tested the issue you were discussing. I think the problem might be with the Decky Loader pre1 itself, but I'm not sure. I uninstalled all plugins, uninstalled Decky Loader, and reinstalled Decky. After that, I tested the issue and confirmed it's unrelated to my plugin or any other plugin, as it happens without them. So I installed Decky Recorder and recorded it for you.

I just tested and weirdly enough it does happen without the plugin installed. I checked that earlier twice, and it functioned fine. Since that's the case the plugin looks good to me 👍

@itsOwen
Copy link
Contributor Author

itsOwen commented Jan 14, 2025

@Tormak9970 @TrainDoctor @jessebofill

Okay, so after thorough testing, I think I've found the issue; it's related to the latest stable version of SteamOS itself.

What I did:

  1. Reset my Deck to factory settings.

  2. Then, after logging in, I couldn't see the issue, but as soon as I updated the Steam Deck to 3.6.20 (latest stable), the issue appeared (I never installed Decky Loader).

  3. It seems the new SteamOS update has this issue.

  4. DeckyLoader has no issues whatsoever, nor do my plugins or any other plugins.

  5. Resetting deck:
    https://youtube.com/shorts/Q7ThvA-e4nI?si=Em7LnapS2Uj8Vbmt

  6. First boot:
    https://youtu.be/9ZUYOyUxy6U?si=FbQ-WGEgGfxDPPVQ

  7. setting up:
    https://youtube.com/shorts/dSbpHaKEA-k?si=D3-9tR9EID9ytkyh

  8. Testing the flickering issue:
    https://youtu.be/xmpoTcnQQjE?si=_WdQfKVebWIGlpvf

@jessebofill
Copy link
Contributor

Yeah that makes sense. In that case here's my official report.

Testing Report

Versions

Decky: v3.1.2-pre1
SteamOS: v3.6.21 (Beta)

Summary

Major blocking issues

None

Minor issues

None

Currently installed plugins

  • TabMaster - 2.7.3
  • CSS Loader - 2.1.2
  • SteamGridDB - 1.5.1
  • Web Browser - 1.3.3
  • HLTB - 1.5.0
  • Junk-Store - 1.1.7
  • PlayTime - 1.0.0
  • AutoSuspend - 2.1.0
  • Game Theme Music - 1.5.0
  • Animation Changer - 1.3.1
  • MicroSDeck - 0.10.11

Yay/nay on to send to the production store or if it requires more testing.

Yay

Copy link
Member

@TrainDoctor TrainDoctor left a comment

Choose a reason for hiding this comment

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

With issues resolved from earlier commits, and flickering bug confirmed to be unrelated to Decky or this plugin (including any UI patching this plugin performs) by testers, it looks like production is a go ahead.

@TrainDoctor TrainDoctor merged commit 2786647 into SteamDeckHomebrew:main Jan 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants