modify Package

modify Package

Modification phase plugins.

extension Module

class flexget.plugins.modify.extension.ModifyExtension

Bases: object

Allows specifying file extension explicitly when all other built-in detection mechanisms fail.

Example:

extension: nzb

on_task_modify(task, config)
schema = {'type': ['string', 'number']}
flexget.plugins.modify.extension.register_plugin()

headers Module

class flexget.plugins.modify.headers.PluginHeaders

Bases: object

Allow setting up any headers in all requests (which use urllib2)

Example:

headers:

cookie: uid=<YOUR UID>; pass=<YOUR PASS>

on_task_start(task, config)

Task starting

schema = {'additionalProperties': {'type': 'string'}, 'type': 'object'}
flexget.plugins.modify.headers.register_plugin()

manipulate Module

class flexget.plugins.modify.manipulate.Manipulate

Bases: object

Usage:

manipulate:
  • <destination field>:

    [find_all]: <boolean> [phase]: <phase> [from]: <source field> [extract]: <regexp> [separator]: <text> [replace]:

    regexp: <regexp> format: <regexp>

    [remove]: <boolean>

Example:

manipulate:
  • title:

    extract: [dddd](.*)

on_task_filter(task, config)
on_task_metainfo(task, config)
on_task_modify(task, config)
on_task_start(task, config)

Separates the config into a dict with a list of jobs per phase. Allows us to skip phases without any jobs in them.

process(entry, jobs)

Process given jobs from config for an entry.

Parameters:
  • entry – Entry to modify

  • jobs – Config items to run on this entry

Returns:

True if any fields were modified

schema = {'items': {'additionalProperties': {'additionalProperties': False, 'properties': {'extract': {'format': 'regex', 'type': 'string'}, 'find_all': {'type': 'boolean'}, 'from': {'type': 'string'}, 'phase': {'enum': ['metainfo', 'filter', 'modify']}, 'remove': {'type': 'boolean'}, 'replace': {'additionalProperties': False, 'properties': {'format': {'type': 'string'}, 'regexp': {'format': 'regex', 'type': 'string'}}, 'required': ['regexp', 'format'], 'type': 'object'}, 'separator': {'type': 'string'}}, 'type': 'object'}, 'type': 'object'}, 'type': 'array'}
flexget.plugins.modify.manipulate.register_plugin()

path_by_ext Module

class flexget.plugins.modify.path_by_ext.PluginPathByExt

Bases: object

Allows specifying path based on content-type

Example:

path_by_ext:

torrent: ~/watch/torrent/ nzb: ~/watch/nzb/

ext(task, config, callback)
on_task_modify(task, config)
schema = {'type': 'object'}
set_path(entry, path)
flexget.plugins.modify.path_by_ext.register_plugin()

plugin_priority Module

class flexget.plugins.modify.plugin_priority.PluginPriority

Bases: object

Allows modifying plugin priorities from default values.

Example:

plugin_priority:

ignore: 50 series: 100

on_task_abort(task, config)
on_task_exit(task, config)
on_task_start(task, config)
schema = {'additionalProperties': {'type': 'integer'}, 'type': 'object'}
flexget.plugins.modify.plugin_priority.register_plugin()

set_field Module

class flexget.plugins.modify.set_field.ModifySet

Bases: object

Allows adding information to a task entry for use later.

Example:

set:

path: ~/download/path/

lazy_set(entry, config, field, orig_field_value, errors=True)
modify(entry, config, errors=True)

This can be called from a plugin to add set values to an entry

on_task_metainfo(task, config)

Adds the set dict to all accepted entries.

schema = {'minProperties': 1, 'type': 'object'}
flexget.plugins.modify.set_field.register_plugin()

torrent Module

torrent_scrub Module

trackers Module