add whisper download utils. add react-navigator.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { Cache } from "react-native-cache";
|
||||
import { LIBRETRANSLATE_BASE_URL } from "@/constants/api";
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { Settings } from "../lib/settings";
|
||||
|
||||
type language_t = string;
|
||||
|
||||
@ -51,6 +52,11 @@ export class LanguageServer {
|
||||
throw new Error(`Can't extract values from data: ${JSON.stringify(data)}`)
|
||||
}
|
||||
}
|
||||
|
||||
static async getDefault() {
|
||||
const settings = await Settings.getDefault();
|
||||
return new LanguageServer(await settings.getLibretranslateBaseUrl());
|
||||
}
|
||||
}
|
||||
|
||||
export class Translator {
|
||||
|
Reference in New Issue
Block a user