flexget.components.seen.db module#

Provide functionality for managing a database of seen entries and fields.

Listens events:

forget (string)

Given string can be task name, remembered field (url, imdb_url) or a title. If given value is a task name then everything in that task will be forgotten. With title all learned fields from it and the title will be forgotten. With field value only that particular field is forgotten.

class flexget.components.seen.db.SeenEntry(title, task, reason=None, local=None)[source]#

Bases: VersionedBase

to_dict()[source]#
_sa_class_manager = {'added': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'fields': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'local': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'reason': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'task': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'title': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
added#
fields#
id#
local#
reason#
task#
title#
class flexget.components.seen.db.SeenField(field, value)[source]#

Bases: VersionedBase

to_dict()[source]#
_sa_class_manager = {'added': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'field': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'seen_entry_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'value': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
added#
field#
id#
seen_entry_id#
value#
flexget.components.seen.db.db_cleanup(manager, session)[source]#
flexget.components.seen.db.forget(value, tasks=None, test=False)[source]#

See module docstring.

Parameters:

value (string) – Can be entry title or field value

Returns:

count, field_count where count is number of entries removed and field_count number of fields