feat(presets/aiostreams): add custom addon options (library, passthrough etc.)

This commit is contained in:
Viren070
2025-11-27 15:02:06 +00:00
parent ece56a2da8
commit c6d79c4898
+44 -1
View File
@@ -140,6 +140,46 @@ export class AIOStreamsPreset extends Preset {
], ],
default: [], default: [],
}, },
{
id: 'libraryAddon',
name: 'Library Addon',
description:
'Whether to mark this addon as a library addon. This will result in all streams from this addon being marked as library streams.',
type: 'boolean',
required: false,
showInSimpleMode: false,
default: false,
},
{
id: 'formatPassthrough',
name: 'Format Passthrough',
description:
'Whether to pass through the stream formatting. This means your formatting will not be applied and original stream formatting is retained.',
type: 'boolean',
required: false,
default: false,
showInSimpleMode: false,
},
{
id: 'resultPassthrough',
name: 'Result Passthrough',
description:
'If enabled, all results from this addon will never be filtered out and always included in the final stream list.',
type: 'boolean',
required: false,
default: false,
showInSimpleMode: false,
},
{
id: 'forceToTop',
name: 'Force to Top',
description:
'Whether to force results from this addon to be pushed to the top of the stream list.',
type: 'boolean',
required: false,
default: false,
showInSimpleMode: false,
},
]; ];
return { return {
@@ -178,9 +218,12 @@ export class AIOStreamsPreset extends Preset {
name: options.name ?? this.METADATA.NAME, name: options.name ?? this.METADATA.NAME,
manifestUrl: options.manifestUrl.replace('stremio://', 'https://'), manifestUrl: options.manifestUrl.replace('stremio://', 'https://'),
enabled: true, enabled: true,
library: false, library: options.libraryAddon ?? false,
resources: options.resources || undefined, resources: options.resources || undefined,
timeout: options.timeout || this.METADATA.TIMEOUT, timeout: options.timeout || this.METADATA.TIMEOUT,
resultPassthrough: options.resultPassthrough ?? false,
formatPassthrough: options.formatPassthrough ?? false,
forceToTop: options.forceToTop ?? false,
mediaTypes: options.mediaTypes || [], mediaTypes: options.mediaTypes || [],
preset: { preset: {
id: '', id: '',