add new settings redirect_to_flutter

This commit is contained in:
2024-02-03 09:35:41 +08:00
parent 80ad61f3e5
commit c9c92f0bd9
2 changed files with 24 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ export type ConfigType = {
fetch_timeout: number;
download_timeout: number;
ffprobe_path: string;
redirect_to_flutter: boolean;
};
export enum ThumbnailMethod {
@@ -186,6 +187,9 @@ export class Config {
get ffprobe_path() {
return this._return_string("ffprobe_path") || "ffprobe";
}
get redirect_to_flutter() {
return this._return_bool("redirect_to_flutter") ?? true;
}
to_json(): ConfigType {
return {
cookies: typeof this.cookies === "string",
@@ -215,6 +219,7 @@ export class Config {
fetch_timeout: this.fetch_timeout,
download_timeout: this.download_timeout,
ffprobe_path: this.ffprobe_path,
redirect_to_flutter: this.redirect_to_flutter,
};
}
}