mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-17 17:53:43 +08:00
- Added EpisodeList component for displaying a list of episodes with selection functionality. - Created PlayerError component to handle and display video playback errors. - Developed VideoMetadata component to show detailed information about the video. - Implemented VideoPlayer component for video playback with error handling and loading states. - Introduced EmptyState and NoResults components for search results handling. - Created ResultsHeader component to display search results summary. - Developed SearchForm component for user input and search initiation. - Implemented SourceBadges component to show available video sources. - Created VideoGrid component to display search results in a grid format. - Added useSearchCache and useSearchStream hooks for managing search state and caching results. - Implemented useVideoPlayer hook for fetching and managing video details. - Added utility function to map source IDs to their respective names.
28 lines
744 B
TypeScript
28 lines
744 B
TypeScript
export function getSourceName(sourceId: string): string {
|
|
const sourceNames: Record<string, string> = {
|
|
'dytt': '电影天堂',
|
|
'ruyi': '如意',
|
|
'baofeng': '暴风',
|
|
'tianya': '天涯',
|
|
'feifan': '非凡影视',
|
|
'sanliuling': '360',
|
|
'wolong': '卧龙',
|
|
'jisu': '极速',
|
|
'mozhua': '魔爪',
|
|
'modu': '魔都',
|
|
'zuida': '最大',
|
|
'yinghua': '樱花',
|
|
'baiduyun': '百度云',
|
|
'wujin': '无尽',
|
|
'wangwang': '旺旺',
|
|
'ikun': 'iKun',
|
|
};
|
|
return sourceNames[sourceId] || sourceId;
|
|
}
|
|
|
|
export const SOURCE_IDS = [
|
|
'dytt', 'ruyi', 'baofeng', 'tianya', 'feifan',
|
|
'sanliuling', 'wolong', 'jisu', 'mozhua', 'modu',
|
|
'zuida', 'yinghua', 'baiduyun', 'wujin', 'wangwang', 'ikun'
|
|
];
|