更改播放器为media_kit

This commit is contained in:
rang 2025-12-06 17:50:37 +08:00
parent 1a317308dd
commit ac6158123f
14 changed files with 1092 additions and 878 deletions

View file

@ -1,10 +1,48 @@
import 'package:audio_service/audio_service.dart'; import 'package:audio_service/audio_service.dart';
import 'package:just_audio/just_audio.dart'; import 'package:media_kit/media_kit.dart';
class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler { class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
final AudioPlayer player; final Player player = Player();
AbsAudioHandler(this.player); AbsAudioHandler() {
// 1. /
player.stream.playing.listen((bool playing) {
playbackState.add(playbackState.value.copyWith(
playing: playing,
// playing processingState
processingState:
playing ? AudioProcessingState.ready : AudioProcessingState.idle,
));
});
// 2.
player.stream.position.listen((Duration position) {
playbackState.add(playbackState.value.copyWith(
updatePosition: position,
));
});
// 3.
player.stream.duration.listen((Duration? duration) {
// mediaItem duration
final currentItem = mediaItem.value;
if (currentItem != null && duration != null) {
mediaItem.add(currentItem.copyWith(duration: duration));
}
});
player.stream.completed.listen((bool playing) {
print('播放完成');
});
}
Future<void> playOrPause() async {
await player.playOrPause();
}
Future<void> setMediaItem(MediaItem mediaItem) async {
this.mediaItem.add(mediaItem);
await player.open(Media(mediaItem.id), play: false);
// ignore: unnecessary_null_comparison
await player.stream.duration.firstWhere((d) => d != null);
}
// //
@override @override
@ -19,12 +57,12 @@ class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
@override @override
Future<void> skipToNext() async { Future<void> skipToNext() async {
await player.seekToNext(); await player.next();
} }
@override @override
Future<void> skipToPrevious() async { Future<void> skipToPrevious() async {
await player.seekToPrevious(); await player.previous();
} }
@override @override
@ -34,6 +72,10 @@ class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
@override @override
Future<void> setSpeed(double speed) async { Future<void> setSpeed(double speed) async {
await player.setSpeed(speed); await player.setRate(speed);
}
Future<void> setVolume(double volume) async {
await player.setVolume(volume);
} }
} }

View file

@ -1,5 +1,29 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first // ignore_for_file: public_member_api_docs, sort_constructors_first
import 'package:just_audio/just_audio.dart'; // import 'package:just_audio/just_audio.dart';
import 'package:shelfsdk/audiobookshelf_api.dart'; import 'package:shelfsdk/audiobookshelf_api.dart' as api;
class AbsAudioPlayer extends AudioPlayer {} class AbsPlayerState {
api.BookExpanded? book;
//
final api.BookChapter? currentChapter;
//
final int currentIndex;
AbsPlayerState({
this.book,
this.currentChapter,
this.currentIndex = 0,
});
AbsPlayerState copyWith({
api.BookExpanded? book,
api.BookChapter? currentChapter,
int? currentIndex,
}) {
return AbsPlayerState(
book: book ?? this.book,
currentChapter: currentChapter ?? this.currentChapter,
currentIndex: currentIndex ?? this.currentIndex,
);
}
}

View file

@ -0,0 +1,30 @@
import 'package:audio_service/audio_service.dart';
import 'package:audio_session/audio_session.dart';
import 'package:media_kit/media_kit.dart';
import 'package:vaani/features/player/core/abs_audio_handler.dart' as core;
Future<core.AbsAudioHandler> absAudioHandlerInit() async {
// for playing audio on windows, linux
MediaKit.ensureInitialized();
// for configuring how this app will interact with other audio apps
final session = await AudioSession.instance;
await session.configure(const AudioSessionConfiguration.speech());
final audioService = await AudioService.init(
builder: () => core.AbsAudioHandler(),
config: const AudioServiceConfig(
androidNotificationChannelId: 'dr.blank.vaani.channel.audio',
androidNotificationChannelName: 'ABSPlayback',
androidNotificationChannelDescription:
'Needed to control audio from lock screen',
androidNotificationOngoing: false,
androidStopForegroundOnPause: false,
androidNotificationIcon: 'drawable/ic_stat_logo',
preloadArtwork: true,
// fastForwardInterval: Duration(seconds: 20),
// rewindInterval: Duration(seconds: 20),
),
);
return audioService;
}

