fix(presets/usenet-streamer): correctly identify type and service

This commit is contained in:
Viren070
2025-11-28 19:18:35 +00:00
parent 9f77bb41b7
commit 58caf63d13
+13 -5
View File
@@ -16,14 +16,19 @@ export class UsenetStreamerParser extends StreamParser {
service: ParsedStream['service'],
currentParsedStream: ParsedStream
): ParsedStream['type'] {
return constants.USENET_STREAM_TYPE;
return stream.nzbUrl
? constants.STREMIO_USENET_STREAM_TYPE
: constants.USENET_STREAM_TYPE;
}
protected override parseServiceData(
string: string
protected getService(
stream: Stream,
currentParsedStream: ParsedStream
): ParsedStream['service'] | undefined {
return {
id: constants.NZBDAV_SERVICE,
id: stream.nzbUrl
? constants.STREMIO_NNTP_SERVICE
: constants.NZBDAV_SERVICE,
cached: true,
};
}
@@ -57,7 +62,10 @@ export class UsenetStreamerPreset extends Preset {
}
static override get METADATA(): PresetMetadata {
const supportedServices = [constants.NZBDAV_SERVICE];
const supportedServices = [
constants.NZBDAV_SERVICE,
constants.STREMIO_NNTP_SERVICE,
];
const supportedResources = [constants.STREAM_RESOURCE];
const options: Option[] = [