fix(filter): extract TorrentFilterStrategy, fix active filter, align with qBittorrent 5.2.0#128
Merged
Conversation
…h qBittorrent isActive() definition - Extract filter logic into TorrentFilterStrategy protocol + QBitTorrentFilterStrategy - Fix active filter from speed-based to state-based, matching qBittorrent's isActive() - Add transition methods (applyPause/Resume/ForceStart/Recheck) to Torrent as single source of truth - Replace duplicated inline transition closures in both ViewModels with Torrent methods
- Rename paused→stopped, resumed→running to match WebUI terminology - Add moving filter - Fix swapped Seeding/Downloading tags (were mapped to stalled variants) - Remove app-only Active Downloading/Active Seeding labels - Add missing Stalled Uploading, Stalled Downloading, Checking, Moving entries
…, match qBittorrent order
…ted, revert active to speed-based - Split .seeding and .completed: seeding = active upload states; completed = seeding + pausedUP/stoppedUP - Revert .active to speed-based (dlspeed>0 || upspeed>0) to match qBittorrent WebUI - Keep .running as state-based (not paused, not errored) - Add queuedDL to .downloading - Remove fake state strings from strategy (seeding, completed) - Fix test fixtures: seeding → uploading (real qBittorrent state)
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.
Closes #127
Summary
Fixes the pause-bug where pausing a torrent from the details view left it visible under the Active filter. Along the way, extracted a portable filter strategy, aligned filter names and ordering with qBittorrent 5.2.0 WebUI, and added per-filter counts.
Key Changes
QBitTorrentFilterStrategyimplementation. Extracted filter logic fromgetProcessedTorrentsinto a standalone, injectable strategy. Transmission-ready.Torrentnow hasapplyPause(),applyResume(),applyForceStart(),applyRecheck()methods — both ViewModels call the same transition logic, eliminating the drift that caused [BUG] If you add a torrent and pause it while selecting to show "Active" torrents in the filters the torrent doesn't disappear as it should #127.seeding,completed) from strategy and test fixtures. Active filter reverted to speed-based (dlspeed>0 || upspeed>0) matching qBittorrent's actual behavior. Supports bothstoppedDL/pausedDLvariants for v4/v5 compatibility.Technical Notes
rawValue— oldresumed/pausedvalues gracefully fall back toAll.PickerStyle.inlinereplaced with Section+Button for filter list to get checkmark/count alignment control.