question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Behavior of next_series_episodes with release history of season packs vs episodes

See original GitHub issue

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. 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tubedoggcommented, Apr 8, 2017

Thanks for the feedback. 😃

If backfill is not set, it should emit S07 or S07E01 (just like series 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. 😄

0reactions
tubedoggcommented, May 7, 2017

Closed by #1797.

Read more comments on GitHub >

github_iconTop Results From Across the Web

List of The Next Step episodes - Wikipedia
The Next Step is a Canadian teen drama series created by Frank van Keeken and produced by ... The series has broadcast a...
Read more >
Sonarr Settings | WikiArr - Servarr
Standard Episode Format; Series Naming; Series IDs; Seasons; Episodes ... Only for Bulk Season Releases - Only if a season pack or bulk...
Read more >
Watch Explained | Netflix Official Site
Episode 11 of Season 3. Dance Crazes. 24m. September 24, 2021. From the waltz to voguing, dance crazes have connected people throughout history....
Read more >
List of Episodes | South Park Character / Location / User talk etc
Starvin' Marvin returns to South Park with an alien spaceship and enlists Cartman, Stan, Kyle and Kenny's help to seek out a new...
Read more >
Jurassic World: Camp Cretaceous
Jurassic World: Camp Cretaceous is an animated action-adventure series set in ... The second season was confirmed during October 2020 and later released...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found