Behavior of next_series_episodes with release history of season packs vs episodes
See original GitHub issueContinued discussion from #1776 since the immediate issue there was resolved.
Expected behaviour:
Given a release history of season entities S01 and S02 for My Show in the series database with an identifier type of ep, next_series_episodes
will emit S03E01 as the next episode to obtain, and next_series_seasons
will emit S03 as the next season to obtain.
Actual behaviour:
Both plugins emit nothing unless from_start
option is set or a begin episode has been specified. This is unintuitive and works counter to how next_series_episodes
operates when episode releases are present in the series database. (See further discussion at the bottom.) At the very least, the error message stating the show has no history is incorrect.
Steps to reproduce:
- Step 1:
→ flexget inject "My Show S01 720p hdtv h264 dd5.1" --tasks learn_eps --learn --force --disable-tracking
→ flexget inject "My Show S02 720p hdtv h264 dd5.1" --tasks learn_eps --learn --force --disable-tracking
- Step 2: Run test_nse task (I used fake BTN info here because the task stops before it ever gets there).
Config:
tasks:
learn_eps:
all_series:
season_packs: always
manual: yes
test_nse:
discover:
what:
- next_series_episodes: yes
from:
- btn: MyAPIkey
series:
- My Show:
identified_by: ep
Log:
2017-04-06 18:11 DEBUG series test_nse no downloaded episodes found for series 'My Show', season: None, downloaded: True
2017-04-06 18:11 DEBUG series test_nse no downloaded episodes found for series 'My Show', season: 3, downloaded: True
2017-04-06 18:11 DEBUG series test_nse no downloaded season packs found for series 'My Show', season: 3, downloaded: True
2017-04-06 18:11 VERBOSE next_series_episodes test_nse Series `My Show` has no history. Set begin option, or use CLI `series begin` subcommand to set first episode to emit
2017-04-06 18:11 WARNING discover test_nse Input next_series_episodes did not return anything
Additional information:
- Flexget Version: 2.10.29
- Python Version: 2.7.13
- Installation method: pip
- OS and version: macOS El Capitan 10.11.6
- Link to crash log: n/a
Further discussion
Scenarios: 1a. I insert My Show S01E01 into the database. I don’t set any begin options or anything like that. 1b. I run a discover task with next_series_episodes on it. next_series_episodes emits S01E02 as the next expected episode and discover starts looking for that. 1c. As a result of using estimators, discover figures out that each season is only one episode, and then starts looking for S02E01.
2a. I insert My Show S01 into the database. Again, no begin options or anything. 2b. I run a discover task with next_series_episodes on it. next_series_episodes wants me to set a begin episode.
There’s inconsistency between these two nearly-identical scenarios. In both cases, the database knows the identifier style. (I even added it to the configure_series settings in the task to be doubly sure.) In both cases, a season has ended and it should be looking for the next one - scenario 1 doesn’t know that and outputs S01E02 and uses estimators to find out that’s not real and to now check for S02E01 … but scenario 2 doesn’t even output S02E01 as a possible starting point, it just gives up. But scenario 2 knows I have completed S01, so why wouldn’t it output S02E01 and let the estimators sort out if that’s a real episode?
It seems like the assumption is that if there are episodes downloaded in the latest known season, to continue downloading there, but if all known seasons are completed, to not try to start a new season (unless from_start
is set). Is that correct?
Contrast this with the normal series
plugin, which given scenario 2 above accepts S02E01 as the next episode.
After I read the code, I added from_start: yes
, and it immediately worked … but I’m confused why this is necessary to get the two scenarios to work in a consistent manner. Looking at next_series_seasons code, it seems like if you only ever download season packs, next_series_seasons just flat-out wouldn’t work (again without using from_start).
It’s not that I’m necessarily averse to adding from_start to the config, but the option name wouldn’t jump out at me as something that I should add when (as in my original case with Review) I don’t actually want to get downloads from the start. It also seems very unintuitive that episodes and season packs are treated so differently - episode history works by itself, but season pack history is meaningless without additional options set.
Maybe I’m completely off-base here and there are other reasons for this being designed as it is. I’ve been wrong before. 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
Thanks for the feedback. 😃
If
backfill
is not set, it should emit S07 or S07E01 (just likeseries
would accept either of those as being the next thing after S06 and would ignore the gap that occurred before the most recently-downloaded entity). If you have S03E01 and S06E01 in history, it would emit S06E02 without any issue, so the disconnect is what changes just because you’re dealing with a different size entity (seasons)?Another way of thinking about it is episodes exist within a definable container: a season. Seasons also exist within a definable container: the show itself. From this perspective both episodes and seasons are logical, consecutive units within their respective containers. Treating them differently doesn’t make any sense, at least to me.
Regarding
begin
, to me that is specifically for cases where you want to skip ahead from the current history. [removed the example that was here as it was incorrect](And should we stick with how it currently works,
from_start
should be renamed [continue_series
?] as it doesn’t actually mean that in the context of this discussion.)Anyway I’ll shut up now and let others weigh in. 😄
Closed by #1797.