mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
feat(core/formatter): add seasonPack attribute to stream
This commit is contained in:
@@ -667,6 +667,7 @@ export const ParsedFileSchema = z.object({
|
||||
network: z.string().optional(),
|
||||
container: z.string().optional(),
|
||||
extension: z.string().optional(),
|
||||
seasonPack: z.boolean().optional(),
|
||||
});
|
||||
|
||||
export const ParsedStreamSchema = z.object({
|
||||
|
||||
@@ -94,6 +94,7 @@ export interface ParseValue {
|
||||
episode: number | null;
|
||||
formattedEpisodes: string | null;
|
||||
seasonEpisode: string[] | null;
|
||||
seasonPack: boolean | null;
|
||||
seeders: number | null;
|
||||
age: string | null;
|
||||
duration: number | null;
|
||||
@@ -304,6 +305,7 @@ export abstract class BaseFormatter {
|
||||
formattedEpisodes: formattedEpisodeString || null,
|
||||
episodes: stream.parsedFile?.episodes || null,
|
||||
seasonEpisode: seasonEpisode || null,
|
||||
seasonPack: stream.parsedFile?.seasonPack || null,
|
||||
duration: stream.duration || null,
|
||||
infoHash: stream.torrent?.infoHash || null,
|
||||
age: formattedAge,
|
||||
|
||||
@@ -83,6 +83,7 @@ class FileParser {
|
||||
extension: parsed.extension,
|
||||
seasons: parsed.seasons,
|
||||
episodes: parsed.episodes,
|
||||
seasonPack: !!(parsed.seasons?.length && !parsed.episodes?.length),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,6 +495,7 @@ class StreamParser {
|
||||
arrayMerge(folderParsed?.languages, fileParsed?.languages),
|
||||
this.getLanguages(stream, parsedStream)
|
||||
),
|
||||
seasonPack: folderParsed?.seasonPack || fileParsed?.seasonPack,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user