chore: update Angular cache and TypeScript build info files
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
export type ProviderId = 'yt' | 'dm' | 'tw' | 'pt' | 'od' | 'ru';
|
||||
|
||||
export interface ProviderSpec {
|
||||
id: ProviderId;
|
||||
displayName: string;
|
||||
shortLabel: string; // YT, DM, ...
|
||||
icon: string; // lucide or custom svg name
|
||||
colorClass: string; // tailwind text-red-500, etc.
|
||||
supports: { search: boolean; shorts: boolean; live: boolean; playlists: boolean };
|
||||
buildSearchUrl: (q: string, opts?: { page?: number; limit?: number; providers?: ProviderId[] | 'all' }) => string; // front-only fallback
|
||||
}
|
||||
|
||||
export const PROVIDERS: ProviderSpec[] = [
|
||||
{ id: 'yt', displayName: 'YouTube', shortLabel: 'YT', icon: 'youtube', colorClass: 'text-red-500',
|
||||
supports: { search: true, shorts: true, live: true, playlists: true },
|
||||
buildSearchUrl: (q, opts) => `/api/search?q=${encodeURIComponent(q)}&providers=${encodeURIComponent((opts?.providers && opts.providers !== 'all') ? opts.providers.join(',') : 'yt,dm,tw,pt,od,ru')}`
|
||||
},
|
||||
{ id: 'dm', displayName: 'Dailymotion', shortLabel: 'DM', icon: 'dailymotion', colorClass: 'text-blue-500',
|
||||
supports: { search: true, shorts: false, live: false, playlists: false },
|
||||
buildSearchUrl: (q, opts) => `/api/search?q=${encodeURIComponent(q)}&providers=${encodeURIComponent((opts?.providers && opts.providers !== 'all') ? opts.providers.join(',') : 'yt,dm,tw,pt,od,ru')}`
|
||||
},
|
||||
{ id: 'tw', displayName: 'Twitch', shortLabel: 'TW', icon: 'twitch', colorClass: 'text-purple-500',
|
||||
supports: { search: true, shorts: false, live: true, playlists: false },
|
||||
buildSearchUrl: (q, opts) => `/api/search?q=${encodeURIComponent(q)}&providers=${encodeURIComponent((opts?.providers && opts.providers !== 'all') ? opts.providers.join(',') : 'yt,dm,tw,pt,od,ru')}`
|
||||
},
|
||||
{ id: 'pt', displayName: 'PeerTube', shortLabel: 'PT', icon: 'peertube', colorClass: 'text-green-500',
|
||||
supports: { search: true, shorts: false, live: false, playlists: true },
|
||||
buildSearchUrl: (q, opts) => `/api/search?q=${encodeURIComponent(q)}&providers=${encodeURIComponent((opts?.providers && opts.providers !== 'all') ? opts.providers.join(',') : 'yt,dm,tw,pt,od,ru')}`
|
||||
},
|
||||
{ id: 'od', displayName: 'Odysee', shortLabel: 'OD', icon: 'odysee', colorClass: 'text-yellow-500',
|
||||
supports: { search: true, shorts: false, live: false, playlists: false },
|
||||
buildSearchUrl: (q, opts) => `/api/search?q=${encodeURIComponent(q)}&providers=${encodeURIComponent((opts?.providers && opts.providers !== 'all') ? opts.providers.join(',') : 'yt,dm,tw,pt,od,ru')}`
|
||||
},
|
||||
{ id: 'ru', displayName: 'Rumble', shortLabel: 'RU', icon: 'rumble', colorClass: 'text-orange-500',
|
||||
supports: { search: true, shorts: false, live: false, playlists: false },
|
||||
buildSearchUrl: (q, opts) => `/api/search?q=${encodeURIComponent(q)}&providers=${encodeURIComponent((opts?.providers && opts.providers !== 'all') ? opts.providers.join(',') : 'yt,dm,tw,pt,od,ru')}`
|
||||
},
|
||||
];
|
||||
|
||||
export const PROVIDER_MAP = new Map(PROVIDERS.map(p => [p.id, p]));
|
||||
Reference in New Issue
Block a user