Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add player settings page and enhance settings UI #33

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading