Skip to content

Commit

Permalink
feat: add player settings page and enhance settings UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Blank committed Sep 26, 2024
1 parent 8049a66 commit ca0a638
Show file tree
Hide file tree
Showing 12 changed files with 761 additions and 157 deletions.
10 changes: 7 additions & 3 deletions lib/features/playback_reporting/core/playback_reporter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit ca0a638

Please sign in to comment.