mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
fix(presets/usenet-streamer): correctly identify type and service
This commit is contained in:
@@ -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[] = [
|
||||
|
||||
Reference in New Issue
Block a user