///
import { FFProbeResult } from "ffprobe";
import { EpisodeInfo, MediaInfo, Progress, SeasonInfo, ShowInfo, MovieInfo, User as ClientUser, DevicePreferences } from "@rewind-media/rewind-protocol";
export interface LibraryScanTask {
readonly libraryName: string;
}
export interface StreamSegmentMetadata {
readonly index: number;
readonly duration: number;
}
export interface Mime {
readonly mimeType: string;
readonly codecs: string[];
}
export interface StreamMetadataWrapper {
metadata?: StreamMetadata;
}
export interface StreamMetadata {
readonly streamProps: StreamProps;
readonly segments: StreamSegmentMetadata[];
readonly subtitles?: SubtitleMetadata;
readonly mime: Mime;
readonly complete: boolean;
readonly processedSecs: number;
readonly totalDurationSecs: number;
}
export interface SubtitleSegment {
readonly duration: number;
readonly content: string;
}
export interface SubtitleMetadata {
readonly segments: SubtitleSegment[];
readonly complete: boolean;
}
export interface ServerConfig {
readonly key: string;
readonly value: string;
}
export interface FfProbeInfoFormat {
readonly duration?: number;
readonly filename?: string;
}
export interface FfProbeInfo extends FFProbeResult {
readonly format: FfProbeInfoFormat;
}
export interface SearchProps {
readonly text: string;
}
export interface SearchIndexProps {
readonly user: ClientUser;
}
export interface StreamProps {
readonly id: string;
readonly mediaInfo: ServerMediaInfo;
readonly audioStreamName?: string;
readonly videoStreamName?: string;
readonly subtitleStreamName?: string;
readonly startOffset: number;
readonly duration: number;
}
export interface User extends ClientUser {
readonly hashedPass: Buffer;
readonly salt: string;
}
export declare const LibraryDataTypes: readonly ["episode", "show", "season", "movie", "image"];
export type LibraryDataType = (typeof LibraryDataTypes)[number];
export interface LibraryData {
readonly libraryId: string;
readonly lastUpdated: number;
readonly type: LibraryDataType;
}
export interface LocalPath {
readonly localPath: string;
}
export type FileLocation = LocalPath;
export interface UserProgress extends Progress {
readonly username: string;
}
export interface ServerUser extends User {
readonly hashedPass: Buffer;
readonly salt: string;
}
export declare function isFileLocation(obj: unknown): obj is FileLocation;
export declare function isLocalPath(obj: unknown): obj is LocalPath;
export type ServerMovieInfo = MovieInfo & ServerMediaInfo & {
type: "movie";
};
export type ServerEpisodeInfo = EpisodeInfo & ServerMediaInfo & {
type: "episode";
};
export type ServerSeasonInfo = SeasonInfo & LibraryData & {
type: "season";
};
export type ServerShowInfo = ShowInfo & LibraryData & {
type: "show";
};
export interface ServerFileInfo extends LibraryData {
readonly location: FileLocation;
}
export interface ServerImageInfo extends ServerFileInfo {
readonly id: string;
readonly name: string;
readonly type: "image";
}
export interface ServerMediaInfo extends ServerFileInfo, Readonly {
readonly runTime: number;
readonly ffProbeInfo: FfProbeInfo;
readonly subtitleFiles: Record;
}
export interface ServerUserDevicePreferences extends DevicePreferences {
readonly username: string;
}
export declare function isServerShowInfo(obj: unknown): obj is ServerShowInfo;
export declare function isServerEpisodeInfo(obj: unknown): obj is ServerEpisodeInfo;
export declare function isServerSeasonInfo(obj: unknown): obj is ServerSeasonInfo;
export declare function isServerMovieInfo(obj: unknown): obj is ServerMovieInfo;
//# sourceMappingURL=models.d.ts.map