View file

@ -1,30 +1,36 @@
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:just_audio_media_kit/just_audio_media_kit.dart';
import 'package:logging/logging.dart'; import 'package:logging/logging.dart';
import 'package:media_kit/media_kit.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:shelfsdk/audiobookshelf_api.dart'; import 'package:shelfsdk/audiobookshelf_api.dart' as api;
import 'package:vaani/api/api_provider.dart';
import 'package:vaani/api/library_item_provider.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/player/core/abs_audio_handler.dart' as core; import 'package:vaani/features/player/core/abs_audio_handler.dart' as core;
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/audiobook_player.dart';
import 'package:vaani/features/settings/app_settings_provider.dart';
import 'package:vaani/globals.dart';
import 'package:vaani/shared/extensions/chapter.dart';
part 'abs_provider.g.dart'; part 'abs_provider.g.dart';
final _logger = Logger('AbsPlayerProvider'); final _logger = Logger('AbsPlayerProvider');
@Riverpod(keepAlive: true) @Riverpod(keepAlive: true)
Future<core.AbsAudioHandler> absAudioHandler(Ref ref) async { Future<core.AbsAudioHandler> absAudioHandlerInit(Ref ref) async {
// for playing audio on windows, linux // for playing audio on windows, linux
JustAudioMediaKit.ensureInitialized(); MediaKit.ensureInitialized();
// for configuring how this app will interact with other audio apps // for configuring how this app will interact with other audio apps
final session = await AudioSession.instance; final session = await AudioSession.instance;
await session.configure(const AudioSessionConfiguration.speech()); await session.configure(const AudioSessionConfiguration.speech());
final player = ref.read(absAudioPlayerProvider);
final audioService = await AudioService.init( final audioService = await AudioService.init(
builder: () => core.AbsAudioHandler(player), builder: () => core.AbsAudioHandler(),
config: const AudioServiceConfig( config: const AudioServiceConfig(
androidNotificationChannelId: 'dr.blank.vaani.channel.audio', androidNotificationChannelId: 'dr.blank.vaani.channel.audio',
androidNotificationChannelName: 'ABSPlayback', androidNotificationChannelName: 'ABSPlayback',
@ -39,18 +45,130 @@ Future<core.AbsAudioHandler> absAudioHandler(Ref ref) async {
), ),
); );
_logger.finer('created simple player');
return audioService; return audioService;
} }
@Riverpod(keepAlive: true) @Riverpod(keepAlive: true)
class AbsAudioPlayer extends _$AbsAudioPlayer { class AbsPlayer extends _$AbsPlayer {
@override @override
core.AbsAudioPlayer build() { core.AbsAudioHandler build() {
final player = core.AbsAudioPlayer(); return ref.read(absAudioHandlerInitProvider).valueOrNull!;
}
ref.onDispose(player.dispose); }
_logger.finer('created simple player');
@Riverpod(keepAlive: true)
return player; class AbsState extends _$AbsState {
@override
core.AbsPlayerState build() {
return core.AbsPlayerState();
}
//
Future<void> load(api.BookExpanded book, Duration? currentTime) async {
final player = ref.read(absPlayerProvider);
if (state.book == book || state.book?.libraryItemId == book.libraryItemId) {
appLogger.info('Book was already set');
player.playOrPause();
return;
}
final appSettings = ref.read(appSettingsProvider);
final api = ref.read(authenticatedApiProvider);
final downloadManager = ref.read(simpleDownloadManagerProvider);
final libItem =
await ref.read(libraryItemProvider(book.libraryItemId).future);
final downloadedUris = await downloadManager.getDownloadedFilesUri(libItem);
var bookPlayerSettings =
ref.read(bookSettingsProvider(book.libraryItemId)).playerSettings;
var appPlayerSettings = ref.read(appSettingsProvider).playerSettings;
var configurePlayerForEveryBook =
appPlayerSettings.configurePlayerForEveryBook;
final trackToPlay = book.findTrackAtTime(currentTime ?? Duration.zero);
final chapterToPlay = book.findChapterAtTime(currentTime ?? Duration.zero);
final initialIndex = book.tracks.indexOf(trackToPlay);
final initialPositionInTrack =
currentTime != null ? currentTime - trackToPlay.startOffset : null;
final title = appSettings.notificationSettings.primaryTitle
.formatNotificationTitle(book);
final album = appSettings.notificationSettings.secondaryTitle
.formatNotificationTitle(book);
final id = _getUri(trackToPlay, downloadedUris,
baseUrl: api.baseUrl, token: api.token!)
.toString();
final item = MediaItem(
id: id,
title: title,
album: album,
displayTitle: title,
displaySubtitle: album,
duration: chapterToPlay.duration,
artUri: Uri.parse(
'${api.baseUrl}/api/items/${book.libraryItemId}/cover?token=${api.token!}',
),
);
state = state.copyWith(
book: book,
currentChapter: chapterToPlay,
currentIndex: initialIndex,
);
player.playMediaItem(item);
await Future.wait([
player.setMediaItem(item),
// player.setVolume(
// configurePlayerForEveryBook
// ? bookPlayerSettings.preferredDefaultVolume ??
// appPlayerSettings.preferredDefaultVolume
// : appPlayerSettings.preferredDefaultVolume,
// ),
player.setSpeed(
configurePlayerForEveryBook
? bookPlayerSettings.preferredDefaultSpeed ??
appPlayerSettings.preferredDefaultSpeed
: appPlayerSettings.preferredDefaultSpeed,
),
player.play(),
]);
// player.setSourceAudiobook(
// book,
// baseUrl: api.baseUrl,
// token: api.token!,
// initialPosition: currentTime,
// downloadedUris: downloadedUris,
// volume: configurePlayerForEveryBook
// ? bookPlayerSettings.preferredDefaultVolume ??
// appPlayerSettings.preferredDefaultVolume
// : appPlayerSettings.preferredDefaultVolume,
// speed: configurePlayerForEveryBook
// ? bookPlayerSettings.preferredDefaultSpeed ??
// appPlayerSettings.preferredDefaultSpeed
// : appPlayerSettings.preferredDefaultSpeed,
// );
}
Future<void> next() async {}
Future<void> previous() async {}
Uri _getUri(
api.AudioTrack track,
List<Uri>? downloadedUris, {
required Uri baseUrl,
required String token,
}) {
// check if the track is in the downloadedUris
final uri = downloadedUris?.firstWhereOrNull(
(element) {
return element.pathSegments.last == track.metadata?.filename;
},
);
return uri ??
Uri.parse('${baseUrl.toString()}${track.contentUrl}?token=$token');
} }
} }

View file

@ -6,38 +6,54 @@ part of 'abs_provider.dart';
// RiverpodGenerator // RiverpodGenerator
// ************************************************************************** // **************************************************************************
String _$absAudioHandlerHash() => r'f4ef20cc3e244d5d37354ef38a1e0fdbd89412f4'; String _$absAudioHandlerInitHash() =>
r'8815383b114e5e3da826afdea58bf0a884b1e3f2';
/// See also [absAudioHandler]. /// See also [absAudioHandlerInit].
@ProviderFor(absAudioHandler) @ProviderFor(absAudioHandlerInit)
final absAudioHandlerProvider = FutureProvider<core.AbsAudioHandler>.internal( final absAudioHandlerInitProvider =
absAudioHandler, FutureProvider<core.AbsAudioHandler>.internal(
name: r'absAudioHandlerProvider', absAudioHandlerInit,
name: r'absAudioHandlerInitProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null ? null
: _$absAudioHandlerHash, : _$absAudioHandlerInitHash,
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 AbsAudioHandlerRef = FutureProviderRef<core.AbsAudioHandler>; typedef AbsAudioHandlerInitRef = FutureProviderRef<core.AbsAudioHandler>;
String _$absAudioPlayerHash() => r'68a56d45a9f165d257c23f81d9bf7d0930425464'; String _$absPlayerHash() => r'c313a2456bb221b83f3cd2142ae63d6463ef304b';
/// See also [AbsAudioPlayer]. /// See also [AbsPlayer].
@ProviderFor(AbsAudioPlayer) @ProviderFor(AbsPlayer)
final absAudioPlayerProvider = final absPlayerProvider =
NotifierProvider<AbsAudioPlayer, core.AbsAudioPlayer>.internal( NotifierProvider<AbsPlayer, core.AbsAudioHandler>.internal(
AbsAudioPlayer.new, AbsPlayer.new,
name: r'absAudioPlayerProvider', name: r'absPlayerProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') debugGetCreateSourceHash:
? null const bool.fromEnvironment('dart.vm.product') ? null : _$absPlayerHash,
: _$absAudioPlayerHash,
dependencies: null, dependencies: null,
allTransitiveDependencies: null, allTransitiveDependencies: null,
); );
typedef _$AbsAudioPlayer = Notifier<core.AbsAudioPlayer>; typedef _$AbsPlayer = Notifier<core.AbsAudioHandler>;
String _$absStateHash() => r'fb11d9d970e0de2dfd722c1f0de2a3b9b10f2859';
/// See also [AbsState].
@ProviderFor(AbsState)
final absStateProvider =
NotifierProvider<AbsState, core.AbsPlayerState>.internal(
AbsState.new,
name: r'absStateProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product') ? null : _$absStateHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$AbsState = Notifier<core.AbsPlayerState>;
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package // ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

View file

@ -1,6 +1,6 @@
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:just_audio_media_kit/just_audio_media_kit.dart'; // import 'package:just_audio_media_kit/just_audio_media_kit.dart';
import 'package:riverpod/riverpod.dart'; import 'package:riverpod/riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:vaani/features/player/core/audiobook_player.dart'; import 'package:vaani/features/player/core/audiobook_player.dart';
@ -10,7 +10,7 @@ part 'audiobook_player.g.dart';
@Riverpod(keepAlive: true) @Riverpod(keepAlive: true)
Future<AbsAudioHandler> audioHandlerInit(Ref ref) async { Future<AbsAudioHandler> audioHandlerInit(Ref ref) async {
// for playing audio on windows, linux // for playing audio on windows, linux
JustAudioMediaKit.ensureInitialized(); // JustAudioMediaKit.ensureInitialized();
// for configuring how this app will interact with other audio apps // for configuring how this app will interact with other audio apps
final session = await AudioSession.instance; final session = await AudioSession.instance;

View file

@ -6,7 +6,7 @@ part of 'audiobook_player.dart';
// RiverpodGenerator // RiverpodGenerator
// ************************************************************************** // **************************************************************************
String _$audioHandlerInitHash() => r'f4907b614d5698c1c8fe8e999edd5fde46bc29f2'; String _$audioHandlerInitHash() => r'80f9912c0a93b4bbfe7da3967966065e78f2f6c2';
/// See also [audioHandlerInit]. /// See also [audioHandlerInit].
@ProviderFor(audioHandlerInit) @ProviderFor(audioHandlerInit)

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

@ -8,7 +8,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:vaani/api/server_provider.dart'; import 'package:vaani/api/server_provider.dart';
import 'package:vaani/db/storage.dart'; import 'package:vaani/db/storage.dart';
import 'package:vaani/features/logging/core/logger.dart'; import 'package:vaani/features/logging/core/logger.dart';
import 'package:vaani/features/player/providers/audiobook_player.dart'; import 'package:vaani/features/player/providers/abs_provider.dart';
import 'package:vaani/features/player/providers/currently_playing_provider.dart'; import 'package:vaani/features/player/providers/currently_playing_provider.dart';
import 'package:vaani/features/settings/api_settings_provider.dart'; import 'package:vaani/features/settings/api_settings_provider.dart';
import 'package:vaani/features/settings/app_settings_provider.dart'; import 'package:vaani/features/settings/app_settings_provider.dart';
@ -38,7 +38,8 @@ void main() async {
// initialize audio player // initialize audio player
// await configurePlayer(); // await configurePlayer();
await container.read(audioHandlerInitProvider.future); // await container.read(audioHandlerInitProvider.future);
await container.read(absAudioHandlerInitProvider.future);
// run the app // run the app
runApp( runApp(
UncontrolledProviderScope( UncontrolledProviderScope(

View file

@ -11,6 +11,7 @@ import 'package:vaani/api/image_provider.dart';
import 'package:vaani/api/library_item_provider.dart' show libraryItemProvider; import 'package:vaani/api/library_item_provider.dart' show libraryItemProvider;
import 'package:vaani/constants/hero_tag_conventions.dart'; import 'package:vaani/constants/hero_tag_conventions.dart';
import 'package:vaani/features/item_viewer/view/library_item_actions.dart'; import 'package:vaani/features/item_viewer/view/library_item_actions.dart';
import 'package:vaani/features/player/providers/abs_provider.dart';
import 'package:vaani/features/player/providers/currently_playing_provider.dart'; import 'package:vaani/features/player/providers/currently_playing_provider.dart';
import 'package:vaani/features/player/providers/player_status_provider.dart'; import 'package:vaani/features/player/providers/player_status_provider.dart';
import 'package:vaani/features/player/providers/audiobook_player.dart'; import 'package:vaani/features/player/providers/audiobook_player.dart';
@ -295,7 +296,11 @@ class _BookOnShelfPlayButton extends HookConsumerWidget {
final book = final book =
await ref.watch(libraryItemProvider(libraryItemId).future); await ref.watch(libraryItemProvider(libraryItemId).future);
ref.read(currentBookProvider.notifier).update( // ref.read(currentBookProvider.notifier).update(
// book.media.asBookExpanded,
// userProgress?.currentTime,
// );
ref.read(absStateProvider.notifier).load(
book.media.asBookExpanded, book.media.asBookExpanded,
userProgress?.currentTime, userProgress?.currentTime,
); );

View file

@ -12,6 +12,7 @@ import dynamic_color
import file_picker import file_picker
import isar_flutter_libs import isar_flutter_libs
import just_audio import just_audio
import media_kit_libs_macos_audio
import package_info_plus import package_info_plus
import path_provider_foundation import path_provider_foundation
import screen_retriever_macos import screen_retriever_macos
@ -29,6 +30,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin"))
IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin")) IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
MediaKitLibsMacosAudioPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosAudioPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin")) ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin"))

View file

@ -95,7 +95,7 @@ packages:
source: hosted source: hosted
version: "0.1.4" version: "0.1.4"
audio_session: audio_session:
dependency: "direct main" dependency: transitive
description: description:
name: audio_session name: audio_session
sha256: "2b7fff16a552486d078bfc09a8cde19f426dc6d6329262b684182597bec5b1ac" sha256: "2b7fff16a552486d078bfc09a8cde19f426dc6d6329262b684182597bec5b1ac"
@ -786,14 +786,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.10.5" version: "0.10.5"
just_audio_media_kit:
dependency: "direct main"
description:
name: just_audio_media_kit
sha256: f3cf04c3a50339709e87e90b4e841eef4364ab4be2bdbac0c54cc48679f84d23
url: "https://pub.dev"
source: hosted
version: "2.1.0"
just_audio_platform_interface: just_audio_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -907,23 +899,55 @@ packages:
source: hosted source: hosted
version: "0.11.1" version: "0.11.1"
media_kit: media_kit:
dependency: transitive dependency: "direct main"
description: description:
name: media_kit name: media_kit
sha256: dfd5ab85d49a1806b1314a0b81f3d14da48f0db0a657336b2d77c5f17db28944 sha256: "2a207ea7baf1a2ea2ff2016d512e572ca6fc02a937769effb5c27b4d682b4a53"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.2" version: "1.2.3"
media_kit_libs_linux: media_kit_libs_android_audio:
dependency: transitive
description:
name: media_kit_libs_android_audio
sha256: "8f8f9759e537e12d66f08bc4d5279eb1bb21a0ccc519ff3442c68a9f3b6dd68b"
url: "https://pub.dev"
source: hosted
version: "1.3.8"
media_kit_libs_audio:
dependency: "direct main" dependency: "direct main"
description:
name: media_kit_libs_audio
sha256: "81bf506c234e81e3ec536ba72f8f700a928543c14c345220210cae0411636316"
url: "https://pub.dev"
source: hosted
version: "1.0.7"
media_kit_libs_ios_audio:
dependency: transitive
description:
name: media_kit_libs_ios_audio
sha256: "78ccf04e27d6b4ba00a355578ccb39b772f00d48269a6ac3db076edf2d51934f"
url: "https://pub.dev"
source: hosted
version: "1.1.4"
media_kit_libs_linux:
dependency: transitive
description: description:
name: media_kit_libs_linux name: media_kit_libs_linux
sha256: "2b473399a49ec94452c4d4ae51cfc0f6585074398d74216092bf3d54aac37ecf" sha256: "2b473399a49ec94452c4d4ae51cfc0f6585074398d74216092bf3d54aac37ecf"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.1" version: "1.2.1"
media_kit_libs_macos_audio:
dependency: transitive
description:
name: media_kit_libs_macos_audio
sha256: "3be21844df98f286de32808592835073cdef2c1a10078bac135da790badca950"
url: "https://pub.dev"
source: hosted
version: "1.1.4"
media_kit_libs_windows_audio: media_kit_libs_windows_audio:
dependency: "direct main" dependency: transitive
description: description:
name: media_kit_libs_windows_audio name: media_kit_libs_windows_audio
sha256: c2fd558cc87b9d89a801141fcdffe02e338a3b21a41a18fbd63d5b221a1b8e53 sha256: c2fd558cc87b9d89a801141fcdffe02e338a3b21a41a18fbd63d5b221a1b8e53

View file

@ -34,8 +34,6 @@ dependencies:
animated_list_plus: ^0.5.2 animated_list_plus: ^0.5.2
animated_theme_switcher: ^2.0.10 animated_theme_switcher: ^2.0.10
archive: ^4.0.5 archive: ^4.0.5
audio_service: ^0.18.15
audio_session: ^0.1.23
audio_video_progress_bar: ^2.0.2 audio_video_progress_bar: ^2.0.2
auto_scroll_text: ^0.0.7 auto_scroll_text: ^0.0.7
background_downloader: ^9.2.0 background_downloader: ^9.2.0
@ -72,9 +70,14 @@ dependencies:
# ref: media-notification-config # ref: media-notification-config
# path: just_audio_background # path: just_audio_background
# just_audio_windows: ^0.2.2 # just_audio_windows: ^0.2.2
just_audio_media_kit: ^2.0.4 # just_audio_media_kit: ^2.0.4
media_kit_libs_linux: any # media_kit_libs_linux: any
media_kit_libs_windows_audio: any # media_kit_libs_windows_audio: any
audio_service: ^0.18.15
# audio_session: ^0.1.23
media_kit: ^1.2.3 # Primary package.
media_kit_libs_audio: any # Native audio dependencies.
list_wheel_scroll_view_nls: ^0.0.3 list_wheel_scroll_view_nls: ^0.0.3
logging: ^1.2.0 logging: ^1.2.0
logging_appenders: ^1.3.1 logging_appenders: ^1.3.1