-
Notifications
You must be signed in to change notification settings - Fork 158
fix: Hide items from continue watching when >= 95% watched #925
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
base: development
Are you sure you want to change the base?
fix: Hide items from continue watching when >= 95% watched #925
Conversation
Fixes Stremio#12 - Items are now removed from continue watching section when user has watched >= 95% of their duration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements the feature requested in issue #12 to hide movies and episodes from the continue watching section once users have watched 95% or more of their duration.
Changes:
- Added a 95% completion threshold constant to filter items from the continue watching section
- Modified
is_in_continue_watching()method to exclude items with progress >= 95%
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let recently_removed = self.removed && self.mtime > year_ago; | ||
| self.r#type != "other" && (!self.removed || recently_removed) | ||
| } | ||
| const CONTINUE_WATCHING_COMPLETION_THRESHOLD: f64 = 95.0; |
Copilot
AI
Jan 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constant CONTINUE_WATCHING_COMPLETION_THRESHOLD is placed in the middle of the impl block between methods, which is unconventional in Rust. Constants should typically be declared at the top of the impl block before any methods, or moved to the src/constants.rs file where similar thresholds like WATCHED_THRESHOLD_COEF are defined. This would improve code organization and make the constant more discoverable alongside other project-wide constants.
| pub fn is_in_continue_watching(&self) -> bool { | ||
| // re-added (!self.removed || temp) check | ||
| // makes sure to add only relevant Library Items to the Continue Watching | ||
| self.r#type != "other" && (!self.removed || self.temp) && self.state.time_offset > 0 | ||
| self.r#type != "other" | ||
| && (!self.removed || self.temp) | ||
| && self.state.time_offset > 0 | ||
| && self.progress() < Self::CONTINUE_WATCHING_COMPLETION_THRESHOLD | ||
| } |
Copilot
AI
Jan 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The is_in_continue_watching() method lacks a documentation comment explaining its behavior, especially the new 95% completion threshold. Adding a doc comment would help other developers understand when items are filtered from the continue watching section. Consider adding documentation similar to the should_pull_notifications() method above, which clearly lists the conditions that must be met.
Summary
Fixes #12 - Items are now removed from the continue watching section when the user has watched >= 95% of their duration.
Changes
Testing
All 194 existing tests pass.