generic Package

generic Package

Plugins handling multiple task phases.

archive Module

class flexget.plugins.generic.archive.Archive

Bases: object

Archives all new items into database where they can be later searched and injected. Stores the entries in the state as they are at the exit phase, this way task cleanup for title etc is stored into the database. This may however make injecting them back to the original task work wrongly.

on_task_abort(task, config)

Archive even on task abort, except if the abort has happened before session was started.

on_task_learn(task, config)

Add new entries into archive. We use learn phase in case the task corrects title or url via some plugins.

schema = {u'oneOf': [{u'type': u'boolean'}, {u'items': {u'type': u'string'}, u'type': u'array'}]}
class flexget.plugins.generic.archive.ArchiveEntry

Bases: sqlalchemy.ext.declarative.api.Base

added
description
id
sources
tags
task
title
url
class flexget.plugins.generic.archive.ArchiveSource(name)

Bases: sqlalchemy.ext.declarative.api.Base

id
name
class flexget.plugins.generic.archive.ArchiveTag(name)

Bases: sqlalchemy.ext.declarative.api.Base

id
name
class flexget.plugins.generic.archive.UrlrewriteArchive

Bases: object

Provides capability to rewrite urls from archive or make searches with discover.

entry_map = {u'url': u'url', u'description': u'description', u'title': u'title'}
schema = {u'oneOf': [{u'type': u'boolean'}, {u'items': {u'type': u'string'}, u'type': u'array'}]}
search(task, entry, config=None)

Search plugin API method

flexget.plugins.generic.archive.cli_inject(manager, options)
flexget.plugins.generic.archive.consolidate()

Converts previous archive data model to new one.

flexget.plugins.generic.archive.do_cli(manager, options)
flexget.plugins.generic.archive.get_source(name, session)
Parameters:
  • name (string) – Source name
  • session – SQLAlchemy session
Returns:

ArchiveSource from db or new one

flexget.plugins.generic.archive.get_tag(name, session)
Parameters:
  • name (string) – Tag name
  • session – SQLAlchemy session
Returns:

ArchiveTag from db or new one

flexget.plugins.generic.archive.register_parser_arguments()
flexget.plugins.generic.archive.register_plugin()
flexget.plugins.generic.archive.search(session, text, tags=None, sources=None, desc=False)

Search from the archive.

Parameters:
  • text (string) – Search text, spaces and dots are tried to be ignored.
  • session (Session) – SQLAlchemy session, should not be closed while iterating results.
  • tags (list) – Optional list of acceptable tags
  • sources (list) – Optional list of acceptable sources
  • desc (bool) – Sort results descending
Returns:

ArchiveEntries responding to query

flexget.plugins.generic.archive.tag_source(source_name, tag_names=None)

Tags all archived entries within a source with supplied tags

Parameters:
  • source_name (string) – Source name
  • tag_names (list) – List of tag names to add

cron_env Module

flexget.plugins.generic.cron_env.check_env(manager, options)

urlfix Module

class flexget.plugins.generic.urlfix.UrlFix

Bases: object

Automatically fix broken urls.

on_task_input(task, config)
schema = {u'type': u'boolean'}
flexget.plugins.generic.urlfix.register_plugin()

welcome Module

flexget.plugins.generic.welcome.welcome_message(manager)