Repository navigation
Add pause_when (CI-green follow-up to #246) - #251
Closed
BlivionIaG wants to merge 5 commits into
Closed
BlivionIaG wants to merge 5 commits into
BlivionIaG wants to merge 5 commits into
Conversation
Discord shows one activity at a time, so while a game or Spotify is
running FetchCord's system info replaces the status the user actually
wants on their profile. There's currently no way to say "let that one
win".
pause_when lists the programs that should. While any of them is running
the presence is cleared and the loop just waits; when they exit it picks
up where it left off. The .exe suffix is optional in both directions, so
one entry works on every platform.
Configurable two ways:
fetchcord --pause-when steam spotify
or pause_when in fetchcord_conf.yml. The CLI wins. I added the flag
because Config() only ever reads the packaged YAML - there's no
%APPDATA%/XDG lookup - so a config-only version of this would mean
editing files inside site-packages to use it.
Matching is on the whole process name, not a substring, so "steam"
doesn't get triggered by steamwebhelper. The transitions are announced
once each rather than every cycle.
psutil is already a dependency, so nothing new is pulled in.
args.py is a mechanical adjacent insert - master's --install-startup group and --pause-when both stay. __main__.py needed a decision. Master hoisted the snapshot out of the cycle loop (one collection per rotation), and the pause check sat inside that loop, so a straight merge would have collected a full snapshot on every rotation while paused - a dozen PowerShell processes on Windows, for a rotation that sends nothing. The check now runs at the top of the rotation, ahead of the snapshot, so pausing skips the collection too. Added the assertion for that to the paused test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WB6HG4WLukGEjhcq8FZJ7A
Resolve conflicts with #244 (--dry-run) by keeping both features: pause_when and dry-run are adjacent additions to args, __main__, and tests. Also point the pause loop test at presence.get_component_id after the resolve_cycle refactor on master. Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.com>
Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.com>
BlivionIaG
marked this pull request as ready for review
September 11, 2026 17:50
Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries #246 (
pause_when) rebased/merged onto currentmaster(includes--dry-runfrom #244), plus a one-lineruff formatfix that was failing CI on #246.Why a separate PR: after the merge commit was pushed to
nyannoying1337:feat/pause-when, further pushes to that fork branch are rejected (maintainer_can_modifyis off), so the format fix could not land on #246 itself.CI fix:
tests/test_more.pyneeded a blank line betweenTestPauseWhenInTheLoopandTestDryRun(ruff format --check).Same feature as #246; prefer merging this or re-enabling maintainer edits on #246 and cherry-picking
c09eacb.