def get(self, *args, **kwargs): return self.write(generate_api_key())
def get(self, *args, **kwargs): return generate_api_key()
class General(base): __tablename__ = 'general' id = Column(Integer, primary_key=True, autoincrement=True) server_id = Column(Text, default='') enable_sickrage_api = Column(Boolean, default=True) log_size = Column(Integer, default=1048576) calendar_unprotected = Column(Boolean, default=False) https_key = Column(Text, default='server.key') https_cert = Column(Text, default='server.crt') allow_high_priority = Column(Boolean, default=False) anon_redirect = Column(Text, default='https://anonym.to/?') series_provider_timeout = Column(Integer, default=20) web_use_gzip = Column(Boolean, default=True) daily_searcher_freq = Column(Integer, default=40) ignore_words = Column(Text, default=','.join(['german', 'french', 'core2hd', 'dutch', 'swedish', 'reenc', 'MrLss'])) api_v1_key = Column(Text, default=generate_api_key()) sso_api_key = Column(Text, default='') sso_auth_enabled = Column(Boolean, default=True) local_auth_enabled = Column(Boolean, default=False) ip_whitelist_enabled = Column(Boolean, default=False) ip_whitelist_localhost_enabled = Column(Boolean, default=False) ip_whitelist = Column(Text, default='') proper_searcher_interval = Column(Enum(CheckPropersInterval), default=CheckPropersInterval.DAILY) nzb_method = Column(Enum(NzbMethod), default=NzbMethod.BLACKHOLE) web_cookie_secret = Column(Text, default=generate_secret()) ssl_verify = Column(Boolean, default=False) enable_upnp = Column(Boolean, default=False) version_notify = Column(Boolean, default=False) web_root = Column(Text, default='') web_log = Column(Text, default='') add_shows_wo_dir = Column(Boolean, default=False) debug = Column(Boolean, default=False) series_provider_default = Column(Enum(SeriesProviderID), default=SeriesProviderID.THETVDB) use_torrents = Column(Boolean, default=True) display_all_seasons = Column(Boolean, default=True) usenet_retention = Column(Integer, default=500) download_propers = Column(Boolean, default=True) pip3_path = Column(Text, default='pip3') del_rar_contents = Column(Boolean, default=False) process_method = Column(Enum(ProcessMethod), default=ProcessMethod.COPY) file_timestamp_timezone = Column(Enum(FileTimestampTimezone), default=FileTimestampTimezone.NETWORK) auto_update = Column(Boolean, default=True) tv_download_dir = Column(Text, default='') naming_custom_abd = Column(Boolean, default=False) scene_default = Column(Boolean, default=False) skip_downloaded_default = Column(Boolean, default=False) add_show_year_default = Column(Boolean, default=False) naming_sports_pattern = Column(Text, default='%SN - %A-D - %EN') create_missing_show_dirs = Column(Boolean, default=False) trash_rotate_logs = Column(Boolean, default=False) airdate_episodes = Column(Boolean, default=False) notify_on_update = Column(Boolean, default=True) backup_on_update = Column(Boolean, default=True) backlog_days = Column(Integer, default=7) root_dirs = Column(Text, default='') naming_pattern = Column(Text, default='Season %0S/%SN - S%0SE%0E - %EN') sort_article = Column(Boolean, default=False) handle_reverse_proxy = Column(Boolean, default=False) postpone_if_sync_files = Column(Boolean, default=True) cpu_preset = Column(Enum(CpuPreset), default=CpuPreset.NORMAL) nfo_rename = Column(Boolean, default=True) naming_anime_multi_ep = Column(Enum(MultiEpNaming), default=MultiEpNaming.REPEAT) use_nzbs = Column(Boolean, default=False) web_ipv6 = Column(Boolean, default=False) anime_default = Column(Boolean, default=False) default_page = Column(Enum(DefaultHomePage), default=DefaultHomePage.HOME) version_updater_freq = Column(Integer, default=1) download_url = Column(Text, default='') show_update_hour = Column(Integer, default=3) enable_rss_cache = Column(Boolean, default=True) torrent_file_to_magnet = Column(Boolean, default=False) torrent_magnet_to_file = Column(Boolean, default=True) download_unverified_magnet_link = Column(Boolean, default=False) status_default = Column(Enum(EpisodeStatus), default=EpisodeStatus.SKIPPED) naming_anime = Column(Integer, default=3) naming_custom_sports = Column(Boolean, default=False) naming_custom_anime = Column(Boolean, default=False) naming_anime_pattern = Column(Text, default='Season %0S/%SN - S%0SE%0E - %EN') randomize_providers = Column(Boolean, default=False) process_automatically = Column(Boolean, default=False) git_path = Column(Text, default='git') sync_files = Column(Text, default=','.join(['!sync', 'lftp-pget-status', 'part', 'bts', '!qb'])) web_port = Column(Integer, default=8081) web_external_port = Column(Integer, default=random.randint(49152, 65536)) launch_browser = Column(Boolean, default=False) unpack = Column(Boolean, default=False) unpack_dir = Column(Text, default='') delete_non_associated_files = Column(Boolean, default=True) move_associated_files = Column(Boolean, default=False) naming_multi_ep = Column(Enum(MultiEpNaming), default=MultiEpNaming.REPEAT) random_user_agent = Column(Boolean, default=False) torrent_method = Column(Enum(TorrentMethod), default=TorrentMethod.BLACKHOLE) trash_remove_show = Column(Boolean, default=False) enable_https = Column(Boolean, default=False) no_delete = Column(Boolean, default=False) naming_abd_pattern = Column(Text, default='%SN - %A.D - %EN') socket_timeout = Column(Integer, default=30) proxy_setting = Column(Text, default='') backlog_searcher_freq = Column(Integer, default=1440) subtitle_searcher_freq = Column(Integer, default=1) auto_postprocessor_freq = Column(Integer, default=10) notify_on_login = Column(Boolean, default=False) rename_episodes = Column(Boolean, default=True) quality_default = Column(IntFlag(Qualities), default=Qualities.SD) extra_scripts = Column(Text, default='') flatten_folders_default = Column(Boolean, default=False) series_provider_default_language = Column(Text, default='eng') show_update_stale = Column(Boolean, default=True) ep_default_deleted_status = Column(Enum(EpisodeStatus), default=EpisodeStatus.ARCHIVED) no_restart = Column(Boolean, default=False) allowed_video_file_exts = Column(Text, default=','.join(['avi', 'mkv', 'mpg', 'mpeg', 'wmv', 'ogm', 'mp4', 'iso', 'img', 'divx', 'm2ts', 'm4v', 'ts', 'flv', 'f4v', 'mov', 'rmvb', 'vob', 'dvr-ms', 'wtv', 'ogv', '3gp', 'webm', 'tp'])) require_words = Column(Text, default='') naming_strip_year = Column(Boolean, default=False) proxy_series_providers = Column(Boolean, default=True) log_nr = Column(Integer, default=5) git_reset = Column(Boolean, default=True) search_format_default = Column(Enum(SearchFormat), default=SearchFormat.STANDARD) skip_removed_files = Column(Boolean, default=False) status_default_after = Column(Enum(EpisodeStatus), default=EpisodeStatus.WANTED) ignored_subs_list = Column(Text, default=','.join(['dk', 'fin', 'heb', 'kor', 'nor', 'nordic', 'pl', 'swe'])) calendar_icons = Column(Boolean, default=False) keep_processed_dir = Column(Boolean, default=True) processor_follow_symlinks = Column(Boolean, default=False) allowed_extensions = Column(Text, default=','.join(['srt', 'nfo', 'srr', 'sfv'])) view_changelog = Column(Boolean, default=False) strip_special_file_bits = Column(Boolean, default=True) max_queue_workers = Column(Integer, default=5)
def handle_get(self): return self.write(generate_api_key())