Skip to content

Behavior of next_series_episodes with release history of season packs vs episodes #1782

@tubedogg

Description

@tubedogg

Continued 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. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions