diff --git a/packages/core/src/presets/aiostreams.ts b/packages/core/src/presets/aiostreams.ts index 142d1d93..568b788a 100644 --- a/packages/core/src/presets/aiostreams.ts +++ b/packages/core/src/presets/aiostreams.ts @@ -121,6 +121,21 @@ export class AIOStreamsPreset extends Preset { value: resource, })), }, + { + 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, ]; return { @@ -161,6 +176,7 @@ export class AIOStreamsPreset extends Preset { library: false, resources: options.resources || undefined, timeout: options.timeout || this.METADATA.TIMEOUT, + mediaTypes: options.mediaTypes || [], preset: { id: '', type: this.METADATA.ID, diff --git a/packages/core/src/presets/bitmagnet.ts b/packages/core/src/presets/bitmagnet.ts index 1a50f710..dddf0cff 100644 --- a/packages/core/src/presets/bitmagnet.ts +++ b/packages/core/src/presets/bitmagnet.ts @@ -23,6 +23,21 @@ export class BitmagnetPreset extends TorznabPreset { required: true, default: Env.BUILTIN_DEFAULT_BITMAGNET_TIMEOUT || Env.DEFAULT_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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'services', name: 'Services', diff --git a/packages/core/src/presets/comet.ts b/packages/core/src/presets/comet.ts index b0db0a04..8b358660 100644 --- a/packages/core/src/presets/comet.ts +++ b/packages/core/src/presets/comet.ts @@ -101,6 +101,21 @@ export class CometPreset extends StremThruPreset { 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'socials', name: '', @@ -178,6 +193,7 @@ export class CometPreset extends StremThruPreset { : 'p2p', manifestUrl: this.generateManifestUrl(userData, options, serviceId), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/debridioScraper.ts b/packages/core/src/presets/debridioScraper.ts index b9f34bf6..461b04e9 100644 --- a/packages/core/src/presets/debridioScraper.ts +++ b/packages/core/src/presets/debridioScraper.ts @@ -44,6 +44,21 @@ export class DebridioPreset 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, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + showInNoobMode: false, + }, debridioSocialOption, ]; @@ -107,6 +122,7 @@ export class DebridioPreset extends Preset { : 'custom', manifestUrl: this.generateManifestUrl(userData, options, service), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/debridioWatchtower.ts b/packages/core/src/presets/debridioWatchtower.ts index 6c337dc0..c9f73b6b 100644 --- a/packages/core/src/presets/debridioWatchtower.ts +++ b/packages/core/src/presets/debridioWatchtower.ts @@ -73,6 +73,21 @@ export class DebridioWatchtowerPreset extends Preset { ), debridioApiKeyOption, debridioSocialOption, + { + 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, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + showInNoobMode: false, + }, ]; return { diff --git a/packages/core/src/presets/easynews.ts b/packages/core/src/presets/easynews.ts index 23a88d0c..fabcd2c4 100644 --- a/packages/core/src/presets/easynews.ts +++ b/packages/core/src/presets/easynews.ts @@ -35,6 +35,21 @@ export class EasynewsPreset extends Preset { supportedResources, Env.DEFAULT_EASYNEWS_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, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + showInNoobMode: false, + }, ]; return { @@ -68,6 +83,7 @@ export class EasynewsPreset extends Preset { name: options.name || this.METADATA.NAME, manifestUrl: this.generateManifestUrl(userData, options), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/easynewsPlus.ts b/packages/core/src/presets/easynewsPlus.ts index 5730f796..d35e926d 100644 --- a/packages/core/src/presets/easynewsPlus.ts +++ b/packages/core/src/presets/easynewsPlus.ts @@ -50,6 +50,21 @@ export class EasynewsPlusPreset extends EasynewsPreset { }, ], }, + { + 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, ], }; } diff --git a/packages/core/src/presets/easynewsPlusPlus.ts b/packages/core/src/presets/easynewsPlusPlus.ts index 3aaeb2b5..ff944154 100644 --- a/packages/core/src/presets/easynewsPlusPlus.ts +++ b/packages/core/src/presets/easynewsPlusPlus.ts @@ -49,6 +49,21 @@ export class EasynewsPlusPlusPreset extends EasynewsPreset { super.METADATA.SUPPORTED_RESOURCES, Env.DEFAULT_EASYNEWS_PLUS_PLUS_TIMEOUT || Env.DEFAULT_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, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + showInNoobMode: false, + }, { id: 'strictTitleMatching', name: 'Strict Title Matching', diff --git a/packages/core/src/presets/jackettio.ts b/packages/core/src/presets/jackettio.ts index b2f36004..8be55066 100644 --- a/packages/core/src/presets/jackettio.ts +++ b/packages/core/src/presets/jackettio.ts @@ -74,6 +74,21 @@ export class JackettioPreset extends StremThruPreset { 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'socials', name: '', @@ -138,6 +153,7 @@ export class JackettioPreset extends StremThruPreset { : undefined, manifestUrl: this.generateManifestUrl(userData, options, serviceId), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/knaben.ts b/packages/core/src/presets/knaben.ts index 3480eb30..d9aa524a 100644 --- a/packages/core/src/presets/knaben.ts +++ b/packages/core/src/presets/knaben.ts @@ -38,6 +38,21 @@ export class KnabenPreset extends TorznabPreset { 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'useMultipleInstances', name: 'Use Multiple Instances', diff --git a/packages/core/src/presets/mediafusion.ts b/packages/core/src/presets/mediafusion.ts index dedb3c91..c56f14c3 100644 --- a/packages/core/src/presets/mediafusion.ts +++ b/packages/core/src/presets/mediafusion.ts @@ -283,6 +283,21 @@ export class MediaFusionPreset 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'socials', name: '', @@ -367,6 +382,7 @@ export class MediaFusionPreset extends Preset { : 'P2P', manifestUrl: url, enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/newznab.ts b/packages/core/src/presets/newznab.ts index 31baf3e0..b7affecc 100644 --- a/packages/core/src/presets/newznab.ts +++ b/packages/core/src/presets/newznab.ts @@ -50,6 +50,22 @@ export class NewznabPreset extends BuiltinAddonPreset { forceInUi: false, }, }, + { + 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, + showInNoobMode: false, + default: [], + options: [ + { + label: 'Movie', + value: 'movie', + }, + ], + }, { id: 'forceQuerySearch', name: 'Force Query Search', diff --git a/packages/core/src/presets/nuviostreams.ts b/packages/core/src/presets/nuviostreams.ts index 9314bbd0..de5101e6 100644 --- a/packages/core/src/presets/nuviostreams.ts +++ b/packages/core/src/presets/nuviostreams.ts @@ -194,6 +194,21 @@ export class NuvioStreamsPreset extends Preset { options: providers, default: [], }, + { + 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'socials', name: '', @@ -236,6 +251,7 @@ export class NuvioStreamsPreset extends Preset { name: options.name || this.METADATA.NAME, manifestUrl: this.generateManifestUrl(userData, options), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/nzbhydra.ts b/packages/core/src/presets/nzbhydra.ts index 4a46f680..3a509268 100644 --- a/packages/core/src/presets/nzbhydra.ts +++ b/packages/core/src/presets/nzbhydra.ts @@ -27,6 +27,21 @@ export class NZBHydraPreset extends NewznabPreset { forceInUi: false, }, }, + { + 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, ...(Env.BUILTIN_NZBHYDRA_URL && Env.BUILTIN_NZBHYDRA_API_KEY ? [ diff --git a/packages/core/src/presets/orion.ts b/packages/core/src/presets/orion.ts index 3f0e957b..bdb9c4bf 100644 --- a/packages/core/src/presets/orion.ts +++ b/packages/core/src/presets/orion.ts @@ -83,6 +83,21 @@ export class OrionPreset 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, ]; return { @@ -151,6 +166,7 @@ export class OrionPreset extends Preset { : 'P2P', manifestUrl: this.generateManifestUrl(userData, options, serviceIds), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/peerflix.ts b/packages/core/src/presets/peerflix.ts index 7e78ca66..310c88cf 100644 --- a/packages/core/src/presets/peerflix.ts +++ b/packages/core/src/presets/peerflix.ts @@ -42,6 +42,21 @@ export class PeerflixPreset extends Preset { emptyIsUndefined: true, showInNoobMode: false, }, + { + 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'useMultipleInstances', name: 'Use Multiple Instances', @@ -139,6 +154,7 @@ export class PeerflixPreset extends Preset { : 'P2P', manifestUrl: this.generateManifestUrl(userData, services, options), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/prowlarr.ts b/packages/core/src/presets/prowlarr.ts index 3eb9bf0a..e39325a4 100644 --- a/packages/core/src/presets/prowlarr.ts +++ b/packages/core/src/presets/prowlarr.ts @@ -162,6 +162,13 @@ export class ProwlarrPreset extends BuiltinAddonPreset { name: options.name || this.METADATA.NAME, manifestUrl: this.generateManifestUrl(userData, services, options), enabled: true, + displayIdentifier: services + .map((id) => constants.SERVICE_DETAILS[id].shortName) + .join(' | '), + identifier: + services.length > 1 + ? 'multi' + : constants.SERVICE_DETAILS[services[0]].shortName, library: options.libraryAddon ?? false, resources: options.resources || undefined, mediaTypes: options.mediaTypes || [], diff --git a/packages/core/src/presets/sootio.ts b/packages/core/src/presets/sootio.ts index b8a7949a..88163c66 100644 --- a/packages/core/src/presets/sootio.ts +++ b/packages/core/src/presets/sootio.ts @@ -65,6 +65,21 @@ export class SootioPreset 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'socials', name: '', @@ -134,6 +149,7 @@ export class SootioPreset extends Preset { : undefined, manifestUrl: this.generateManifestUrl(userData, options, serviceId), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/streamfusion.ts b/packages/core/src/presets/streamfusion.ts index d7a81e8b..3a16acd3 100644 --- a/packages/core/src/presets/streamfusion.ts +++ b/packages/core/src/presets/streamfusion.ts @@ -28,6 +28,21 @@ 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'streamFusionApiKey', name: 'StreamFusion API Key', @@ -97,6 +112,7 @@ export class StreamFusionPreset extends Preset { default: undefined, emptyIsUndefined: true, }, + { id: 'socials', name: '', @@ -173,6 +189,7 @@ export class StreamFusionPreset extends Preset { : 'P2P', manifestUrl: this.generateManifestUrl(userData, options, serviceIds), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/stremthruStore.ts b/packages/core/src/presets/stremthruStore.ts index 7c5091a8..6b12c85c 100644 --- a/packages/core/src/presets/stremthruStore.ts +++ b/packages/core/src/presets/stremthruStore.ts @@ -96,6 +96,21 @@ export class StremthruStorePreset extends StremThruPreset { 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'webDl', name: 'Web Downloads', @@ -165,6 +180,7 @@ export class StremthruStorePreset extends StremThruPreset { : undefined, manifestUrl: this.generateManifestUrl(userData, options, serviceId), enabled: true, + mediaTypes: options.mediaTypes || [], library: true, resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, diff --git a/packages/core/src/presets/stremthruTorz.ts b/packages/core/src/presets/stremthruTorz.ts index 9f73b74e..215068f0 100644 --- a/packages/core/src/presets/stremthruTorz.ts +++ b/packages/core/src/presets/stremthruTorz.ts @@ -57,6 +57,21 @@ export class StremthruTorzPreset extends StremThruPreset { Env.DEFAULT_STREMTHRU_STORE_TIMEOUT, Env.STREMTHRU_TORZ_URL ), + { + 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'services', name: 'Services', @@ -186,6 +201,7 @@ export class StremthruTorzPreset extends StremThruPreset { : undefined, manifestUrl: this.generateManifestUrl(userData, options, serviceIds), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/torbox.ts b/packages/core/src/presets/torbox.ts index 6cfa4ce5..7a8f8d0a 100644 --- a/packages/core/src/presets/torbox.ts +++ b/packages/core/src/presets/torbox.ts @@ -95,6 +95,21 @@ export class TorboxAddonPreset extends Preset { const options: Option[] = [ ...baseOptions('TorBox', supportedResources, Env.DEFAULT_TORBOX_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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'socials', name: '', @@ -138,6 +153,7 @@ export class TorboxAddonPreset extends Preset { name: options.name || this.METADATA.NAME, manifestUrl: this.generateManifestUrl(userData, options), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/torboxSearch.ts b/packages/core/src/presets/torboxSearch.ts index 5df9f6d8..331fdf72 100644 --- a/packages/core/src/presets/torboxSearch.ts +++ b/packages/core/src/presets/torboxSearch.ts @@ -115,6 +115,30 @@ export class TorBoxSearchPreset extends StremThruPreset { 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, + showInNoobMode: false, + default: [], + options: [ + { + label: 'Movie', + value: 'movie', + }, + { + label: 'Series', + value: 'series', + }, + { + label: 'Anime', + value: 'anime', + }, + ], + }, { id: 'userSearchEngines', name: 'Use User Search Engines', @@ -209,6 +233,7 @@ export class TorBoxSearchPreset extends StremThruPreset { ? 'multi' : constants.SERVICE_DETAILS[services[0]].shortName, manifestUrl: this.generateManifestUrl(userData, services, options), + mediaTypes: options.mediaTypes || [], enabled: true, resources: this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, diff --git a/packages/core/src/presets/torrentGalaxy.ts b/packages/core/src/presets/torrentGalaxy.ts index cbb0ca8f..26f68c13 100644 --- a/packages/core/src/presets/torrentGalaxy.ts +++ b/packages/core/src/presets/torrentGalaxy.ts @@ -39,6 +39,30 @@ export class TorrentGalaxyPreset extends TorznabPreset { 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, + showInNoobMode: false, + default: [], + options: [ + { + label: 'Movie', + value: 'movie', + }, + { + label: 'Series', + value: 'series', + }, + { + label: 'Anime', + value: 'anime', + }, + ], + }, { id: 'useMultipleInstances', name: 'Use Multiple Instances', diff --git a/packages/core/src/presets/torrentsDb.ts b/packages/core/src/presets/torrentsDb.ts index 4650a098..0efeea16 100644 --- a/packages/core/src/presets/torrentsDb.ts +++ b/packages/core/src/presets/torrentsDb.ts @@ -143,18 +143,19 @@ export class TorrentsDbPreset extends Preset { Env.DEFAULT_TORRENTS_DB_TIMEOUT ), { - id: 'providers', - name: 'Providers', + id: 'mediaTypes', + name: 'Media Types', description: - 'Optionally override the providers that are used. If not specified, then the default providers will be used.', + '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, - options: TorrentsDbPreset.defaultProviders, - default: TorrentsDbPreset.defaultProviders.map( - (provider) => provider.value - ), - emptyIsUndefined: true, showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], }, { id: 'services', @@ -171,6 +172,20 @@ export class TorrentsDbPreset extends Preset { emptyIsUndefined: true, showInNoobMode: false, }, + { + id: 'providers', + name: 'Providers', + description: + 'Optionally override the providers that are used. If not specified, then the default providers will be used.', + type: 'multi-select', + required: false, + options: TorrentsDbPreset.defaultProviders, + default: TorrentsDbPreset.defaultProviders.map( + (provider) => provider.value + ), + emptyIsUndefined: true, + showInNoobMode: false, + }, { id: 'includeP2P', name: 'Include P2P', @@ -269,6 +284,7 @@ export class TorrentsDbPreset extends Preset { : 'p2p', manifestUrl: this.generateManifestUrl(userData, services, options), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/torznab.ts b/packages/core/src/presets/torznab.ts index 45a31ed1..e5d7f125 100644 --- a/packages/core/src/presets/torznab.ts +++ b/packages/core/src/presets/torznab.ts @@ -66,6 +66,30 @@ export class TorznabPreset extends BuiltinAddonPreset { 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, + showInNoobMode: false, + default: [], + options: [ + { + label: 'Movie', + value: 'movie', + }, + { + label: 'Series', + value: 'series', + }, + { + label: 'Anime', + value: 'anime', + }, + ], + }, { id: 'forceQuerySearch', name: 'Force Query Search', @@ -74,6 +98,15 @@ export class TorznabPreset extends BuiltinAddonPreset { required: false, default: false, }, + { + id: 'useMultipleInstances', + name: 'Use Multiple Instances', + description: + 'Torznab supports multiple services in one instance of the addon - which is used by default. If this is enabled, then the addon will be created for each service.', + type: 'boolean', + default: false, + showInNoobMode: false, + }, ]; return { @@ -126,6 +159,13 @@ export class TorznabPreset extends BuiltinAddonPreset { return { name: options.name || this.METADATA.NAME, manifestUrl: this.generateManifestUrl(userData, services, options), + identifier: + services.length > 1 + ? 'multi' + : constants.SERVICE_DETAILS[services[0]].shortName, + displayIdentifier: services + .map((id) => constants.SERVICE_DETAILS[id].shortName) + .join(' | '), enabled: true, library: options.libraryAddon ?? false, resources: options.resources || undefined, diff --git a/packages/core/src/presets/webstreamr.ts b/packages/core/src/presets/webstreamr.ts index 4f0432bb..1c7831ea 100644 --- a/packages/core/src/presets/webstreamr.ts +++ b/packages/core/src/presets/webstreamr.ts @@ -155,6 +155,21 @@ export class WebStreamrPreset extends Preset { supportedResources, Env.DEFAULT_WEBSTREAMR_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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'providers', name: 'Providers', @@ -217,6 +232,7 @@ export class WebStreamrPreset extends Preset { name: options.name || this.METADATA.NAME, manifestUrl: this.generateManifestUrl(userData, options), enabled: true, + mediaTypes: options.mediaTypes || [], resources: options.resources || this.METADATA.SUPPORTED_RESOURCES, timeout: options.timeout || this.METADATA.TIMEOUT, preset: { diff --git a/packages/core/src/presets/zilean.ts b/packages/core/src/presets/zilean.ts index a7fb1cd4..fdb80aad 100644 --- a/packages/core/src/presets/zilean.ts +++ b/packages/core/src/presets/zilean.ts @@ -20,6 +20,21 @@ export class ZileanPreset extends TorznabPreset { type: 'url', required: false, }, + { + 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, + showInNoobMode: false, + options: [ + { label: 'Movie', value: 'movie' }, + { label: 'Series', value: 'series' }, + { label: 'Anime', value: 'anime' }, + ], + default: [], + }, { id: 'services', name: 'Services',