fix: add mediaTypes to more stream addons

This commit is contained in:
Viren070
2025-10-01 16:22:42 +01:00
parent 9b84e89cc1
commit 2aa2886ba5
28 changed files with 482 additions and 8 deletions
+16
View File
@@ -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,
+15
View File
@@ -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',
+16
View File
@@ -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: {
@@ -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: {
@@ -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 {
+16
View File
@@ -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: {
+15
View File
@@ -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: [],
},
],
};
}
@@ -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',
+16
View File
@@ -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: {
+15
View File
@@ -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',
+16
View File
@@ -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: {
+16
View File
@@ -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',
+16
View File
@@ -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: {
+15
View File
@@ -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
? [
+16
View File
@@ -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: {
+16
View File
@@ -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: {
+7
View File
@@ -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 || [],
+16
View File
@@ -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: {
+17
View File
@@ -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: {
@@ -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,
@@ -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: {
+16
View File
@@ -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: {
+25
View File
@@ -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,
@@ -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',
+24 -8
View File
@@ -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: {
+40
View File
@@ -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,
+16
View File
@@ -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: {
+15
View File
@@ -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',