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