fix: only infer proxied attribute for nzbdav/altmount with built-in addons

This commit is contained in:
Viren070
2025-11-20 12:15:00 +00:00
parent af79a18c6a
commit cf43d7f0a6
2 changed files with 17 additions and 9 deletions
+1 -9
View File
@@ -354,15 +354,7 @@ class StreamParser {
stream: Stream,
currentParsedStream: ParsedStream
): ParsedStream['service'] | undefined {
const service = this.parseServiceData(stream.name || '');
if (
service &&
(service.id === constants.NZBDAV_SERVICE ||
service.id === constants.ALTMOUNT_SERVICE)
) {
currentParsedStream.proxied = !stream.behaviorHints?.proxyHeaders;
}
return service;
return this.parseServiceData(stream.name || '');
}
protected getInfoHash(
+16
View File
@@ -27,6 +27,22 @@ export class BuiltinStreamParser extends StreamParser {
}
return undefined;
}
protected getService(
stream: Stream,
currentParsedStream: ParsedStream
): ParsedStream['service'] | undefined {
const service = this.parseServiceData(stream.name || '');
if (
service &&
(service.id === constants.NZBDAV_SERVICE ||
service.id === constants.ALTMOUNT_SERVICE)
) {
currentParsedStream.proxied = !stream.behaviorHints?.proxyHeaders;
}
return service;
}
protected parseServiceData(
string: string
): ParsedStream['service'] | undefined {