mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-20 18:09:30 +00:00
feat: add player settings page and enhance settings UI (#33)
This commit is contained in:
parent
8049a660e6
commit
150e5c9025
12 changed files with 761 additions and 157 deletions
|
|
@ -166,7 +166,8 @@ class PlaybackReporter {
|
|||
return _session!;
|
||||
}
|
||||
if (player.book == null) {
|
||||
throw NoAudiobookPlayingError();
|
||||
_logger.warning('No audiobook playing to start session');
|
||||
return null;
|
||||
}
|
||||
_session = await authenticatedApi.items.play(
|
||||
libraryItemId: player.book!.libraryItemId,
|
||||
|
|
@ -204,8 +205,11 @@ class PlaybackReporter {
|
|||
}
|
||||
try {
|
||||
_session ??= await startSession();
|
||||
} on NoAudiobookPlayingError {
|
||||
_logger.warning('No audiobook playing to sync position');
|
||||
} on Error catch (e) {
|
||||
_logger.warning('Error starting session: $e');
|
||||
}
|
||||
if (_session == null) {
|
||||
_logger.warning('No session to sync position');
|
||||
return;
|
||||
}
|
||||
final currentPosition = player.positionInBook;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue