[change] next_series_* - Emit following season if latest download is a season pack#1794
[change] next_series_* - Emit following season if latest download is a season pack#1794tubedogg wants to merge 6 commits intoFlexget:developfrom
Conversation
…season pack Given a last release in series history of a season pack, now emits S04 for next_series_seasons or S04E01 for next_series_episodes as opposed to not emitting anything.
jawilson
left a comment
There was a problem hiding this comment.
Please add some unit tests for this behavior.
Test next_series_episodes/next_series_seasons without begin to ensure S03/S03E01 is emitted given history of S01 and S02.
|
Done. I think I did it right. Edit: I don't know how to run the tests, though. |
|
@tubedogg, I added some more clear tests in tubedogg#1. If you merge that PR it will be included here. |
Ns season packs unit tests
|
i'm not sure about this. Also, |
|
I guess I don't see the difference (though I'm also not entirely sure why the from_start/backfill line 170 isn't an I do see one small problem with what I did in that |
|
I may very well be that the end result is the same, but when dealing with something as already as complex as this, I rather add as little code as possible, and make it as obvious as possible. |
|
Testing via There are a few cases that need to be handled:
|
* Changed series forget to support seasons as well * Correctly sort show entities * Fixed series forget cli * Added log message when looking for season pack using tvdb * Removed the pointless is_season_pack property * Added ability to send multiple entities for delete/forget * Catch LookupError as well * Forget downloaded season packs * Fixed series show sort * Added logic to emit next episode without series begin * Added logic to next_series_seasons * Fixed next_series_logic * Fixed crash with series begin and series show * Fixed wrong assignment * Removed redundant has_history * Unit tests Moving tests that @jawilson provided in #1794, plus additional. * Fix tests * Really fix tests The tests involving series.begin will still fail until that issue is resolved in the actual plugins in a separate commit. * Check series.begin earlier Resolves an issue where a season prior to series.begin could be processed before the break check is reached * Set low_season to series.begin * Final location of series.begin check Probably * latest_season cannot be lower than series.begin * Only change low_season if series.begin.season > 1 * Finally fix tests; parametrize new tests * Resolve issues with series.begin - low_season has to be 1 lower than the actual last season to test for range() to work correctly - Only try to check if begin season is completed while evaluating the begin season (otherwise, with gaps in history, it will only ever emit the begin episode) * Additional tests - Gaps between season packs - from_start enabled * Resolve issues with series.begin (ns_seasons) - low_season has to be 1 lower than the actual last season to test for range() to work correctly - Only try to check if begin season is completed while evaluating the begin season (otherwise, with gaps in history, it will only ever emit the begin episode) * Additional tests (seasons) - Gaps between season packs - from_start enabled
Motivation for changes:
Align behavior when the last release in series history is a season to what has always occurred when the last release in series history is an episode.
Detailed changes:
next_series_seasonsor S03E01 fornext_series_episodes, as opposed to not emitting anything.next_series_*tries to review the following season for emit. Currently in this scenario it will emit nothing iffrom_startorbackfillis not set. This change causes it to emit the following season.next_series_seasonson line 129 (search_entrydoes not take an episode number innext_series_seasons).Addressed issues:
Resolves #1782.
Log and/or tests output (preferably both):
Given a series download history of S03 and S06 for My Show...
next_series_seasons:next_series_episodes: