mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 13:03:25 +00:00
25 lines
558 B
TypeScript
25 lines
558 B
TypeScript
import { MediaTypes } from '@/entrypoint/utils/media';
|
|
|
|
export const febBoxBase = `https://www.febbox.com`;
|
|
|
|
export interface FebboxFileList {
|
|
file_name: string;
|
|
ext: string;
|
|
fid: number;
|
|
oss_fid: number;
|
|
is_dir: 0 | 1;
|
|
}
|
|
|
|
export function parseInputUrl(url: string) {
|
|
const [type, id, seasonId, episodeId] = url.slice(1).split('/');
|
|
const season = seasonId ? parseInt(seasonId, 10) : undefined;
|
|
const episode = episodeId ? parseInt(episodeId, 10) : undefined;
|
|
|
|
return {
|
|
type: type as MediaTypes,
|
|
id,
|
|
season,
|
|
episode,
|
|
};
|
|
}
|