Skip to content

change series - Expose identified_by and exact#1796

Merged
liiight merged 1 commit intoFlexget:developfrom
tubedogg:series-expose-details
Apr 18, 2017
Merged

change series - Expose identified_by and exact#1796
liiight merged 1 commit intoFlexget:developfrom
tubedogg:series-expose-details

Conversation

@tubedogg
Copy link
Copy Markdown
Contributor

@tubedogg tubedogg commented Apr 18, 2017

Motivation for changes:

Exposing the identified_by and exact values allows other plugins to determine what their values were at the time of parsing. This allows, for example, the btn plugin to determine if the user wants a search done with the exact series name only, or if a second search (which strips any parenthetical information from the title) should also be run. It also allows the next_episode_* plugins to determine if an unknown series, or a series still being learned (i.e. set to identified_by: auto in the database) should be treated as ep or sequence ID type, or rejected.

Detailed changes:

  • Add the two values as series_identified_by and series_exact to the entry when its series_* fields are populated after parsing. series_identified_by will be one of the ID types or auto. series_exact will be True or False.

Addressed issues:

Logs:

Note: irrelevant fields and lines were snipped from all logs.

Config 1 - exact not enabled by config or auto; identified_by is auto due to new series

  test_series_fields:
    series:
      - My Show:
          quality: 720p hdtv|webdl|webrip h264

Log 1 (irrelevant fields snipped)

→ flexget inject "My Show S01E01 720p hdtv h264" --tasks test_series_fields --dump
2017-04-18 00:10 VERBOSE  series        test_series_fields identified by is currently on `auto` for My Show. Multiple id types may be accepted until it locks in on the appropriate type.
...
-- Accepted: ---------------------------
title            : My Show S01E01 720p hdtv h264
series_exact     : False
series_id        : S01E01
series_id_type   : ep
series_identified_by: auto

Config 2 - auto enabling of exact; identified_by is auto due to new series

  test_series_fields:
    series:
      - My Show:
          quality: 720p hdtv|webdl|webrip h264
      - 'My Show: The Spinoff':
          quality: 720p hdtv|webdl|webrip h264

Log 2:

→ flexget inject "My Show S01E01 720p hdtv h264" --tasks test_series_fields --dump
2017-04-18 00:15 VERBOSE  series        test_series_fields Auto enabling exact matching for series My Show (reason My Show: The Spinoff)
2017-04-18 00:15 VERBOSE  series        test_series_fields identified by is currently on `auto` for My Show. Multiple id types may be accepted until it locks in on the appropriate type.
...
-- Accepted: ---------------------------
title            : My Show S01E01 720p hdtv h264
series_exact     : True
series_id        : S01E01
series_id_type   : ep
series_identified_by: auto

Config 3 (after removing My Show and My Show: The Spinoff from the database) - explicit enabling of exact; explicit setting of identified_by for a new series that would otherwise be auto

  test_series_fields:
    series:
      - My Show:
          quality: 720p hdtv|webdl|webrip h264
          exact: yes
          identified_by: ep

Log 3:

→ flexget inject "My Show S01E01 720p hdtv h264" --tasks test_series_fields --dump
...
-- Accepted: ---------------------------
title            : My Show S01E01 720p hdtv h264
series_exact     : True
series_id        : S01E01
series_id_type   : ep
series_identified_by: ep

Exposing these values allows other plugins to determine what their
values were at the time of parsing.
@liiight liiight merged commit 4d47d6b into Flexget:develop Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants