This commit is contained in:
rang 2025-12-24 18:02:24 +08:00
parent 04fe06d1ac
commit bd9e985697
13 changed files with 1036 additions and 878 deletions

View file

@ -8,6 +8,8 @@ class AvailableHiveBoxes {
const AvailableHiveBoxes._(); const AvailableHiveBoxes._();
static Future<void> init() async { static Future<void> init() async {
await Hive.openBox('basicTypes');
/// Box for storing user preferences as [AppSettings] /// Box for storing user preferences as [AppSettings]
await Hive.openBox<AppSettings>('userPrefs'); await Hive.openBox<AppSettings>('userPrefs');
@ -27,6 +29,8 @@ class AvailableHiveBoxes {
await Hive.openBox<BookSettings>('bookSettings'); await Hive.openBox<BookSettings>('bookSettings');
} }
static final basicBox = Hive.box('basicTypes');
/// Box for storing user preferences as [AppSettings] /// Box for storing user preferences as [AppSettings]
static final userPrefsBox = Hive.box<AppSettings>('userPrefs'); static final userPrefsBox = Hive.box<AppSettings>('userPrefs');

View file

@ -10,4 +10,7 @@ class CacheKey {
static String libraryItems(String id) { static String libraryItems(String id) {
return 'library_items_$id'; return 'library_items_$id';
} }
// box的key id
static String activeLibraryItemId = 'activeLibraryItemId';
} }

View file

@ -466,12 +466,7 @@ class _LibraryItemPlayButton extends HookConsumerWidget {
return ElevatedButton.icon( return ElevatedButton.icon(
onPressed: () { onPressed: () {
currentBook?.libraryItemId == book.libraryItemId ref.read(currentBookProvider.notifier).update(book.libraryItemId);
? ref.read(absPlayerProvider).playOrPause()
: ref.read(absPlayerProvider.notifier).load(
book,
initialPosition: userMediaProgress?.currentTime,
);
}, },
icon: Hero( icon: Hero(
tag: HeroTagPrefixes.libraryItemPlayButton + book.libraryItemId, tag: HeroTagPrefixes.libraryItemPlayButton + book.libraryItemId,

View file

@ -1,17 +1,22 @@
import 'package:audio_service/audio_service.dart'; import 'package:audio_service/audio_service.dart';
import 'package:audio_session/audio_session.dart'; import 'package:audio_session/audio_session.dart';
import 'package:collection/collection.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:logging/logging.dart'; import 'package:logging/logging.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:shelfsdk/audiobookshelf_api.dart' as api; import 'package:shelfsdk/audiobookshelf_api.dart' as api;
import 'package:vaani/api/api_provider.dart'; import 'package:vaani/api/api_provider.dart';
import 'package:vaani/api/library_item_provider.dart'; import 'package:vaani/api/library_item_provider.dart';
import 'package:vaani/db/available_boxes.dart';
import 'package:vaani/db/cache/cache_key.dart';
import 'package:vaani/features/downloads/providers/download_manager.dart'; import 'package:vaani/features/downloads/providers/download_manager.dart';
import 'package:vaani/features/per_book_settings/providers/book_settings_provider.dart'; import 'package:vaani/features/per_book_settings/providers/book_settings_provider.dart';
import 'package:vaani/features/player/core/abs_audio_handler.dart'; import 'package:vaani/features/player/core/abs_audio_handler.dart';
import 'package:vaani/features/player/core/abs_audio_player.dart' as core; import 'package:vaani/features/player/core/abs_audio_player.dart' as core;
import 'package:vaani/features/player/core/abs_audio_player_platform.dart'; import 'package:vaani/features/player/core/abs_audio_player_platform.dart';
import 'package:vaani/features/settings/app_settings_provider.dart'; import 'package:vaani/features/settings/app_settings_provider.dart';
import 'package:vaani/shared/extensions/box.dart';
import 'package:vaani/shared/extensions/model_conversions.dart';
part 'abs_provider.g.dart'; part 'abs_provider.g.dart';
@ -48,34 +53,33 @@ Future<AudioHandler> configurePlayer(Ref ref) async {
} }
// just_audio // just_audio
// @Riverpod(keepAlive: true) @Riverpod(keepAlive: true)
// AudioPlayer audioPlayer(Ref ref) { core.AbsAudioPlayer audioPlayer(Ref ref) {
// // final player = AbsPlatformAudioPlayer();
// // prefetch-playlist=yes // final player = AbsMpvAudioPlayer();
// JustAudioMediaKit.prefetchPlaylist = true; ref.onDispose(player.dispose);
// // merge-files=yes return player;
// // cache=yes }
// // cache-pause-wait=60
// JustAudioMediaKit.ensureInitialized(); //
// return AudioPlayer(); @riverpod
// } bool playerActive(Ref ref) {
return false;
}
/// riverpod状态 /// riverpod状态
@Riverpod(keepAlive: true) @Riverpod(keepAlive: true)
class AbsPlayer extends _$AbsPlayer { class AbsPlayer extends _$AbsPlayer {
@override @override
core.AbsAudioPlayer build() { core.AbsAudioPlayer build() {
// final audioPlayer = ref.watch(audioPlayerProvider); final audioPlayer = ref.watch(audioPlayerProvider);
// final player = AbsMpvAudioPlayer(); return audioPlayer;
final player = AbsPlatformAudioPlayer();
ref.onDispose(player.dispose);
return player;
} }
Future<void> load( Future<void> load(
api.BookExpanded book, { api.BookExpanded book, {
Duration? initialPosition, Duration? initialPosition,
bool play = true,
}) async { }) async {
if (state.book == book || state.book?.libraryItemId == book.libraryItemId) { if (state.book == book || state.book?.libraryItemId == book.libraryItemId) {
state.playOrPause(); state.playOrPause();
@ -88,14 +92,13 @@ class AbsPlayer extends _$AbsPlayer {
await ref.read(libraryItemProvider(book.libraryItemId).future); await ref.read(libraryItemProvider(book.libraryItemId).future);
final downloadedUris = await downloadManager.getDownloadedFilesUri(libItem); final downloadedUris = await downloadManager.getDownloadedFilesUri(libItem);
var bookPlayerSettings = final bookSettings = ref.read(bookSettingsProvider(book.libraryItemId));
ref.read(bookSettingsProvider(book.libraryItemId)).playerSettings; var bookPlayerSettings = bookSettings.playerSettings;
var appPlayerSettings = ref.read(appSettingsProvider).playerSettings; var appPlayerSettings = ref.read(appSettingsProvider).playerSettings;
var configurePlayerForEveryBook = var configurePlayerForEveryBook =
appPlayerSettings.configurePlayerForEveryBook; appPlayerSettings.configurePlayerForEveryBook;
final bookSettings = ref.watch(bookSettingsProvider(book.libraryItemId));
await state.load( await state.load(
book, book,
baseUrl: api.baseUrl, baseUrl: api.baseUrl,
@ -119,7 +122,7 @@ class AbsPlayer extends _$AbsPlayer {
appPlayerSettings.preferredDefaultSpeed appPlayerSettings.preferredDefaultSpeed
: appPlayerSettings.preferredDefaultSpeed, : appPlayerSettings.preferredDefaultSpeed,
); );
await state.play(); if (play) await state.play();
} }
} }
@ -149,26 +152,57 @@ class PlayerState extends _$PlayerState {
} }
@riverpod @riverpod
class CurrentBook extends _$CurrentBook { Duration? currentTime(Ref ref, String libraryItemId) {
@override final me = ref.watch(meProvider);
api.BookExpanded? build() { final userProgress = me.valueOrNull?.mediaProgress
final player = ref.read(absPlayerProvider); ?.firstWhereOrNull((element) => element.libraryItemId == libraryItemId);
player.bookStream.listen((book) { return userProgress?.currentTime;
if (book != state) {
state = book;
}
});
return player.book;
}
} }
@riverpod @riverpod
bool isPlayerActive(Ref ref) { class CurrentBook extends _$CurrentBook {
final player = ref.read(absPlayerProvider); @override
player.bookStream.listen((book) { api.BookExpanded? build() {
ref.invalidateSelf(); listenSelf((previous, next) {
if (previous == null) {
final activeLibraryItemId = AvailableHiveBoxes.basicBox
.getAs<String>(CacheKey.activeLibraryItemId);
if (activeLibraryItemId != null) {
update(activeLibraryItemId, play: false);
}
}
}); });
return player.book != null; return null;
}
// @override
// api.BookExpanded? build() {
// final player = ref.read(absPlayerProvider);
// player.bookStream.listen((book) {
// if (book != state) {
// state = book;
// }
// });
// return player.book;
// }
Future<void> update(String libraryItemId, {bool play = true}) async {
if (state?.libraryItemId == libraryItemId) {
ref.read(audioPlayerProvider).playOrPause();
return;
}
final book = await ref.read(libraryItemProvider(libraryItemId).future);
state = book.media.asBookExpanded;
final currentTime = ref.read(currentTimeProvider(libraryItemId));
await ref
.read(absPlayerProvider.notifier)
.load(state!, initialPosition: currentTime, play: play);
if (play) {
AvailableHiveBoxes.basicBox.put(
CacheKey.activeLibraryItemId,
libraryItemId,
);
}
}
} }
@riverpod @riverpod

View file

@ -25,23 +25,189 @@ final configurePlayerProvider = FutureProvider<AudioHandler>.internal(
@Deprecated('Will be removed in 3.0. Use Ref instead') @Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element // ignore: unused_element
typedef ConfigurePlayerRef = FutureProviderRef<AudioHandler>; typedef ConfigurePlayerRef = FutureProviderRef<AudioHandler>;
String _$isPlayerActiveHash() => r'4fca4af53a17dbcd7c8a98ce115bc11fa39b4cf9'; String _$audioPlayerHash() => r'156f85effafdcd287db88e455e8f4f4d33c41a0e';
/// See also [isPlayerActive]. /// See also [audioPlayer].
@ProviderFor(isPlayerActive) @ProviderFor(audioPlayer)
final isPlayerActiveProvider = AutoDisposeProvider<bool>.internal( final audioPlayerProvider = Provider<core.AbsAudioPlayer>.internal(
isPlayerActive, audioPlayer,
name: r'isPlayerActiveProvider', name: r'audioPlayerProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') debugGetCreateSourceHash:
? null const bool.fromEnvironment('dart.vm.product') ? null : _$audioPlayerHash,
: _$isPlayerActiveHash,
dependencies: null, dependencies: null,
allTransitiveDependencies: null, allTransitiveDependencies: null,
); );
@Deprecated('Will be removed in 3.0. Use Ref instead') @Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element // ignore: unused_element
typedef IsPlayerActiveRef = AutoDisposeProviderRef<bool>; typedef AudioPlayerRef = ProviderRef<core.AbsAudioPlayer>;
String _$playerActiveHash() => r'86831758035aa69d74f42ebde0a19bf7ef830910';
/// See also [playerActive].
@ProviderFor(playerActive)
final playerActiveProvider = AutoDisposeProvider<bool>.internal(
playerActive,
name: r'playerActiveProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product') ? null : _$playerActiveHash,
dependencies: null,
allTransitiveDependencies: null,
);
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
typedef PlayerActiveRef = AutoDisposeProviderRef<bool>;
String _$currentTimeHash() => r'079945f118884b57d2e038117c7a7a5b873bc7d1';
/// Copied from Dart SDK
class _SystemHash {
_SystemHash._();
static int combine(int hash, int value) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + value);
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
return hash ^ (hash >> 6);
}
static int finish(int hash) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
// ignore: parameter_assignments
hash = hash ^ (hash >> 11);
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
}
}
/// See also [currentTime].
@ProviderFor(currentTime)
const currentTimeProvider = CurrentTimeFamily();
/// See also [currentTime].
class CurrentTimeFamily extends Family<Duration?> {
/// See also [currentTime].
const CurrentTimeFamily();
/// See also [currentTime].
CurrentTimeProvider call(
String libraryItemId,
) {
return CurrentTimeProvider(
libraryItemId,
);
}
@override
CurrentTimeProvider getProviderOverride(
covariant CurrentTimeProvider provider,
) {
return call(
provider.libraryItemId,
);
}
static const Iterable<ProviderOrFamily>? _dependencies = null;
@override
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
@override
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
_allTransitiveDependencies;
@override
String? get name => r'currentTimeProvider';
}
/// See also [currentTime].
class CurrentTimeProvider extends AutoDisposeProvider<Duration?> {
/// See also [currentTime].
CurrentTimeProvider(
String libraryItemId,
) : this._internal(
(ref) => currentTime(
ref as CurrentTimeRef,
libraryItemId,
),
from: currentTimeProvider,
name: r'currentTimeProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product')
? null
: _$currentTimeHash,
dependencies: CurrentTimeFamily._dependencies,
allTransitiveDependencies:
CurrentTimeFamily._allTransitiveDependencies,
libraryItemId: libraryItemId,
);
CurrentTimeProvider._internal(
super._createNotifier, {
required super.name,
required super.dependencies,
required super.allTransitiveDependencies,
required super.debugGetCreateSourceHash,
required super.from,
required this.libraryItemId,
}) : super.internal();
final String libraryItemId;
@override
Override overrideWith(
Duration? Function(CurrentTimeRef provider) create,
) {
return ProviderOverride(
origin: this,
override: CurrentTimeProvider._internal(
(ref) => create(ref as CurrentTimeRef),
from: from,
name: null,
dependencies: null,
allTransitiveDependencies: null,
debugGetCreateSourceHash: null,
libraryItemId: libraryItemId,
),
);
}
@override
AutoDisposeProviderElement<Duration?> createElement() {
return _CurrentTimeProviderElement(this);
}
@override
bool operator ==(Object other) {
return other is CurrentTimeProvider && other.libraryItemId == libraryItemId;
}
@override
int get hashCode {
var hash = _SystemHash.combine(0, runtimeType.hashCode);
hash = _SystemHash.combine(hash, libraryItemId.hashCode);
return _SystemHash.finish(hash);
}
}
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin CurrentTimeRef on AutoDisposeProviderRef<Duration?> {
/// The parameter `libraryItemId` of this provider.
String get libraryItemId;
}
class _CurrentTimeProviderElement extends AutoDisposeProviderElement<Duration?>
with CurrentTimeRef {
_CurrentTimeProviderElement(super.provider);
@override
String get libraryItemId => (origin as CurrentTimeProvider).libraryItemId;
}
String _$positionChapterHash() => r'ac6148e92363fad849713c07045503653dcaa7e8'; String _$positionChapterHash() => r'ac6148e92363fad849713c07045503653dcaa7e8';
/// See also [positionChapter]. /// See also [positionChapter].
@ -77,7 +243,7 @@ final currentChaptersProvider =
@Deprecated('Will be removed in 3.0. Use Ref instead') @Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element // ignore: unused_element
typedef CurrentChaptersRef = AutoDisposeProviderRef<List<api.BookChapter>>; typedef CurrentChaptersRef = AutoDisposeProviderRef<List<api.BookChapter>>;
String _$absPlayerHash() => r'dfb4a8e9778d44143ec7589a99c6295c32c64c4a'; String _$absPlayerHash() => r'74a59dbf0f9396fef6bb60363fb186f5e4619a63';
/// riverpod状态 /// riverpod状态
/// ///
@ -109,7 +275,7 @@ final playerStateProvider =
); );
typedef _$PlayerState = AutoDisposeNotifier<core.AbsPlayerState>; typedef _$PlayerState = AutoDisposeNotifier<core.AbsPlayerState>;
String _$currentBookHash() => r'f511c6f16c17696e41c6384c5195646a419deae3'; String _$currentBookHash() => r'eed66894cb003d9d8ebd7b128d6ebb4efd5cda1b';
/// See also [CurrentBook]. /// See also [CurrentBook].
@ProviderFor(CurrentBook) @ProviderFor(CurrentBook)

