mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 06:19:35 +00:00
123
This commit is contained in:
parent
161ac021b2
commit
ead8850b2e
4 changed files with 5 additions and 11 deletions
|
|
@ -74,7 +74,7 @@ AudiobookshelfApi audiobookshelfApi(Ref ref, Uri? baseUrl) {
|
|||
// try to get the base url from app settings
|
||||
final apiSettings = ref.watch(apiSettingsProvider);
|
||||
baseUrl ??= apiSettings.activeServer?.serverUrl;
|
||||
return DioAudiobookshelfApi(
|
||||
return HttpAudiobookshelfApi(
|
||||
baseUrl: makeBaseUrl(baseUrl.toString()),
|
||||
);
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ AudiobookshelfApi authenticatedApi(Ref ref) {
|
|||
_logger.severe('No active user can not provide authenticated api');
|
||||
throw StateError('No active user');
|
||||
}
|
||||
return DioAudiobookshelfApi(
|
||||
return HttpAudiobookshelfApi(
|
||||
baseUrl: makeBaseUrl(user.server.serverUrl.toString()),
|
||||
token: user.authToken,
|
||||
// client: CacheClient(Client(), options: options),
|
||||
|
|
@ -104,7 +104,7 @@ FutureOr<bool> isServerAlive(Ref ref, String address) async {
|
|||
}
|
||||
|
||||
try {
|
||||
return await DioAudiobookshelfApi(baseUrl: makeBaseUrl(address))
|
||||
return await HttpAudiobookshelfApi(baseUrl: makeBaseUrl(address))
|
||||
.server
|
||||
.ping() ??
|
||||
false;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Future initStorage() async {
|
|||
// );
|
||||
// await storageDir.create(recursive: true);
|
||||
|
||||
Hive.initFlutter(appName);
|
||||
await Hive.initFlutter(appName);
|
||||
// Hive.defaultDirectory = appDocumentsDir.path;
|
||||
// appLogger.config('Hive storage directory init: ${Hive.defaultDirectory}');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue