mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
fix: handle empty addon name in stream results and update description for addon name field
This commit is contained in:
@@ -23,11 +23,14 @@ class AIOStreamsStreamParser extends StreamParser {
|
||||
);
|
||||
throw new Error('Invalid stream');
|
||||
}
|
||||
const addonName = this.addon?.name?.trim();
|
||||
return {
|
||||
id: this.getRandomId(),
|
||||
addon: {
|
||||
...this.addon,
|
||||
name: `${this.addon.name} | ${aioStream.streamData?.addon ?? ''}`,
|
||||
name: addonName
|
||||
? `${addonName} | ${aioStream.streamData?.addon ?? ''}`
|
||||
: (aioStream.streamData?.addon ?? ''),
|
||||
},
|
||||
error: aioStream.streamData?.error,
|
||||
type: aioStream.streamData?.type ?? 'http',
|
||||
@@ -68,7 +71,8 @@ export class AIOStreamsPreset extends Preset {
|
||||
{
|
||||
id: 'name',
|
||||
name: 'Name',
|
||||
description: 'What to call this addon',
|
||||
description:
|
||||
"What to call this addon. Leave empty if you don't want to include the name of this addon in the stream results.",
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: 'AIOStreams',
|
||||
|
||||
Reference in New Issue
Block a user