View file

@ -17,7 +17,7 @@ class ApiSettings extends _$ApiSettings {
@override @override
model.ApiSettings build() { model.ApiSettings build() {
state = readFromBoxOrCreate(); state = readFromBoxOrCreate();
ref.listenSelf((_, __) { listenSelf((_, __) {
writeToBox(); writeToBox();
}); });

View file

@ -6,7 +6,7 @@ part of 'api_settings_provider.dart';
// RiverpodGenerator // RiverpodGenerator
// ************************************************************************** // **************************************************************************
String _$apiSettingsHash() => r'd7aff154cb65b0396df3ccfe25c59dedb56226fa'; String _$apiSettingsHash() => r'304f1040bd8f308f9cd0fe7f03e44d0daeebbb5f';
/// See also [ApiSettings]. /// See also [ApiSettings].
@ProviderFor(ApiSettings) @ProviderFor(ApiSettings)

View file

@ -54,10 +54,8 @@ class MessageLookup extends MessageLookupByLibrary {
"accountDeleteServer": MessageLookupByLibrary.simpleMessage( "accountDeleteServer": MessageLookupByLibrary.simpleMessage(
"Delete Server", "Delete Server",
), ),
"accountInvalidURL": "accountInvalidURL": MessageLookupByLibrary.simpleMessage("Invalid URL"),
MessageLookupByLibrary.simpleMessage("Invalid URL"), "accountManage": MessageLookupByLibrary.simpleMessage("Manage Accounts"),
"accountManage":
MessageLookupByLibrary.simpleMessage("Manage Accounts"),
"accountRegisteredServers": MessageLookupByLibrary.simpleMessage( "accountRegisteredServers": MessageLookupByLibrary.simpleMessage(
"Registered Servers", "Registered Servers",
), ),
@ -96,8 +94,7 @@ class MessageLookup extends MessageLookupByLibrary {
"autoTurnOnTimerAlways": MessageLookupByLibrary.simpleMessage( "autoTurnOnTimerAlways": MessageLookupByLibrary.simpleMessage(
"Always Auto Turn On Timer", "Always Auto Turn On Timer",
), ),
"autoTurnOnTimerAlwaysDescription": "autoTurnOnTimerAlwaysDescription": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"Always turn on the sleep timer, no matter what", "Always turn on the sleep timer, no matter what",
), ),
"autoTurnOnTimerDescription": MessageLookupByLibrary.simpleMessage( "autoTurnOnTimerDescription": MessageLookupByLibrary.simpleMessage(
@ -125,11 +122,9 @@ class MessageLookup extends MessageLookupByLibrary {
"bookAuthors": MessageLookupByLibrary.simpleMessage("Authors"), "bookAuthors": MessageLookupByLibrary.simpleMessage("Authors"),
"bookDownloads": MessageLookupByLibrary.simpleMessage("Downloads"), "bookDownloads": MessageLookupByLibrary.simpleMessage("Downloads"),
"bookGenres": MessageLookupByLibrary.simpleMessage("Genres"), "bookGenres": MessageLookupByLibrary.simpleMessage("Genres"),
"bookMetadataAbridged": "bookMetadataAbridged": MessageLookupByLibrary.simpleMessage("Abridged"),
MessageLookupByLibrary.simpleMessage("Abridged"),
"bookMetadataLength": MessageLookupByLibrary.simpleMessage("Length"), "bookMetadataLength": MessageLookupByLibrary.simpleMessage("Length"),
"bookMetadataPublished": "bookMetadataPublished": MessageLookupByLibrary.simpleMessage("Published"),
MessageLookupByLibrary.simpleMessage("Published"),
"bookMetadataUnabridged": MessageLookupByLibrary.simpleMessage( "bookMetadataUnabridged": MessageLookupByLibrary.simpleMessage(
"Unabridged", "Unabridged",
), ),
@ -183,13 +178,11 @@ class MessageLookup extends MessageLookupByLibrary {
"homeBookContinueSeries": MessageLookupByLibrary.simpleMessage( "homeBookContinueSeries": MessageLookupByLibrary.simpleMessage(
"Continue Series", "Continue Series",
), ),
"homeBookContinueSeriesDescription": "homeBookContinueSeriesDescription": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"Show play button for books in continue series shelf", "Show play button for books in continue series shelf",
), ),
"homeBookDiscover": MessageLookupByLibrary.simpleMessage("Discover"), "homeBookDiscover": MessageLookupByLibrary.simpleMessage("Discover"),
"homeBookListenAgain": "homeBookListenAgain": MessageLookupByLibrary.simpleMessage("Listen Again"),
MessageLookupByLibrary.simpleMessage("Listen Again"),
"homeBookListenAgainDescription": MessageLookupByLibrary.simpleMessage( "homeBookListenAgainDescription": MessageLookupByLibrary.simpleMessage(
"Show play button for all books in listen again shelf", "Show play button for all books in listen again shelf",
), ),
@ -199,8 +192,7 @@ class MessageLookup extends MessageLookupByLibrary {
"homeBookRecentlyAdded": MessageLookupByLibrary.simpleMessage( "homeBookRecentlyAdded": MessageLookupByLibrary.simpleMessage(
"Recently Added", "Recently Added",
), ),
"homeBookRecommended": "homeBookRecommended": MessageLookupByLibrary.simpleMessage("Recommended"),
MessageLookupByLibrary.simpleMessage("Recommended"),
"homeContinueListening": MessageLookupByLibrary.simpleMessage( "homeContinueListening": MessageLookupByLibrary.simpleMessage(
"Continue Listening", "Continue Listening",
), ),
@ -273,8 +265,7 @@ class MessageLookup extends MessageLookupByLibrary {
"nmpSettingsMediaControls": MessageLookupByLibrary.simpleMessage( "nmpSettingsMediaControls": MessageLookupByLibrary.simpleMessage(
"Media Controls", "Media Controls",
), ),
"nmpSettingsMediaControlsDescription": "nmpSettingsMediaControlsDescription": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"Select the media controls to display", "Select the media controls to display",
), ),
"nmpSettingsSelectOne": MessageLookupByLibrary.simpleMessage( "nmpSettingsSelectOne": MessageLookupByLibrary.simpleMessage(
@ -293,32 +284,27 @@ class MessageLookup extends MessageLookupByLibrary {
"nmpSettingsSubTitleDescription": MessageLookupByLibrary.simpleMessage( "nmpSettingsSubTitleDescription": MessageLookupByLibrary.simpleMessage(
"The subtitle of the notification\n", "The subtitle of the notification\n",
), ),
"nmpSettingsTitle": "nmpSettingsTitle": MessageLookupByLibrary.simpleMessage("Primary Title"),
MessageLookupByLibrary.simpleMessage("Primary Title"),
"nmpSettingsTitleDescription": MessageLookupByLibrary.simpleMessage( "nmpSettingsTitleDescription": MessageLookupByLibrary.simpleMessage(
"The title of the notification\n", "The title of the notification\n",
), ),
"no": MessageLookupByLibrary.simpleMessage("No"), "no": MessageLookupByLibrary.simpleMessage("No"),
"notImplemented": "notImplemented": MessageLookupByLibrary.simpleMessage("Not implemented"),
MessageLookupByLibrary.simpleMessage("Not implemented"),
"notificationMediaPlayer": MessageLookupByLibrary.simpleMessage( "notificationMediaPlayer": MessageLookupByLibrary.simpleMessage(
"Notification Media Player", "Notification Media Player",
), ),
"notificationMediaPlayerDescription": "notificationMediaPlayerDescription": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"Customize the media player in notifications", "Customize the media player in notifications",
), ),
"ok": MessageLookupByLibrary.simpleMessage("OK"), "ok": MessageLookupByLibrary.simpleMessage("OK"),
"pause": MessageLookupByLibrary.simpleMessage("Pause"), "pause": MessageLookupByLibrary.simpleMessage("Pause"),
"play": MessageLookupByLibrary.simpleMessage("Play"), "play": MessageLookupByLibrary.simpleMessage("Play"),
"playerSettings": "playerSettings": MessageLookupByLibrary.simpleMessage("Player Settings"),
MessageLookupByLibrary.simpleMessage("Player Settings"),
"playerSettingsCompleteTime": MessageLookupByLibrary.simpleMessage( "playerSettingsCompleteTime": MessageLookupByLibrary.simpleMessage(
"Mark Complete When Time Left", "Mark Complete When Time Left",
), ),
"playerSettingsCompleteTimeDescriptionHead": "playerSettingsCompleteTimeDescriptionHead":
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage("Mark complete when less than "),
"Mark complete when less than "),
"playerSettingsCompleteTimeDescriptionTail": "playerSettingsCompleteTimeDescriptionTail":
MessageLookupByLibrary.simpleMessage(" left in the book"), MessageLookupByLibrary.simpleMessage(" left in the book"),
"playerSettingsDescription": MessageLookupByLibrary.simpleMessage( "playerSettingsDescription": MessageLookupByLibrary.simpleMessage(
@ -333,8 +319,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage(
"Show the progress of the current chapter in the player", "Show the progress of the current chapter in the player",
), ),
"playerSettingsDisplayTotalProgress": "playerSettingsDisplayTotalProgress": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"Show Total Progress", "Show Total Progress",
), ),
"playerSettingsDisplayTotalProgressDescription": "playerSettingsDisplayTotalProgressDescription":
@ -363,8 +348,7 @@ class MessageLookup extends MessageLookupByLibrary {
), ),
"playerSettingsPlaybackReportingMinimumDescriptionTail": "playerSettingsPlaybackReportingMinimumDescriptionTail":
MessageLookupByLibrary.simpleMessage("of the book"), MessageLookupByLibrary.simpleMessage("of the book"),
"playerSettingsRememberForEveryBook": "playerSettingsRememberForEveryBook": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"Remember Player Settings for Every Book", "Remember Player Settings for Every Book",
), ),
"playerSettingsRememberForEveryBookDescription": "playerSettingsRememberForEveryBookDescription":
@ -378,17 +362,14 @@ class MessageLookup extends MessageLookupByLibrary {
"playerSettingsSpeedOptions": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedOptions": MessageLookupByLibrary.simpleMessage(
"Speed Options", "Speed Options",
), ),
"playerSettingsSpeedOptionsSelect": "playerSettingsSpeedOptionsSelect": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"Select Speed Options", "Select Speed Options",
), ),
"playerSettingsSpeedOptionsSelectAdd": "playerSettingsSpeedOptionsSelectAdd": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"Add Speed Option", "Add Speed Option",
), ),
"playerSettingsSpeedOptionsSelectAddHelper": "playerSettingsSpeedOptionsSelectAddHelper":
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage("Enter a new speed option to add"),
"Enter a new speed option to add"),
"playerSettingsSpeedSelect": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedSelect": MessageLookupByLibrary.simpleMessage(
"Select Speed", "Select Speed",
), ),
@ -436,8 +417,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shakeActivationThreshold": MessageLookupByLibrary.simpleMessage( "shakeActivationThreshold": MessageLookupByLibrary.simpleMessage(
"Shake Activation Threshold", "Shake Activation Threshold",
), ),
"shakeActivationThresholdDescription": "shakeActivationThresholdDescription": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"The higher the threshold, the harder you need to shake", "The higher the threshold, the harder you need to shake",
), ),
"shakeDetector": MessageLookupByLibrary.simpleMessage("Shake Detector"), "shakeDetector": MessageLookupByLibrary.simpleMessage("Shake Detector"),
@ -475,8 +455,7 @@ class MessageLookup extends MessageLookupByLibrary {
"themeModeHighContrast": MessageLookupByLibrary.simpleMessage( "themeModeHighContrast": MessageLookupByLibrary.simpleMessage(
"High Contrast Mode", "High Contrast Mode",
), ),
"themeModeHighContrastDescription": "themeModeHighContrastDescription": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"Increase the contrast between the background and the text", "Increase the contrast between the background and the text",
), ),
"themeModeLight": MessageLookupByLibrary.simpleMessage("Light"), "themeModeLight": MessageLookupByLibrary.simpleMessage("Light"),
@ -491,8 +470,7 @@ class MessageLookup extends MessageLookupByLibrary {
"themeSettingsColorsBook": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsBook": MessageLookupByLibrary.simpleMessage(
"Adaptive Theme on Item Page", "Adaptive Theme on Item Page",
), ),
"themeSettingsColorsBookDescription": "themeSettingsColorsBookDescription": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"Get fancy with the colors on the item page at the cost of some performance", "Get fancy with the colors on the item page at the cost of some performance",
), ),
"themeSettingsColorsCurrent": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsCurrent": MessageLookupByLibrary.simpleMessage(

