24 changed files with 165 additions and 155 deletions
@ -1,14 +1,16 @@
@@ -1,14 +1,16 @@
|
||||
import { ReactNode } from "react"; |
||||
|
||||
export interface PaperProps { |
||||
children?: ReactNode, |
||||
className?: string, |
||||
children?: ReactNode; |
||||
className?: string; |
||||
} |
||||
|
||||
export function Paper(props: PaperProps) { |
||||
return ( |
||||
<div className={`bg-denim-200 lg:rounded-xl px-4 sm:px-8 md:px-12 py-6 sm:py-8 md:py-12 ${props.className}`}> |
||||
<div |
||||
className={`bg-denim-200 px-4 py-6 sm:px-8 sm:py-8 md:px-12 md:py-12 lg:rounded-xl ${props.className}`} |
||||
> |
||||
{props.children} |
||||
</div> |
||||
) |
||||
); |
||||
} |
||||
|
@ -1,97 +1,97 @@
@@ -1,97 +1,97 @@
|
||||
export enum MWMediaType { |
||||
MOVIE = "movie", |
||||
SERIES = "series", |
||||
ANIME = "anime", |
||||
} |
||||
|
||||
export interface MWPortableMedia { |
||||
mediaId: string; |
||||
mediaType: MWMediaType; |
||||
providerId: string; |
||||
seasonId?: string; |
||||
episodeId?: string; |
||||
} |
||||
|
||||
export type MWMediaStreamType = "m3u8" | "mp4"; |
||||
export interface MWMediaCaption { |
||||
id: string; |
||||
url: string; |
||||
label: string; |
||||
} |
||||
export interface MWMediaStream { |
||||
url: string; |
||||
type: MWMediaStreamType; |
||||
captions: MWMediaCaption[]; |
||||
} |
||||
|
||||
export interface MWMediaMeta extends MWPortableMedia { |
||||
title: string; |
||||
year: string; |
||||
seasonCount?: number; |
||||
} |
||||
|
||||
export interface MWMediaEpisode { |
||||
sort: number; |
||||
id: string; |
||||
title: string; |
||||
} |
||||
export interface MWMediaSeason { |
||||
sort: number; |
||||
id: string; |
||||
title?: string; |
||||
type: "season" | "special"; |
||||
episodes: MWMediaEpisode[]; |
||||
} |
||||
export interface MWMediaSeasons { |
||||
seasons: MWMediaSeason[]; |
||||
} |
||||
|
||||
export interface MWMedia extends MWMediaMeta { |
||||
seriesData?: MWMediaSeasons; |
||||
} |
||||
|
||||
export type MWProviderMediaResult = Omit<MWMedia, "mediaType" | "providerId">; |
||||
|
||||
export interface MWQuery { |
||||
searchQuery: string; |
||||
type: MWMediaType; |
||||
} |
||||
|
||||
export interface MWMediaProviderBase { |
||||
id: string; // id of provider, must be unique
|
||||
enabled: boolean; |
||||
type: MWMediaType[]; |
||||
displayName: string; |
||||
|
||||
getMediaFromPortable(media: MWPortableMedia): Promise<MWProviderMediaResult>; |
||||
searchForMedia(query: MWQuery): Promise<MWProviderMediaResult[]>; |
||||
getStream(media: MWPortableMedia): Promise<MWMediaStream>; |
||||
getSeasonDataFromMedia?: (media: MWPortableMedia) => Promise<MWMediaSeasons>; |
||||
} |
||||
|
||||
export type MWMediaProviderSeries = MWMediaProviderBase & { |
||||
getSeasonDataFromMedia: (media: MWPortableMedia) => Promise<MWMediaSeasons>; |
||||
}; |
||||
|
||||
export type MWMediaProvider = MWMediaProviderBase; |
||||
|
||||
export interface MWMediaProviderMetadata { |
||||
exists: boolean; |
||||
id?: string; |
||||
enabled: boolean; |
||||
type: MWMediaType[]; |
||||
provider?: MWMediaProvider; |
||||
} |
||||
|
||||
export interface MWMassProviderOutput { |
||||
providers: { |
||||
id: string; |
||||
success: boolean; |
||||
}[]; |
||||
results: MWMedia[]; |
||||
stats: { |
||||
total: number; |
||||
failed: number; |
||||
succeeded: number; |
||||
}; |
||||
} |
||||
export enum MWMediaType { |
||||
MOVIE = "movie", |
||||
SERIES = "series", |
||||
ANIME = "anime", |
||||
} |
||||
|
||||
export interface MWPortableMedia { |
||||
mediaId: string; |
||||
mediaType: MWMediaType; |
||||
providerId: string; |
||||
seasonId?: string; |
||||
episodeId?: string; |
||||
} |
||||
|
||||
export type MWMediaStreamType = "m3u8" | "mp4"; |
||||
export interface MWMediaCaption { |
||||
id: string; |
||||
url: string; |
||||
label: string; |
||||
} |
||||
export interface MWMediaStream { |
||||
url: string; |
||||
type: MWMediaStreamType; |
||||
captions: MWMediaCaption[]; |
||||
} |
||||
|
||||
export interface MWMediaMeta extends MWPortableMedia { |
||||
title: string; |
||||
year: string; |
||||
seasonCount?: number; |
||||
} |
||||
|
||||
export interface MWMediaEpisode { |
||||
sort: number; |
||||
id: string; |
||||
title: string; |
||||
} |
||||
export interface MWMediaSeason { |
||||
sort: number; |
||||
id: string; |
||||
title?: string; |
||||
type: "season" | "special"; |
||||
episodes: MWMediaEpisode[]; |
||||
} |
||||
export interface MWMediaSeasons { |
||||
seasons: MWMediaSeason[]; |
||||
} |
||||
|
||||
export interface MWMedia extends MWMediaMeta { |
||||
seriesData?: MWMediaSeasons; |
||||
} |
||||
|
||||
export type MWProviderMediaResult = Omit<MWMedia, "mediaType" | "providerId">; |
||||
|
||||
export interface MWQuery { |
||||
searchQuery: string; |
||||
type: MWMediaType; |
||||
} |
||||
|
||||
export interface MWMediaProviderBase { |
||||
id: string; // id of provider, must be unique
|
||||
enabled: boolean; |
||||
type: MWMediaType[]; |
||||
displayName: string; |
||||
|
||||
getMediaFromPortable(media: MWPortableMedia): Promise<MWProviderMediaResult>; |
||||
searchForMedia(query: MWQuery): Promise<MWProviderMediaResult[]>; |
||||
getStream(media: MWPortableMedia): Promise<MWMediaStream>; |
||||
getSeasonDataFromMedia?: (media: MWPortableMedia) => Promise<MWMediaSeasons>; |
||||
} |
||||
|
||||
export type MWMediaProviderSeries = MWMediaProviderBase & { |
||||
getSeasonDataFromMedia: (media: MWPortableMedia) => Promise<MWMediaSeasons>; |
||||
}; |
||||
|
||||
export type MWMediaProvider = MWMediaProviderBase; |
||||
|
||||
export interface MWMediaProviderMetadata { |
||||
exists: boolean; |
||||
id?: string; |
||||
enabled: boolean; |
||||
type: MWMediaType[]; |
||||
provider?: MWMediaProvider; |
||||
} |
||||
|
||||
export interface MWMassProviderOutput { |
||||
providers: { |
||||
id: string; |
||||
success: boolean; |
||||
}[]; |
||||
results: MWMedia[]; |
||||
stats: { |
||||
total: number; |
||||
failed: number; |
||||
succeeded: number; |
||||
}; |
||||
} |
||||
|
@ -1 +1 @@
@@ -1 +1 @@
|
||||
export * from "./context"; |
||||
export * from "./context"; |
||||
|
Loading…
Reference in new issue