mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-27 16:49:51 -07:00
feat(youtube): add mediaCache mode and safer stream media extraction (#130)
This commit is contained in:
@@ -16,6 +16,7 @@ import type {
|
||||
StatsConfig,
|
||||
YomitanConfig,
|
||||
YoutubeConfig,
|
||||
YoutubeMediaCacheMode,
|
||||
YoutubeSubgenConfig,
|
||||
} from './integrations';
|
||||
import type {
|
||||
@@ -345,6 +346,10 @@ export interface ResolvedConfig {
|
||||
};
|
||||
youtube: YoutubeConfig & {
|
||||
primarySubLanguages: string[];
|
||||
mediaCache: {
|
||||
mode: YoutubeMediaCacheMode;
|
||||
maxHeight: number;
|
||||
};
|
||||
};
|
||||
youtubeSubgen: YoutubeSubgenConfig & {
|
||||
whisperBin: string;
|
||||
|
||||
@@ -122,8 +122,16 @@ export interface AiConfig {
|
||||
requestTimeoutMs?: number;
|
||||
}
|
||||
|
||||
export type YoutubeMediaCacheMode = 'direct' | 'background';
|
||||
|
||||
export interface YoutubeMediaCacheConfig {
|
||||
mode?: YoutubeMediaCacheMode;
|
||||
maxHeight?: number;
|
||||
}
|
||||
|
||||
export interface YoutubeConfig {
|
||||
primarySubLanguages?: string[];
|
||||
mediaCache?: YoutubeMediaCacheConfig;
|
||||
}
|
||||
|
||||
export interface YoutubeSubgenConfig {
|
||||
|
||||
@@ -43,6 +43,7 @@ export interface ConfigSettingsField {
|
||||
control: ConfigSettingsControl;
|
||||
defaultValue: unknown;
|
||||
enumValues?: readonly string[];
|
||||
enumLabels?: Record<string, string>;
|
||||
restartBehavior: ConfigSettingsRestartBehavior;
|
||||
advanced?: boolean;
|
||||
secret?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user