mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-07-06 01:11:45 +00:00
部分优化
This commit is contained in:
parent
f9a49f4473
commit
6b1edcb475
11 changed files with 876 additions and 1058 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:flutter/material.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';
|
||||||
|
|
@ -46,6 +47,7 @@ class LibraryItem extends _$LibraryItem {
|
||||||
// ! this is a mock delay
|
// ! this is a mock delay
|
||||||
// await Future.delayed(const Duration(seconds: 3));
|
// await Future.delayed(const Duration(seconds: 3));
|
||||||
|
|
||||||
|
try {
|
||||||
final item = await api.items.get(
|
final item = await api.items.get(
|
||||||
libraryItemId: id,
|
libraryItemId: id,
|
||||||
parameters: const shelfsdk.GetItemReqParams(
|
parameters: const shelfsdk.GetItemReqParams(
|
||||||
|
|
@ -69,41 +71,10 @@ class LibraryItem extends _$LibraryItem {
|
||||||
_logger.fine('writing to cache: $newFile');
|
_logger.fine('writing to cache: $newFile');
|
||||||
yield item.asExpanded;
|
yield item.asExpanded;
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
debugPrintStack(stackTrace: StackTrace.current, label: e.toString());
|
||||||
|
appLogger.severe('未查询到数据');
|
||||||
|
appLogger.severe(e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
|
||||||
Future<shelfsdk.PlaybackSessionExpanded?> playBackSession(
|
|
||||||
Ref ref,
|
|
||||||
String libraryItemId,
|
|
||||||
) async {
|
|
||||||
final api = ref.watch(authenticatedApiProvider);
|
|
||||||
final playBack = await api.items.play(
|
|
||||||
libraryItemId: libraryItemId,
|
|
||||||
parameters: shelfsdk.PlayItemReqParams(
|
|
||||||
deviceInfo: shelfsdk.DeviceInfoReqParams(
|
|
||||||
clientVersion: appVersion,
|
|
||||||
manufacturer: deviceManufacturer,
|
|
||||||
model: deviceModel,
|
|
||||||
sdkVersion: deviceSdkVersion,
|
|
||||||
clientName: appName,
|
|
||||||
deviceName: deviceName,
|
|
||||||
),
|
|
||||||
forceDirectPlay: false,
|
|
||||||
forceTranscode: false,
|
|
||||||
supportedMimeTypes: [
|
|
||||||
"audio/flac",
|
|
||||||
"audio/mpeg",
|
|
||||||
"audio/mp4",
|
|
||||||
"audio/ogg",
|
|
||||||
"audio/aac",
|
|
||||||
"audio/webm",
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (playBack == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return playBack.asExpanded;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ part of 'library_item_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$playBackSessionHash() => r'1bc00653e0041e839d8569192b6bc90d96b4ca4f';
|
String _$libraryItemHash() => r'bdb40fe8506f3b8f78cb47c4af827899f79617b7';
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
/// Copied from Dart SDK
|
||||||
class _SystemHash {
|
class _SystemHash {
|
||||||
|
|
@ -29,144 +29,6 @@ class _SystemHash {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// See also [playBackSession].
|
|
||||||
@ProviderFor(playBackSession)
|
|
||||||
const playBackSessionProvider = PlayBackSessionFamily();
|
|
||||||
|
|
||||||
/// See also [playBackSession].
|
|
||||||
class PlayBackSessionFamily
|
|
||||||
extends Family<AsyncValue<shelfsdk.PlaybackSessionExpanded?>> {
|
|
||||||
/// See also [playBackSession].
|
|
||||||
const PlayBackSessionFamily();
|
|
||||||
|
|
||||||
/// See also [playBackSession].
|
|
||||||
PlayBackSessionProvider call(
|
|
||||||
String libraryItemId,
|
|
||||||
) {
|
|
||||||
return PlayBackSessionProvider(
|
|
||||||
libraryItemId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
PlayBackSessionProvider getProviderOverride(
|
|
||||||
covariant PlayBackSessionProvider 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'playBackSessionProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [playBackSession].
|
|
||||||
class PlayBackSessionProvider
|
|
||||||
extends AutoDisposeFutureProvider<shelfsdk.PlaybackSessionExpanded?> {
|
|
||||||
/// See also [playBackSession].
|
|
||||||
PlayBackSessionProvider(
|
|
||||||
String libraryItemId,
|
|
||||||
) : this._internal(
|
|
||||||
(ref) => playBackSession(
|
|
||||||
ref as PlayBackSessionRef,
|
|
||||||
libraryItemId,
|
|
||||||
),
|
|
||||||
from: playBackSessionProvider,
|
|
||||||
name: r'playBackSessionProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$playBackSessionHash,
|
|
||||||
dependencies: PlayBackSessionFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
PlayBackSessionFamily._allTransitiveDependencies,
|
|
||||||
libraryItemId: libraryItemId,
|
|
||||||
);
|
|
||||||
|
|
||||||
PlayBackSessionProvider._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(
|
|
||||||
FutureOr<shelfsdk.PlaybackSessionExpanded?> Function(
|
|
||||||
PlayBackSessionRef provider)
|
|
||||||
create,
|
|
||||||
) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: PlayBackSessionProvider._internal(
|
|
||||||
(ref) => create(ref as PlayBackSessionRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
libraryItemId: libraryItemId,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeFutureProviderElement<shelfsdk.PlaybackSessionExpanded?>
|
|
||||||
createElement() {
|
|
||||||
return _PlayBackSessionProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return other is PlayBackSessionProvider &&
|
|
||||||
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 PlayBackSessionRef
|
|
||||||
on AutoDisposeFutureProviderRef<shelfsdk.PlaybackSessionExpanded?> {
|
|
||||||
/// The parameter `libraryItemId` of this provider.
|
|
||||||
String get libraryItemId;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _PlayBackSessionProviderElement
|
|
||||||
extends AutoDisposeFutureProviderElement<shelfsdk.PlaybackSessionExpanded?>
|
|
||||||
with PlayBackSessionRef {
|
|
||||||
_PlayBackSessionProviderElement(super.provider);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String get libraryItemId => (origin as PlayBackSessionProvider).libraryItemId;
|
|
||||||
}
|
|
||||||
|
|
||||||
String _$libraryItemHash() => r'8032b2d3ca6a8a2a6217cd32f11cd4b35919f49e';
|
|
||||||
|
|
||||||
abstract class _$LibraryItem
|
abstract class _$LibraryItem
|
||||||
extends BuildlessStreamNotifier<shelfsdk.LibraryItemExpanded> {
|
extends BuildlessStreamNotifier<shelfsdk.LibraryItemExpanded> {
|
||||||
late final String id;
|
late final String id;
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,14 @@ class PlaybackReporter {
|
||||||
deviceInfo: await _getDeviceInfo(),
|
deviceInfo: await _getDeviceInfo(),
|
||||||
forceDirectPlay: false,
|
forceDirectPlay: false,
|
||||||
forceTranscode: false,
|
forceTranscode: false,
|
||||||
|
supportedMimeTypes: [
|
||||||
|
"audio/flac",
|
||||||
|
"audio/mpeg",
|
||||||
|
"audio/mp4",
|
||||||
|
"audio/ogg",
|
||||||
|
"audio/aac",
|
||||||
|
"audio/webm",
|
||||||
|
],
|
||||||
),
|
),
|
||||||
responseErrorHandler: _responseErrorHandler,
|
responseErrorHandler: _responseErrorHandler,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:just_audio/just_audio.dart';
|
import 'package:just_audio/just_audio.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:rxdart/rxdart.dart';
|
import 'package:rxdart/rxdart.dart';
|
||||||
import 'package:shelfsdk/audiobookshelf_api.dart';
|
import 'package:shelfsdk/audiobookshelf_api.dart' hide NotificationSettings;
|
||||||
import 'package:vaani/features/player/core/player_status.dart' as core;
|
import 'package:vaani/features/player/core/player_status.dart' as core;
|
||||||
import 'package:vaani/features/player/providers/player_status_provider.dart';
|
import 'package:vaani/features/player/providers/player_status_provider.dart';
|
||||||
import 'package:vaani/features/settings/app_settings_provider.dart';
|
import 'package:vaani/features/settings/app_settings_provider.dart';
|
||||||
|
|
@ -23,18 +23,20 @@ final _logger = Logger('AudiobookPlayer');
|
||||||
|
|
||||||
class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
|
class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||||
final AudioPlayer _player = AudioPlayer();
|
final AudioPlayer _player = AudioPlayer();
|
||||||
// final List<AudioSource> _playlist = [];
|
|
||||||
final Ref ref;
|
final Ref ref;
|
||||||
|
|
||||||
BookExpanded? _book;
|
BookExpanded? _book;
|
||||||
BookExpanded? get book => _book;
|
BookExpanded? get book => _book;
|
||||||
|
|
||||||
|
late NotificationSettings notificationSettings;
|
||||||
|
|
||||||
final _currentChapterObject = BehaviorSubject<BookChapter?>.seeded(null);
|
final _currentChapterObject = BehaviorSubject<BookChapter?>.seeded(null);
|
||||||
AbsAudioHandler(this.ref) {
|
AbsAudioHandler(this.ref) {
|
||||||
_setupAudioPlayer();
|
ref.listen(appSettingsProvider, (a, b) {
|
||||||
|
if (a?.notificationSettings != b.notificationSettings) {
|
||||||
|
notificationSettings = b.notificationSettings;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
void _setupAudioPlayer() {
|
|
||||||
final statusNotifier = ref.read(playerStatusProvider.notifier);
|
final statusNotifier = ref.read(playerStatusProvider.notifier);
|
||||||
|
|
||||||
// 转发播放状态
|
// 转发播放状态
|
||||||
|
|
@ -49,6 +51,14 @@ class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||||
_player.positionStream.distinct().listen((position) {
|
_player.positionStream.distinct().listen((position) {
|
||||||
final chapter = _book?.findChapterAtTime(positionInBook);
|
final chapter = _book?.findChapterAtTime(positionInBook);
|
||||||
if (chapter != currentChapter) {
|
if (chapter != currentChapter) {
|
||||||
|
if (mediaItem.hasValue && chapter != null) {
|
||||||
|
updateMediaItem(
|
||||||
|
mediaItem.value!.copyWith(
|
||||||
|
duration: chapter.duration,
|
||||||
|
displayTitle: chapter.title,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
_currentChapterObject.sink.add(chapter);
|
_currentChapterObject.sink.add(chapter);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -75,6 +85,18 @@ class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||||
}
|
}
|
||||||
_book = book;
|
_book = book;
|
||||||
|
|
||||||
|
final trackToPlay = book.findTrackAtTime(initialPosition ?? Duration.zero);
|
||||||
|
final trackToChapter =
|
||||||
|
book.findChapterAtTime(initialPosition ?? Duration.zero);
|
||||||
|
final initialIndex = book.tracks.indexOf(trackToPlay);
|
||||||
|
final initialPositionInTrack = initialPosition != null
|
||||||
|
? initialPosition - trackToPlay.startOffset
|
||||||
|
: null;
|
||||||
|
final title = appSettings.notificationSettings.primaryTitle
|
||||||
|
.formatNotificationTitle(book);
|
||||||
|
final album = appSettings.notificationSettings.secondaryTitle
|
||||||
|
.formatNotificationTitle(book);
|
||||||
|
|
||||||
// 添加所有音轨
|
// 添加所有音轨
|
||||||
List<AudioSource> audioSources = book.tracks
|
List<AudioSource> audioSources = book.tracks
|
||||||
.map(
|
.map(
|
||||||
|
|
@ -84,28 +106,18 @@ class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
final title = appSettings.notificationSettings.primaryTitle
|
final item = MediaItem(
|
||||||
.formatNotificationTitle(book);
|
|
||||||
final album = appSettings.notificationSettings.secondaryTitle
|
|
||||||
.formatNotificationTitle(book);
|
|
||||||
playMediaItem(
|
|
||||||
MediaItem(
|
|
||||||
id: book.libraryItemId,
|
id: book.libraryItemId,
|
||||||
title: title,
|
title: title,
|
||||||
album: album,
|
album: album,
|
||||||
displayTitle: title,
|
displayTitle: title,
|
||||||
displaySubtitle: album,
|
displaySubtitle: album,
|
||||||
duration: book.duration,
|
duration: trackToChapter.duration,
|
||||||
artUri: Uri.parse(
|
artUri: Uri.parse(
|
||||||
'$baseUrl/api/items/${book.libraryItemId}/cover?token=$token',
|
'$baseUrl/api/items/${book.libraryItemId}/cover?token=$token',
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
final trackToPlay = book.findTrackAtTime(initialPosition ?? Duration.zero);
|
addQueueItem(item);
|
||||||
final initialIndex = book.tracks.indexOf(trackToPlay);
|
|
||||||
final initialPositionInTrack = initialPosition != null
|
|
||||||
? initialPosition - trackToPlay.startOffset
|
|
||||||
: null;
|
|
||||||
await _player
|
await _player
|
||||||
.setAudioSources(
|
.setAudioSources(
|
||||||
audioSources,
|
audioSources,
|
||||||
|
|
@ -311,21 +323,35 @@ class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||||
PlaybackState _transformEvent(PlaybackEvent event) {
|
PlaybackState _transformEvent(PlaybackEvent event) {
|
||||||
return PlaybackState(
|
return PlaybackState(
|
||||||
controls: [
|
controls: [
|
||||||
if (kIsWeb || !Platform.isAndroid) MediaControl.skipToPrevious,
|
if ((kIsWeb || !Platform.isAndroid) &&
|
||||||
|
notificationSettings.mediaControls
|
||||||
|
.contains(NotificationMediaControl.skipToPreviousChapter))
|
||||||
|
MediaControl.skipToPrevious,
|
||||||
|
if (notificationSettings.mediaControls
|
||||||
|
.contains(NotificationMediaControl.rewind))
|
||||||
MediaControl.rewind,
|
MediaControl.rewind,
|
||||||
if (_player.playing) MediaControl.pause else MediaControl.play,
|
if (_player.playing) MediaControl.pause else MediaControl.play,
|
||||||
MediaControl.stop,
|
if (notificationSettings.mediaControls
|
||||||
|
.contains(NotificationMediaControl.fastForward))
|
||||||
MediaControl.fastForward,
|
MediaControl.fastForward,
|
||||||
if (kIsWeb || !Platform.isAndroid) MediaControl.skipToNext,
|
if ((kIsWeb || !Platform.isAndroid) &&
|
||||||
|
notificationSettings.mediaControls
|
||||||
|
.contains(NotificationMediaControl.skipToNextChapter))
|
||||||
|
MediaControl.skipToNext,
|
||||||
|
if (notificationSettings.mediaControls
|
||||||
|
.contains(NotificationMediaControl.stop))
|
||||||
|
MediaControl.stop,
|
||||||
],
|
],
|
||||||
systemActions: {
|
systemActions: {
|
||||||
if (kIsWeb || !Platform.isAndroid) MediaAction.skipToPrevious,
|
// if (kIsWeb || !Platform.isAndroid) MediaAction.skipToPrevious,
|
||||||
MediaAction.rewind,
|
// MediaAction.rewind,
|
||||||
MediaAction.seek,
|
MediaAction.seek,
|
||||||
MediaAction.fastForward,
|
MediaAction.seekForward,
|
||||||
MediaAction.stop,
|
MediaAction.seekBackward,
|
||||||
MediaAction.setSpeed,
|
// MediaAction.fastForward,
|
||||||
if (kIsWeb || !Platform.isAndroid) MediaAction.skipToNext,
|
// MediaAction.stop,
|
||||||
|
// MediaAction.setSpeed,
|
||||||
|
// if (kIsWeb || !Platform.isAndroid) MediaAction.skipToNext,
|
||||||
},
|
},
|
||||||
androidCompactActionIndices: const [1, 2, 3],
|
androidCompactActionIndices: const [1, 2, 3],
|
||||||
processingState: const {
|
processingState: const {
|
||||||
|
|
@ -337,8 +363,8 @@ class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||||
}[_player.processingState] ??
|
}[_player.processingState] ??
|
||||||
AudioProcessingState.idle,
|
AudioProcessingState.idle,
|
||||||
playing: _player.playing,
|
playing: _player.playing,
|
||||||
updatePosition: _player.position,
|
updatePosition: positionInChapter,
|
||||||
bufferedPosition: event.bufferedPosition,
|
bufferedPosition: _player.bufferedPosition,
|
||||||
speed: _player.speed,
|
speed: _player.speed,
|
||||||
queueIndex: event.currentIndex,
|
queueIndex: event.currentIndex,
|
||||||
captioningEnabled: false,
|
captioningEnabled: false,
|
||||||
|
|
|
||||||
|
|
@ -1,20 +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: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';
|
||||||
import 'package:vaani/shared/utils/helper.dart';
|
|
||||||
|
|
||||||
part 'audiobook_player.g.dart';
|
part 'audiobook_player.g.dart';
|
||||||
|
|
||||||
@Riverpod(keepAlive: true)
|
@Riverpod(keepAlive: true)
|
||||||
Future<AbsAudioHandler> audioHandlerInit(Ref ref) async {
|
Future<AbsAudioHandler> audioHandlerInit(Ref ref) async {
|
||||||
if (Helper.isWindows() || Helper.isLinux()) {
|
// for playing audio on windows, linux
|
||||||
// JustAudioMediaKit.ensureInitialized(windows: false);
|
|
||||||
JustAudioMediaKit.ensureInitialized();
|
JustAudioMediaKit.ensureInitialized();
|
||||||
}
|
|
||||||
|
|
||||||
final audioService = await AudioService.init(
|
// for configuring how this app will interact with other audio apps
|
||||||
|
final session = await AudioSession.instance;
|
||||||
|
await session.configure(const AudioSessionConfiguration.speech());
|
||||||
|
|
||||||
|
final audioService = AudioService.init(
|
||||||
builder: () => AbsAudioHandler(ref),
|
builder: () => AbsAudioHandler(ref),
|
||||||
config: const AudioServiceConfig(
|
config: const AudioServiceConfig(
|
||||||
androidNotificationChannelId: 'dr.blank.vaani.channel.audio',
|
androidNotificationChannelId: 'dr.blank.vaani.channel.audio',
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ part of 'audiobook_player.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$audioHandlerInitHash() => r'6e4662a45c1c6e84aa16436f71ffcfecc3d4bdab';
|
String _$audioHandlerInitHash() => r'13b9d56c8dfde3a40736432ea069c899ef35ae75';
|
||||||
|
|
||||||
/// See also [audioHandlerInit].
|
/// See also [audioHandlerInit].
|
||||||
@ProviderFor(audioHandlerInit)
|
@ProviderFor(audioHandlerInit)
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,12 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:vaani/features/downloads/providers/download_manager.dart';
|
import 'package:vaani/features/downloads/providers/download_manager.dart';
|
||||||
import 'package:vaani/features/playback_reporting/providers/playback_reporter_provider.dart';
|
import 'package:vaani/features/playback_reporting/providers/playback_reporter_provider.dart';
|
||||||
import 'package:vaani/features/skip_start_end/providers/skip_start_end_provider.dart';
|
|
||||||
import 'package:vaani/features/shake_detector/shake_detector_provider.dart';
|
import 'package:vaani/features/shake_detector/shake_detector_provider.dart';
|
||||||
|
import 'package:vaani/features/skip_start_end/providers/skip_start_end_provider.dart';
|
||||||
import 'package:vaani/features/sleep_timer/providers/sleep_timer_provider.dart';
|
import 'package:vaani/features/sleep_timer/providers/sleep_timer_provider.dart';
|
||||||
import 'package:vaani/globals.dart';
|
import 'package:vaani/globals.dart';
|
||||||
import 'package:vaani/shared/utils/helper.dart';
|
import 'package:vaani/shared/utils/helper.dart';
|
||||||
|
import 'package:vaani/shared/widgets/tray_manager.dart';
|
||||||
|
|
||||||
class Framework extends ConsumerWidget {
|
class Framework extends ConsumerWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|
@ -26,6 +27,7 @@ class Framework extends ConsumerWidget {
|
||||||
debugPrintStack(stackTrace: StackTrace.current, label: e.toString());
|
debugPrintStack(stackTrace: StackTrace.current, label: e.toString());
|
||||||
appLogger.severe(e.toString());
|
appLogger.severe(e.toString());
|
||||||
}
|
}
|
||||||
|
if (Helper.isDesktop()) return TrayManager(child);
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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(
|
||||||
|
|
|
||||||
|
|
@ -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版本"),
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,6 @@ import 'package:vaani/framework.dart';
|
||||||
import 'package:vaani/generated/l10n.dart';
|
import 'package:vaani/generated/l10n.dart';
|
||||||
import 'package:vaani/globals.dart';
|
import 'package:vaani/globals.dart';
|
||||||
import 'package:vaani/router/router.dart';
|
import 'package:vaani/router/router.dart';
|
||||||
import 'package:vaani/shared/utils/helper.dart';
|
|
||||||
import 'package:vaani/shared/widgets/tray_manager.dart';
|
|
||||||
import 'package:vaani/theme/providers/system_theme_provider.dart';
|
import 'package:vaani/theme/providers/system_theme_provider.dart';
|
||||||
import 'package:vaani/theme/providers/theme_from_cover_provider.dart';
|
import 'package:vaani/theme/providers/theme_from_cover_provider.dart';
|
||||||
import 'package:vaani/theme/theme.dart';
|
import 'package:vaani/theme/theme.dart';
|
||||||
|
|
@ -45,9 +43,7 @@ void main() async {
|
||||||
runApp(
|
runApp(
|
||||||
UncontrolledProviderScope(
|
UncontrolledProviderScope(
|
||||||
container: container,
|
container: container,
|
||||||
child: Helper.isDesktop()
|
child: Framework(AbsApp()),
|
||||||
? Framework(TrayManager(AbsApp()))
|
|
||||||
: Framework(AbsApp()),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:vaani/features/you/view/server_manager.dart';
|
import 'package:vaani/features/you/view/server_manager.dart';
|
||||||
import 'package:vaani/router/router.dart';
|
import 'package:vaani/router/router.dart';
|
||||||
|
|
@ -26,7 +27,8 @@ class MyDrawer extends StatelessWidget {
|
||||||
title: const Text('server Settings'),
|
title: const Text('server Settings'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).push(
|
Navigator.of(context).push(
|
||||||
MaterialPageRoute(
|
platformPageRoute(
|
||||||
|
context: context,
|
||||||
builder: (context) => const ServerManagerPage(),
|
builder: (context) => const ServerManagerPage(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue