feat: Remove direct link handling from video cards and grids, and expand source retrieval to include adult sources.

This commit is contained in:
kuekhaoyang
2025-11-28 20:46:49 +08:00
parent 8d3ac02602
commit 81759ec274
6 changed files with 17 additions and 31 deletions
+10 -2
View File
@@ -5,12 +5,20 @@
import type { VideoSource } from '@/lib/types';
import { DEFAULT_SOURCES } from './default-sources';
import { ADULT_SOURCES } from './adult-sources';
/**
* Get source by ID
* Get source by ID from both default and adult sources
*/
export function getSourceById(id: string): VideoSource | undefined {
return DEFAULT_SOURCES.find(source => source.id === id);
// Search in default sources first
const defaultSource = DEFAULT_SOURCES.find(source => source.id === id);
if (defaultSource) {
return defaultSource;
}
// Search in adult sources
return ADULT_SOURCES.find(source => source.id === id);
}