From 982567f28d4475d0fd00898af466456bd4c57d3a Mon Sep 17 00:00:00 2001 From: Viren070 Date: Mon, 20 Oct 2025 14:37:11 +0100 Subject: [PATCH] fix(presets/streamfusion): add option to disable public torrent cache server --- packages/core/src/presets/streamfusion.ts | 42 ++++++++++++++--------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/packages/core/src/presets/streamfusion.ts b/packages/core/src/presets/streamfusion.ts index 3b67ff85..4eae536e 100644 --- a/packages/core/src/presets/streamfusion.ts +++ b/packages/core/src/presets/streamfusion.ts @@ -28,21 +28,6 @@ export class StreamFusionPreset extends Preset { supportedResources, Env.DEFAULT_STREAMFUSION_TIMEOUT ), - { - id: 'mediaTypes', - name: 'Media Types', - description: - 'Limits this addon to the selected media types for streams. For example, selecting "Movie" means this addon will only be used for movie streams (if the addon supports them). Leave empty to allow all.', - type: 'multi-select', - required: false, - showInSimpleMode: false, - options: [ - { label: 'Movie', value: 'movie' }, - { label: 'Series', value: 'series' }, - { label: 'Anime', value: 'anime' }, - ], - default: [], - }, { id: 'streamFusionApiKey', name: 'StreamFusion API Key', @@ -51,6 +36,15 @@ export class StreamFusionPreset extends Preset { type: 'password', required: true, }, + { + id: 'usePublicTorrentCacheServer', + name: 'Use Public Torrent Cache Server', + description: + 'For faster results, you can use the public torrent cache server. Only historiacl public torrents from stremio-jackett will be cached on it. Disable this for results from other sources.', + type: 'boolean', + required: false, + default: false, + }, { id: 'torboxSearch', name: 'Torbox Search', @@ -112,7 +106,21 @@ export class StreamFusionPreset extends Preset { default: undefined, emptyIsUndefined: true, }, - + { + id: 'mediaTypes', + name: 'Media Types', + description: + 'Limits this addon to the selected media types for streams. For example, selecting "Movie" means this addon will only be used for movie streams (if the addon supports them). Leave empty to allow all.', + type: 'multi-select', + required: false, + showInSimpleMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'socials', name: '', @@ -271,7 +279,7 @@ export class StreamFusionPreset extends Preset { minCachedResults: 10, exclusion: [], cacheUrl: 'https://stremio-jackett-cacher.elfhosted.com/', - cache: true, + cache: options.usePublicTorrentCacheServer ?? true, zilean: true, yggflix: true, sharewood: true,