mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-22 02:56:24 -07:00
Enhance AniList character dictionary sync and subtitle features (#15)
This commit is contained in:
17
src/shared/video-extensions.ts
Normal file
17
src/shared/video-extensions.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export const VIDEO_EXTENSIONS = new Set([
|
||||
'mkv',
|
||||
'mp4',
|
||||
'avi',
|
||||
'webm',
|
||||
'mov',
|
||||
'flv',
|
||||
'wmv',
|
||||
'm4v',
|
||||
'ts',
|
||||
'm2ts',
|
||||
]);
|
||||
|
||||
export function hasVideoExtension(value: string): boolean {
|
||||
const normalized = value.trim().toLowerCase().replace(/^\./, '');
|
||||
return normalized.length > 0 && VIDEO_EXTENSIONS.has(normalized);
|
||||
}
|
||||
Reference in New Issue
Block a user