From d607ef1835dc005236891e00b98432e88a76643d Mon Sep 17 00:00:00 2001 From: Davide Marcoli <69892203+davidemarcoli@users.noreply.github.com> Date: Sun, 3 Nov 2024 16:27:05 +0100 Subject: [PATCH] refactor: remove annatar (#168) --- src/lib/client/schemas.gen.ts | 49 ------------------------------ src/lib/client/types.gen.ts | 9 ------ src/lib/constants.ts | 2 -- src/lib/forms/helpers.ts | 17 ----------- src/lib/forms/scrapers-form.svelte | 31 ------------------- 5 files changed, 108 deletions(-) diff --git a/src/lib/client/schemas.gen.ts b/src/lib/client/schemas.gen.ts index 146270f..8a39e15 100644 --- a/src/lib/client/schemas.gen.ts +++ b/src/lib/client/schemas.gen.ts @@ -27,38 +27,6 @@ export const AllDebridModelSchema = { title: 'AllDebridModel' } as const; -export const AnnatarConfigSchema = { - properties: { - enabled: { - type: 'boolean', - title: 'Enabled', - default: false - }, - url: { - type: 'string', - title: 'Url', - default: 'http://annatar.elfhosted.com' - }, - limit: { - type: 'integer', - title: 'Limit', - default: 2000 - }, - timeout: { - type: 'integer', - title: 'Timeout', - default: 30 - }, - ratelimit: { - type: 'boolean', - title: 'Ratelimit', - default: true - } - }, - type: 'object', - title: 'AnnatarConfig' -} as const; - export const AppModelSchema = { properties: { version: { @@ -248,13 +216,6 @@ export const AppModelSchema = { ratelimit: true, timeout: 30 }, - annatar: { - enabled: false, - limit: 2000, - ratelimit: true, - timeout: 30, - url: 'http://annatar.elfhosted.com' - }, torbox_scraper: { enabled: false, timeout: 30 @@ -2482,16 +2443,6 @@ export const ScraperModelSchema = { ratelimit: true } }, - annatar: { - '$ref': '#/components/schemas/AnnatarConfig', - default: { - enabled: false, - url: 'http://annatar.elfhosted.com', - limit: 2000, - timeout: 30, - ratelimit: true - } - }, torbox_scraper: { '$ref': '#/components/schemas/TorBoxScraperConfig', default: { diff --git a/src/lib/client/types.gen.ts b/src/lib/client/types.gen.ts index 68ec382..6d8d15a 100644 --- a/src/lib/client/types.gen.ts +++ b/src/lib/client/types.gen.ts @@ -7,14 +7,6 @@ export type AllDebridModel = { proxy_url?: string; }; -export type AnnatarConfig = { - enabled?: boolean; - url?: string; - limit?: number; - timeout?: number; - ratelimit?: boolean; -}; - export type AppModel = { version?: string; api_key?: string; @@ -381,7 +373,6 @@ export type ScraperModel = { jackett?: JackettConfig; prowlarr?: ProwlarrConfig; orionoid?: OrionoidConfig; - annatar?: AnnatarConfig; torbox_scraper?: TorBoxScraperConfig; mediafusion?: MediafusionConfig; zilean?: ZileanConfig; diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 3ef90ca..d6027c2 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -21,7 +21,6 @@ export const servicesObject: Record = { mdblist: 'MDB List', trakt: 'Trakt', scraping: 'Scraping', - annatar: 'Annatar', torrentio: 'Torrentio', knightcrawler: 'Knightcrawler', orionoid: 'Orionoid', @@ -53,7 +52,6 @@ export const contentServices = ['mdblist', 'overseerr', 'plex_watchlist', 'listr export const scrapingServices = [ 'torrentio', 'knightcrawler', - 'annatar', 'jackett', 'orionoid', 'mediafusion', diff --git a/src/lib/forms/helpers.ts b/src/lib/forms/helpers.ts index 33d339c..baae91f 100644 --- a/src/lib/forms/helpers.ts +++ b/src/lib/forms/helpers.ts @@ -255,11 +255,6 @@ export const scrapersSettingsSchema = z.object({ .string() .optional() .default('sort=qualitysize%7Cqualityfilter=480p,scr,cam,unknown'), - annatar_enabled: z.boolean().default(false), - annatar_url: z.string().optional().default('https://annatar.elfhosted.com'), - annatar_timeout: z.coerce.number().gte(0).int().optional().default(10), - annatar_ratelimit: z.boolean().default(true), - annatar_limit: z.coerce.number().gte(0).int().optional().default(2000), orionoid_enabled: z.boolean().default(false), orionoid_api_key: z.string().optional().default(''), orionoid_timeout: z.coerce.number().gte(0).int().optional().default(10), @@ -312,11 +307,6 @@ export function scrapersSettingsToPass(data: any) { knightcrawler_filter: data.scraping.knightcrawler?.filter, knightcrawler_timeout: data.scraping.knightcrawler?.timeout, knightcrawler_ratelimit: data.scraping.knightcrawler?.ratelimit, - annatar_url: data.scraping.annatar?.url, - annatar_enabled: data.scraping.annatar.enabled, - annatar_limit: data.scraping.annatar?.limit, - annatar_timeout: data.scraping.annatar?.timeout, - annatar_ratelimit: data.scraping.annatar?.ratelimit, orionoid_enabled: data.scraping.orionoid.enabled, orionoid_api_key: data.scraping.orionoid?.api_key, orionoid_limitcount: data.scraping.orionoid?.limitcount, @@ -375,13 +365,6 @@ export function scrapersSettingsToSet(form: SuperValidated - {/if} - {#if $formData.annatar_enabled} -
- -
- -
- -
- -
- -
- -
- -
- {/if} - {#if $formData.orionoid_enabled}