Flexget: Series plugin unable to parse episode sequence numbers over 3 digits in length

Expected behaviour:

Flexget series plugin should be able to parse an episode number with over 3 digits in length

Actual behaviour:

The following error occurs and the episode is not recognised as being a part of the series:

2021-11-23 00:04:51 INFO parser_internal nyaa.si - judas Title [Judas] One Piece - 1000 [1080p][HEVC x265 10bit][Multi-Subs] (Weekly) looks like series One Piece but cannot find any series numbering.

Steps to reproduce:

  • Have config which references a series entry that has over 999 episodes from RSS
  • Run flexget (I personally run in daemon mode, but probably not relevant)
  • Episode not recognised

Config:

flexget_config.txt

Log:

(click to expand)
2021-11-23 00:04:51 INFO     parser_internal nyaa.si - judas Title `[Judas] One Piece - 1000 [1080p][HEVC x265 10bit][Multi-Subs] (Weekly)` looks like series `One Piece` but cannot find any series numbering.

Let me know if you want the entire log. None of the log seems interesting.

Additional information:

  • FlexGet version:
3.1.153
You are on the latest release.
  • Python version: Python 2.7.18
  • Installation method: Of flexget? Via pip
  • Using daemon (yes/no): Yes
  • OS and version:
Linux wilko-server 5.4.0-89-generic #100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal
  • Link to crash log: N/A

Is the problem line here: https://github.com/Flexget/Flexget/blob/develop/flexget/components/series/next_series_episodes.py#L46

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 15 (7 by maintainers)

Commits related to this issue

Most upvoted comments

You could solve for these exceptions directly in the config with https://flexget.com/Plugins/series/regexps#episode-numbering-matching

series:
  settings:
    sequence_regexp:
      - (1\d{1,3})

This issue has been stale for 30 days and is being closed.

No need to specify a maximum number sequence length. Using jasonlyle88’s contribution as a base:

series:
  settings:
    sequence_regexp:
      - \b(\d{1,})(?!p)\b

The regex above should match sequence lengths if they are at least one digit long.

Nice catch. I assumed the the boundary anchors would be added automatically in the background as it happens with some segments in code like quality expressions.

Just implemented the workaround from @BrutuZ (thanks for this btw! Had no idea we could do this) and ran into another issue. My matches stopped recognizing 1080p as a quality (I assume because it matched the sequence_regexp). As soon as I removed the above workaround, my execution recognized the 1080p version of another show and it went through fine. Because of this, I recommend the following improvement:

series:
  settings:
    sequence_regexp:
      - \b(1\d{1,3})(?!p)\b