Skip to content

Added for_undecided#1492

Merged
liiight merged 1 commit intoFlexget:developfrom
planeturban:on_undecided
Nov 8, 2016
Merged

Added for_undecided#1492
liiight merged 1 commit intoFlexget:developfrom
planeturban:on_undecided

Conversation

@planeturban
Copy link
Copy Markdown
Contributor

@planeturban planeturban commented Nov 8, 2016

Motivation for changes:

Makes it possible to find duplicates much faster than with duplicates plugin (and without a bunch of workarounds to get it to work on shows), using the following config:

tasks:
  dups:
    assume_quality:
      h264: 480p
    seen: no
    configure_series:
      from:
        filesystem: /tv
    filesystem:
      path:
        - /tv
      recursive: yes
      retrieve: dirs
    if:
      - has_field('series_episode'):
          exec:
            on_output:
              for_undecided: echo {{series_name}} {{series_id}} {{quality}}  {{location}} >> `date +%y%m%d`.dups.out

Detailed changes:

Added on_undecided in schema and in name_map.

Addressed issues:

Config usage if relevant (new plugin or updated schema):

    schema = {
        'oneOf': [
            one_or_more({'type': 'string'}),
            {
                'type': 'object',
                'properties': {
                    'on_start': {'$ref': '#/definitions/phaseSettings'},
                    'on_input': {'$ref': '#/definitions/phaseSettings'},
                    'on_filter': {'$ref': '#/definitions/phaseSettings'},
                    'on_output': {'$ref': '#/definitions/phaseSettings'},
                    'on_exit': {'$ref': '#/definitions/phaseSettings'},
                    'fail_entries': {'type': 'boolean'},
                    'auto_escape': {'type': 'boolean'},
                    'encoding': {'type': 'string'},
                    'allow_background': {'type': 'boolean'}
                },
                'additionalProperties': False
            }
        ],
        'definitions': {
            'phaseSettings': {
                'type': 'object',
                'properties': {
                    'phase': one_or_more({'type': 'string'}),
                    'for_entries': one_or_more({'type': 'string'}),
                    'for_accepted': one_or_more({'type': 'string'}),
                    'for_rejected': one_or_more({'type': 'string'}),
                    'for_undecided': one_or_more({'type': 'string'}),
                    'for_failed': one_or_more({'type': 'string'})
                },
                'additionalProperties': False
            }
        }

Log and/or tests output (preferably both):

Quite self explanatory.

@liiight liiight merged commit d6b6f81 into Flexget:develop Nov 8, 2016
@liiight
Copy link
Copy Markdown
Member

liiight commented Nov 8, 2016

nice. care to update the wiki?

@planeturban
Copy link
Copy Markdown
Contributor Author

Will do.

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