Repository navigation
Add a preference to turn off starting the next season automatically - #1802
Open
julienbeugras wants to merge 3 commits into
Open
julienbeugras wants to merge 3 commits into
julienbeugras wants to merge 3 commits into
Conversation
Completing a season marks the next released season as in progress. Users who do not start the next season right away, or who log past seasons while backfilling history, had no way to turn this off (FuzzyGrim#1355). The new "Start next season automatically" preference defaults to on, so nothing changes for existing users. When it is off, completing a season leaves later seasons untouched; the show stays in progress while a released season remains, and is still completed when none does. Closes FuzzyGrim#1355
_find_next_available_season now returns the next released season to watch, and _start_next_available_season uses it, so the preference check no longer needs a flag that turns "start" into "look". When the preference is off, completing a season now also tells the user that the next season is available, like the other automatic status changes do. Adds a test for completing a season by watching its last episode with the preference off.
next_released_season picks the next season to watch from a show's season metadata, the seasons the user completed and today's date. The TV model fetches that data and passes it in, so the rule is tested directly without mocking TMDB.
This branch has not been deployed
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 #1355
Completing a season marks the next released season as in progress. Users who don't start the next season right away, or who log past seasons while backfilling their history, currently have no way to turn this off.
Changes
User.auto_start_next_season, migration0060), shown in Preferences between "Hide completed recommendations" and "Hide zero ratings". It defaults to on, so nothing changes for existing users.app.helpers.next_released_season) is now a pure function taking the season metadata, the completed season numbers and the date.TV._find_next_available_seasonfetches that data, andTV._start_next_available_seasonuses it, so the lookup is shared by both branches and tested without mocking the provider.With the preference off, a show can be in progress without an in-progress season. That is the same state the existing code already leaves when the next season hasn't aired yet.
Tests
NextReleasedSeasonTests: next season after the completed one, completed later seasons skipped, specials and earlier seasons ignored, unaired seasons and missing air dates.The new model tests fail against
dev.manage.py test app users integrations lists events --parallelpasses, and so doruff check src,ruff format --check srcand the pre-commit hooks. Also checked by hand on a local instance with a show that has several aired seasons, with the preference on and off.