flexget.plugins.filter.content_filter module#

class flexget.plugins.filter.content_filter.FilterContentFilter[source]#

Bases: object

Rejects entries based on the filenames in the content. Torrent files only right now.

Example:

content_filter:
  require:
    - '*.avi'
    - '*.mkv'
  reject:
    from:
      - regexp_list: my-rejections
on_task_modify(task, config)[source]#
process_entry(task, entry, config)[source]#

Process an entry and reject it if it doesn’t pass filter.

Parameters:
  • task – Task entry belongs to.

  • entry – Entry to process

Returns:

True, if entry was rejected.

lists_schema = {'oneOf': [{'type': 'string'}, {'items': {'type': 'string'}, 'minItems': 1, 'type': 'array', 'uniqueItems': False}, {'properties': {'from': {'items': {'allOf': [{'$ref': '/schema/plugins?phase=input'}, {'error_maxProperties': 'Plugin options within content_filter plugin must be indented 2 more spaces than the first letter of the plugin name.', 'maxProperties': 1, 'minProperties': 1}]}, 'type': 'array'}}, 'type': 'object'}]}#
schema = {'additionalProperties': False, 'properties': {'max_files': {'type': 'integer'}, 'min_files': {'type': 'integer'}, 'regexp_mode': {'default': False, 'type': 'boolean'}, 'reject': {'oneOf': [{'type': 'string'}, {'items': {'type': 'string'}, 'minItems': 1, 'type': 'array', 'uniqueItems': False}, {'properties': {'from': {'items': {'allOf': [{'$ref': '/schema/plugins?phase=input'}, {'error_maxProperties': 'Plugin options within content_filter plugin must be indented 2 more spaces than the first letter of the plugin name.', 'maxProperties': 1, 'minProperties': 1}]}, 'type': 'array'}}, 'type': 'object'}]}, 'require': {'oneOf': [{'type': 'string'}, {'items': {'type': 'string'}, 'minItems': 1, 'type': 'array', 'uniqueItems': False}, {'properties': {'from': {'items': {'allOf': [{'$ref': '/schema/plugins?phase=input'}, {'error_maxProperties': 'Plugin options within content_filter plugin must be indented 2 more spaces than the first letter of the plugin name.', 'maxProperties': 1, 'minProperties': 1}]}, 'type': 'array'}}, 'type': 'object'}]}, 'require_all': {'oneOf': [{'type': 'string'}, {'items': {'type': 'string'}, 'minItems': 1, 'type': 'array', 'uniqueItems': False}, {'properties': {'from': {'items': {'allOf': [{'$ref': '/schema/plugins?phase=input'}, {'error_maxProperties': 'Plugin options within content_filter plugin must be indented 2 more spaces than the first letter of the plugin name.', 'maxProperties': 1, 'minProperties': 1}]}, 'type': 'array'}}, 'type': 'object'}]}, 'require_mainfile': {'default': False, 'type': 'boolean'}, 'strict': {'default': False, 'type': 'boolean'}}, 'type': 'object'}#
flexget.plugins.filter.content_filter.register_plugin()[source]#