Skip to content

Commit

Permalink
refactor: remove annatar (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidemarcoli authored Nov 3, 2024
1 parent 7b69166 commit d607ef1
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 108 deletions.
49 changes: 0 additions & 49 deletions src/lib/client/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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: {
Expand Down
9 changes: 0 additions & 9 deletions src/lib/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -381,7 +373,6 @@ export type ScraperModel = {
jackett?: JackettConfig;
prowlarr?: ProwlarrConfig;
orionoid?: OrionoidConfig;
annatar?: AnnatarConfig;
torbox_scraper?: TorBoxScraperConfig;
mediafusion?: MediafusionConfig;
zilean?: ZileanConfig;
Expand Down
2 changes: 0 additions & 2 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const servicesObject: Record<string, string> = {
mdblist: 'MDB List',
trakt: 'Trakt',
scraping: 'Scraping',
annatar: 'Annatar',
torrentio: 'Torrentio',
knightcrawler: 'Knightcrawler',
orionoid: 'Orionoid',
Expand Down Expand Up @@ -53,7 +52,6 @@ export const contentServices = ['mdblist', 'overseerr', 'plex_watchlist', 'listr
export const scrapingServices = [
'torrentio',
'knightcrawler',
'annatar',
'jackett',
'orionoid',
'mediafusion',
Expand Down
17 changes: 0 additions & 17 deletions src/lib/forms/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -375,13 +365,6 @@ export function scrapersSettingsToSet(form: SuperValidated<Infer<ScrapersSetting
timeout: form.data.knightcrawler_timeout,
ratelimit: form.data.knightcrawler_ratelimit
},
annatar: {
enabled: form.data.annatar_enabled,
url: form.data.annatar_url,
limit: form.data.annatar_limit,
timeout: form.data.annatar_timeout,
ratelimit: form.data.annatar_ratelimit
},
orionoid: {
enabled: form.data.orionoid_enabled,
api_key: form.data.orionoid_api_key,
Expand Down
31 changes: 0 additions & 31 deletions src/lib/forms/scrapers-form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
{formData}
isForGroup={true}
/>
<CheckboxField {form} name="annatar_enabled" label="Annatar" {formData} isForGroup={true} />
<CheckboxField {form} name="orionoid_enabled" label="Orionoid" {formData} isForGroup={true} />
<CheckboxField {form} name="jackett_enabled" label="Jackett" {formData} isForGroup={true} />
<CheckboxField
Expand Down Expand Up @@ -149,36 +148,6 @@
</div>
{/if}

{#if $formData.annatar_enabled}
<div transition:slide>
<TextField {form} name="annatar_url" {formData} />
</div>

<div transition:slide>
<NumberField
{form}
name="annatar_limit"
{formData}
stepValue={1}
fieldDescription="Search results limit"
/>
</div>

<div transition:slide>
<NumberField
{form}
name="annatar_timeout"
{formData}
stepValue={1}
fieldDescription="Timeout in seconds"
/>
</div>

<div transition:slide>
<CheckboxField {form} name="annatar_ratelimit" {formData} />
</div>
{/if}

{#if $formData.orionoid_enabled}
<div transition:slide>
<TextField {form} name="orionoid_api_key" {formData} isProtected={true} />
Expand Down

0 comments on commit d607ef1

Please sign in to comment.