View file

@ -50,8 +50,7 @@ class MessageLookup extends MessageLookupByLibrary {
"accountDeleteServer": MessageLookupByLibrary.simpleMessage("删除服务器"), "accountDeleteServer": MessageLookupByLibrary.simpleMessage("删除服务器"),
"accountInvalidURL": MessageLookupByLibrary.simpleMessage("无效网址"), "accountInvalidURL": MessageLookupByLibrary.simpleMessage("无效网址"),
"accountManage": MessageLookupByLibrary.simpleMessage("帐户管理"), "accountManage": MessageLookupByLibrary.simpleMessage("帐户管理"),
"accountRegisteredServers": "accountRegisteredServers": MessageLookupByLibrary.simpleMessage("已注册服务器"),
MessageLookupByLibrary.simpleMessage("已注册服务器"),
"accountRemoveServerAndUsers": MessageLookupByLibrary.simpleMessage( "accountRemoveServerAndUsers": MessageLookupByLibrary.simpleMessage(
"删除服务器和用户", "删除服务器和用户",
), ),
@ -61,8 +60,7 @@ class MessageLookup extends MessageLookupByLibrary {
"accountRemoveServerAndUsersTail": MessageLookupByLibrary.simpleMessage( "accountRemoveServerAndUsersTail": MessageLookupByLibrary.simpleMessage(
" 以及该应用程序中所有用户的登录信息。", " 以及该应用程序中所有用户的登录信息。",
), ),
"accountRemoveUserLogin": "accountRemoveUserLogin": MessageLookupByLibrary.simpleMessage("删除用户登录"),
MessageLookupByLibrary.simpleMessage("删除用户登录"),
"accountRemoveUserLoginHead": MessageLookupByLibrary.simpleMessage( "accountRemoveUserLoginHead": MessageLookupByLibrary.simpleMessage(
"这将删除用户 ", "这将删除用户 ",
), ),
@ -74,15 +72,11 @@ class MessageLookup extends MessageLookupByLibrary {
"accountUsersCount": m1, "accountUsersCount": m1,
"appSettings": MessageLookupByLibrary.simpleMessage("应用设置"), "appSettings": MessageLookupByLibrary.simpleMessage("应用设置"),
"appearance": MessageLookupByLibrary.simpleMessage("外观"), "appearance": MessageLookupByLibrary.simpleMessage("外观"),
"autoSleepTimerSettings": "autoSleepTimerSettings": MessageLookupByLibrary.simpleMessage("自动睡眠定时器设置"),
MessageLookupByLibrary.simpleMessage("自动睡眠定时器设置"), "autoTurnOnSleepTimer": MessageLookupByLibrary.simpleMessage("自动开启睡眠定时器"),
"autoTurnOnSleepTimer":
MessageLookupByLibrary.simpleMessage("自动开启睡眠定时器"),
"autoTurnOnTimer": MessageLookupByLibrary.simpleMessage("自动开启定时器"), "autoTurnOnTimer": MessageLookupByLibrary.simpleMessage("自动开启定时器"),
"autoTurnOnTimerAlways": "autoTurnOnTimerAlways": MessageLookupByLibrary.simpleMessage("始终自动开启定时器"),
MessageLookupByLibrary.simpleMessage("始终自动开启定时器"), "autoTurnOnTimerAlwaysDescription": MessageLookupByLibrary.simpleMessage(
"autoTurnOnTimerAlwaysDescription":
MessageLookupByLibrary.simpleMessage(
"总是打开睡眠定时器", "总是打开睡眠定时器",
), ),
"autoTurnOnTimerDescription": MessageLookupByLibrary.simpleMessage( "autoTurnOnTimerDescription": MessageLookupByLibrary.simpleMessage(
@ -124,8 +118,7 @@ class MessageLookup extends MessageLookupByLibrary {
"copyToClipboardDescription": MessageLookupByLibrary.simpleMessage( "copyToClipboardDescription": MessageLookupByLibrary.simpleMessage(
"将应用程序设置复制到剪贴板", "将应用程序设置复制到剪贴板",
), ),
"copyToClipboardToast": "copyToClipboardToast": MessageLookupByLibrary.simpleMessage("设置已复制到剪贴板"),
MessageLookupByLibrary.simpleMessage("设置已复制到剪贴板"),
"delete": MessageLookupByLibrary.simpleMessage("删除"), "delete": MessageLookupByLibrary.simpleMessage("删除"),
"deleteDialog": m2, "deleteDialog": m2,
"deleted": m3, "deleted": m3,
@ -135,13 +128,11 @@ class MessageLookup extends MessageLookupByLibrary {
"general": MessageLookupByLibrary.simpleMessage("通用"), "general": MessageLookupByLibrary.simpleMessage("通用"),
"help": MessageLookupByLibrary.simpleMessage("Help"), "help": MessageLookupByLibrary.simpleMessage("Help"),
"home": MessageLookupByLibrary.simpleMessage("首页"), "home": MessageLookupByLibrary.simpleMessage("首页"),
"homeBookContinueListening": "homeBookContinueListening": MessageLookupByLibrary.simpleMessage("继续收听"),
MessageLookupByLibrary.simpleMessage("继续收听"),
"homeBookContinueListeningDescription": "homeBookContinueListeningDescription":
MessageLookupByLibrary.simpleMessage("继续收听书架上显示播放按钮"), MessageLookupByLibrary.simpleMessage("继续收听书架上显示播放按钮"),
"homeBookContinueSeries": MessageLookupByLibrary.simpleMessage("继续系列"), "homeBookContinueSeries": MessageLookupByLibrary.simpleMessage("继续系列"),
"homeBookContinueSeriesDescription": "homeBookContinueSeriesDescription": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"继续系列书架上显示播放按钮", "继续系列书架上显示播放按钮",
), ),
"homeBookDiscover": MessageLookupByLibrary.simpleMessage("发现"), "homeBookDiscover": MessageLookupByLibrary.simpleMessage("发现"),
@ -163,8 +154,7 @@ class MessageLookup extends MessageLookupByLibrary {
), ),
"homePageSettingsOtherShelvesDescription": "homePageSettingsOtherShelvesDescription":
MessageLookupByLibrary.simpleMessage("显示所有剩余书架上所有书籍的播放按钮"), MessageLookupByLibrary.simpleMessage("显示所有剩余书架上所有书籍的播放按钮"),
"homePageSettingsQuickPlay": "homePageSettingsQuickPlay": MessageLookupByLibrary.simpleMessage("继续播放"),
MessageLookupByLibrary.simpleMessage("继续播放"),
"homeStartListening": MessageLookupByLibrary.simpleMessage("开始收听"), "homeStartListening": MessageLookupByLibrary.simpleMessage("开始收听"),
"language": MessageLookupByLibrary.simpleMessage("语言"), "language": MessageLookupByLibrary.simpleMessage("语言"),
"languageDescription": MessageLookupByLibrary.simpleMessage("语言切换"), "languageDescription": MessageLookupByLibrary.simpleMessage("语言切换"),
@ -181,8 +171,7 @@ class MessageLookup extends MessageLookupByLibrary {
"loginOpenID": MessageLookupByLibrary.simpleMessage("OpenID"), "loginOpenID": MessageLookupByLibrary.simpleMessage("OpenID"),
"loginPassword": MessageLookupByLibrary.simpleMessage("密码"), "loginPassword": MessageLookupByLibrary.simpleMessage("密码"),
"loginServerClick": MessageLookupByLibrary.simpleMessage("单击此处"), "loginServerClick": MessageLookupByLibrary.simpleMessage("单击此处"),
"loginServerConnected": "loginServerConnected": MessageLookupByLibrary.simpleMessage("服务器已连接,请登录"),
MessageLookupByLibrary.simpleMessage("服务器已连接,请登录"),
"loginServerNo": MessageLookupByLibrary.simpleMessage("没有服务器? "), "loginServerNo": MessageLookupByLibrary.simpleMessage("没有服务器? "),
"loginServerNoConnected": MessageLookupByLibrary.simpleMessage( "loginServerNoConnected": MessageLookupByLibrary.simpleMessage(
"请输入您的AudiobookShelf服务器的URL", "请输入您的AudiobookShelf服务器的URL",
@ -195,10 +184,8 @@ class MessageLookup extends MessageLookupByLibrary {
"logs": MessageLookupByLibrary.simpleMessage("日志"), "logs": MessageLookupByLibrary.simpleMessage("日志"),
"nmpSettingsBackward": MessageLookupByLibrary.simpleMessage("快退间隔"), "nmpSettingsBackward": MessageLookupByLibrary.simpleMessage("快退间隔"),
"nmpSettingsForward": MessageLookupByLibrary.simpleMessage("快进间隔"), "nmpSettingsForward": MessageLookupByLibrary.simpleMessage("快进间隔"),
"nmpSettingsMediaControls": "nmpSettingsMediaControls": MessageLookupByLibrary.simpleMessage("媒体控制"),
MessageLookupByLibrary.simpleMessage("媒体控制"), "nmpSettingsMediaControlsDescription": MessageLookupByLibrary.simpleMessage(
"nmpSettingsMediaControlsDescription":
MessageLookupByLibrary.simpleMessage(
"选择要显示的媒体控件", "选择要显示的媒体控件",
), ),
"nmpSettingsSelectOne": MessageLookupByLibrary.simpleMessage( "nmpSettingsSelectOne": MessageLookupByLibrary.simpleMessage(
@ -219,10 +206,8 @@ class MessageLookup extends MessageLookupByLibrary {
), ),
"no": MessageLookupByLibrary.simpleMessage(""), "no": MessageLookupByLibrary.simpleMessage(""),
"notImplemented": MessageLookupByLibrary.simpleMessage("未实现"), "notImplemented": MessageLookupByLibrary.simpleMessage("未实现"),
"notificationMediaPlayer": "notificationMediaPlayer": MessageLookupByLibrary.simpleMessage("通知媒体播放器"),
MessageLookupByLibrary.simpleMessage("通知媒体播放器"), "notificationMediaPlayerDescription": MessageLookupByLibrary.simpleMessage(
"notificationMediaPlayerDescription":
MessageLookupByLibrary.simpleMessage(
"在通知中自定义媒体播放器", "在通知中自定义媒体播放器",
), ),
"ok": MessageLookupByLibrary.simpleMessage("确定"), "ok": MessageLookupByLibrary.simpleMessage("确定"),
@ -244,8 +229,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("显示章节进度"), MessageLookupByLibrary.simpleMessage("显示章节进度"),
"playerSettingsDisplayChapterProgressDescription": "playerSettingsDisplayChapterProgressDescription":
MessageLookupByLibrary.simpleMessage("在播放器中显示当前章节的进度"), MessageLookupByLibrary.simpleMessage("在播放器中显示当前章节的进度"),
"playerSettingsDisplayTotalProgress": "playerSettingsDisplayTotalProgress": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"显示总进度", "显示总进度",
), ),
"playerSettingsDisplayTotalProgressDescription": "playerSettingsDisplayTotalProgressDescription":
@ -268,8 +252,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("不要报告本书前 "), MessageLookupByLibrary.simpleMessage("不要报告本书前 "),
"playerSettingsPlaybackReportingMinimumDescriptionTail": "playerSettingsPlaybackReportingMinimumDescriptionTail":
MessageLookupByLibrary.simpleMessage(" 的播放"), MessageLookupByLibrary.simpleMessage(" 的播放"),
"playerSettingsRememberForEveryBook": "playerSettingsRememberForEveryBook": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"记住每本书的播放器设置", "记住每本书的播放器设置",
), ),
"playerSettingsRememberForEveryBookDescription": "playerSettingsRememberForEveryBookDescription":
@ -281,18 +264,15 @@ class MessageLookup extends MessageLookupByLibrary {
"playerSettingsSpeedOptions": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedOptions": MessageLookupByLibrary.simpleMessage(
"播放速度选项", "播放速度选项",
), ),
"playerSettingsSpeedOptionsSelect": "playerSettingsSpeedOptionsSelect": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"播放速度选项", "播放速度选项",
), ),
"playerSettingsSpeedOptionsSelectAdd": "playerSettingsSpeedOptionsSelectAdd": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"添加一个速度选项", "添加一个速度选项",
), ),
"playerSettingsSpeedOptionsSelectAddHelper": "playerSettingsSpeedOptionsSelectAddHelper":
MessageLookupByLibrary.simpleMessage("输入一个新的速度选项"), MessageLookupByLibrary.simpleMessage("输入一个新的速度选项"),
"playerSettingsSpeedSelect": "playerSettingsSpeedSelect": MessageLookupByLibrary.simpleMessage("选择播放速度"),
MessageLookupByLibrary.simpleMessage("选择播放速度"),
"playerSettingsSpeedSelectHelper": MessageLookupByLibrary.simpleMessage( "playerSettingsSpeedSelectHelper": MessageLookupByLibrary.simpleMessage(
"输入默认的播放速度", "输入默认的播放速度",
), ),
@ -313,10 +293,8 @@ class MessageLookup extends MessageLookupByLibrary {
"restoreBackupHint": MessageLookupByLibrary.simpleMessage("将备份粘贴到此处"), "restoreBackupHint": MessageLookupByLibrary.simpleMessage("将备份粘贴到此处"),
"restoreBackupInvalid": MessageLookupByLibrary.simpleMessage("无效备份"), "restoreBackupInvalid": MessageLookupByLibrary.simpleMessage("无效备份"),
"restoreBackupSuccess": MessageLookupByLibrary.simpleMessage("设置已恢复"), "restoreBackupSuccess": MessageLookupByLibrary.simpleMessage("设置已恢复"),
"restoreBackupValidator": "restoreBackupValidator": MessageLookupByLibrary.simpleMessage("请将备份粘贴到此处"),
MessageLookupByLibrary.simpleMessage("请将备份粘贴到此处"), "restoreDescription": MessageLookupByLibrary.simpleMessage("从备份中还原应用程序设置"),
"restoreDescription":
MessageLookupByLibrary.simpleMessage("从备份中还原应用程序设置"),
"resume": MessageLookupByLibrary.simpleMessage("继续"), "resume": MessageLookupByLibrary.simpleMessage("继续"),
"retry": MessageLookupByLibrary.simpleMessage("重试"), "retry": MessageLookupByLibrary.simpleMessage("重试"),
"settings": MessageLookupByLibrary.simpleMessage("设置"), "settings": MessageLookupByLibrary.simpleMessage("设置"),
@ -324,10 +302,8 @@ class MessageLookup extends MessageLookupByLibrary {
"shakeActionDescription": MessageLookupByLibrary.simpleMessage( "shakeActionDescription": MessageLookupByLibrary.simpleMessage(
"检测到抖动时要执行的操作", "检测到抖动时要执行的操作",
), ),
"shakeActivationThreshold": "shakeActivationThreshold": MessageLookupByLibrary.simpleMessage("抖动激活阈值"),
MessageLookupByLibrary.simpleMessage("抖动激活阈值"), "shakeActivationThresholdDescription": MessageLookupByLibrary.simpleMessage(
"shakeActivationThresholdDescription":
MessageLookupByLibrary.simpleMessage(
"门槛越高,你就越难摇晃", "门槛越高,你就越难摇晃",
), ),
"shakeDetector": MessageLookupByLibrary.simpleMessage("抖动检测器"), "shakeDetector": MessageLookupByLibrary.simpleMessage("抖动检测器"),
@ -338,8 +314,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shakeDetectorEnableDescription": MessageLookupByLibrary.simpleMessage( "shakeDetectorEnableDescription": MessageLookupByLibrary.simpleMessage(
"启用抖动检测以执行各种操作", "启用抖动检测以执行各种操作",
), ),
"shakeDetectorSettings": "shakeDetectorSettings": MessageLookupByLibrary.simpleMessage("抖动检测器设置"),
MessageLookupByLibrary.simpleMessage("抖动检测器设置"),
"shakeFeedback": MessageLookupByLibrary.simpleMessage("抖动反馈"), "shakeFeedback": MessageLookupByLibrary.simpleMessage("抖动反馈"),
"shakeFeedbackDescription": MessageLookupByLibrary.simpleMessage( "shakeFeedbackDescription": MessageLookupByLibrary.simpleMessage(
"检测到抖动时给出的反馈", "检测到抖动时给出的反馈",
@ -354,21 +329,18 @@ class MessageLookup extends MessageLookupByLibrary {
"themeMode": MessageLookupByLibrary.simpleMessage("主题模式"), "themeMode": MessageLookupByLibrary.simpleMessage("主题模式"),
"themeModeDark": MessageLookupByLibrary.simpleMessage("深色"), "themeModeDark": MessageLookupByLibrary.simpleMessage("深色"),
"themeModeHighContrast": MessageLookupByLibrary.simpleMessage("高对比度模式"), "themeModeHighContrast": MessageLookupByLibrary.simpleMessage("高对比度模式"),
"themeModeHighContrastDescription": "themeModeHighContrastDescription": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"增加背景和文本之间的对比度", "增加背景和文本之间的对比度",
), ),
"themeModeLight": MessageLookupByLibrary.simpleMessage("浅色"), "themeModeLight": MessageLookupByLibrary.simpleMessage("浅色"),
"themeModeSystem": MessageLookupByLibrary.simpleMessage("跟随系统"), "themeModeSystem": MessageLookupByLibrary.simpleMessage("跟随系统"),
"themeSettings": MessageLookupByLibrary.simpleMessage("主题设置"), "themeSettings": MessageLookupByLibrary.simpleMessage("主题设置"),
"themeSettingsColors": MessageLookupByLibrary.simpleMessage("主题色"), "themeSettingsColors": MessageLookupByLibrary.simpleMessage("主题色"),
"themeSettingsColorsAndroid": "themeSettingsColorsAndroid": MessageLookupByLibrary.simpleMessage("主题色"),
MessageLookupByLibrary.simpleMessage("主题色"),
"themeSettingsColorsBook": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsBook": MessageLookupByLibrary.simpleMessage(
"书籍详情页自适应主题", "书籍详情页自适应主题",
), ),
"themeSettingsColorsBookDescription": "themeSettingsColorsBookDescription": MessageLookupByLibrary.simpleMessage(
MessageLookupByLibrary.simpleMessage(
"以牺牲一些性能为代价,对书籍详情页的颜色进行美化", "以牺牲一些性能为代价,对书籍详情页的颜色进行美化",
), ),
"themeSettingsColorsCurrent": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsCurrent": MessageLookupByLibrary.simpleMessage(
@ -379,8 +351,7 @@ class MessageLookup extends MessageLookupByLibrary {
"themeSettingsColorsDescription": MessageLookupByLibrary.simpleMessage( "themeSettingsColorsDescription": MessageLookupByLibrary.simpleMessage(
"使用应用程序的系统主题色", "使用应用程序的系统主题色",
), ),
"themeSettingsDescription": "themeSettingsDescription": MessageLookupByLibrary.simpleMessage("自定义应用主题"),
MessageLookupByLibrary.simpleMessage("自定义应用主题"),
"timeSecond": m7, "timeSecond": m7,
"unknown": MessageLookupByLibrary.simpleMessage("未知"), "unknown": MessageLookupByLibrary.simpleMessage("未知"),
"webVersion": MessageLookupByLibrary.simpleMessage("Web版本"), "webVersion": MessageLookupByLibrary.simpleMessage("Web版本"),

View file

@ -81,9 +81,10 @@ class AbsApp extends ConsumerWidget {
@override @override
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
final servers = ref.watch(audiobookShelfServerProvider); final servers = ref.watch(audiobookShelfServerProvider);
final apiSettings = ref.watch(apiSettingsProvider); final activeUser =
ref.watch(apiSettingsProvider.select((v) => v.activeUser));
final needOnboarding = apiSettings.activeUser == null || servers.isEmpty; final needOnboarding = activeUser == null || servers.isEmpty;
if (needOnboarding) { if (needOnboarding) {
routerConfig.goNamed(Routes.onboarding.name); routerConfig.goNamed(Routes.onboarding.name);

View file

@ -49,7 +49,6 @@ class ScaffoldWithNavBar extends HookConsumerWidget {
} }
Widget buildNavLeft(BuildContext context, WidgetRef ref) { Widget buildNavLeft(BuildContext context, WidgetRef ref) {
// final isPlayerActive = ref.watch(isPlayerActiveProvider);
final currentBook = ref.watch(currentBookProvider); final currentBook = ref.watch(currentBookProvider);
return Padding( return Padding(
padding: padding:

View file

@ -0,0 +1,11 @@
import 'package:hive_ce/hive.dart';
extension BoxExtension on Box {
T? getAs<T>(dynamic key, {String? defaultValue}) {
final value = get(key, defaultValue: defaultValue);
if (value is T) {
return value;
}
return null;
}
}

View file

@ -287,17 +287,13 @@ class _BookOnShelfPlayButton extends HookConsumerWidget {
), ),
), ),
onPressed: () async { onPressed: () async {
final book = ref.read(currentBookProvider.notifier).update(libraryItemId);
await ref.watch(libraryItemProvider(libraryItemId).future); // final book =
// await ref.watch(libraryItemProvider(libraryItemId).future);
// ref.read(currentBookProvider.notifier).update( // ref.read(absPlayerProvider.notifier).load(
// book.media.asBookExpanded, // book.media.asBookExpanded,
// userProgress?.currentTime, // initialPosition: userProgress?.currentTime,
// ); // );
ref.read(absPlayerProvider.notifier).load(
book.media.asBookExpanded,
initialPosition: userProgress?.currentTime,
);
}, },
icon: Hero( icon: Hero(
tag: HeroTagPrefixes.libraryItemPlayButton + libraryItemId, tag: HeroTagPrefixes.libraryItemPlayButton + libraryItemId,