Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@event('plugin.register')
def register_plugin():
plugin.register(PluginPyLoad, 'pyload', api_ver=2)
@event('plugin.register')
def register_plugin():
plugin.register(NotifyTask, 'notify_task', api_ver=2)
@event('plugin.register')
def register_plugin():
plugin.register(SearchBTN, 'btn', interfaces=['search'], api_ver=2)
@event('plugin.register')
def register_plugin():
plugin.register(NzbSize, 'nzb_size', api_ver=2, builtin=True)
@event('manager.db_cleanup')
def db_cleanup(manager, session):
session.query(Category).delete(synchronize_session=False)
session.query(TermType).delete(synchronize_session=False)
session.query(Term).delete(synchronize_session=False)
@event('plugin.register')
def register_plugin():
plugin.register(
UrlRewriteSerienjunkies, 'serienjunkies', interfaces=['urlrewriter', 'task'], api_ver=2
)
@event('options.register', priority=0)
def register_parser_arguments():
exec_parser = options.get_parser('execute')
inject_parser = options.register_command(
'inject',
do_cli,
add_help=False,
parents=[exec_parser],
help='inject an entry from command line into tasks',
usage='%(prog)s title/url [url] [--accept] [--force] '
'[--fields NAME=VALUE [NAME=VALUE...]] []',
epilog=(
'If only a URL and no title is given, Flexget will attempt to '
'find a title in the URL\'s response headers.'
),
)
inject_group = inject_parser.add_argument_group('inject arguments')
@event('manager.db_cleanup')
def db_cleanup(manager, session):
log.debug('TODO: Disabled because of ticket #1321')
return
# Remove seen fields over a year old
result = session.query(SeenField).filter(SeenField.added < datetime.now() - timedelta(days=365)).delete()
if result:
log.verbose('Removed %d seen fields older than 1 year.' % result)
@event('plugin.register')
def register_plugin():
plugin.register(UoccinEmit, 'uoccin_emit', api_ver=2)
@event('plugin.register')
def register_plugin():
plugin.register(UrlRewriteGoogleCse, 'google_cse', interfaces=['urlrewriter'], api_ver=2)
plugin.register(UrlRewriteGoogle, 'google', interfaces=['urlrewriter'], api_ver=2)