mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
fix(presets/stremthru-store): add Usenet stream type handling and info hash extraction
This commit is contained in:
@@ -40,6 +40,26 @@ class StremthruStoreStreamParser extends StremThruStreamParser {
|
||||
}
|
||||
return super.applyUrlModifications(url);
|
||||
}
|
||||
|
||||
protected getStreamType(
|
||||
stream: Stream,
|
||||
service: ParsedStream['service'],
|
||||
currentParsedStream: ParsedStream
|
||||
): ParsedStream['type'] {
|
||||
if (stream.name?.includes('Usenet')) {
|
||||
return constants.USENET_STREAM_TYPE;
|
||||
}
|
||||
return super.getStreamType(stream, service, currentParsedStream);
|
||||
}
|
||||
|
||||
protected getInfoHash(
|
||||
stream: Stream,
|
||||
currentParsedStream: ParsedStream
|
||||
): string | undefined {
|
||||
return currentParsedStream.type !== 'usenet'
|
||||
? stream.behaviorHints?.bingeGroup?.match(/[a-fA-F0-9]{40}$/)?.[0]
|
||||
: undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export class StremthruStorePreset extends StremThruPreset {
|
||||
|
||||
Reference in New Issue
Block a user