chore: pre-commit ci hook, dart format

This commit is contained in:
edde746
2026-04-18 12:40:35 +02:00
parent 2bd9e6655f
commit 3da51f9d64
128 changed files with 2056 additions and 2048 deletions
+19 -19
View File
@@ -356,10 +356,9 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
_state = _state.copyWith(completed: true);
completedController.add(true);
} else if (reason == 'error') {
errorController.add(PlayerError(
data?['message'] as String? ?? 'Playback error',
cause: data?['cause'] as String?,
));
errorController.add(
PlayerError(data?['message'] as String? ?? 'Playback error', cause: data?['cause'] as String?),
);
}
break;
@@ -440,7 +439,11 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
}
}
return (tracks: Tracks(audio: audioTracks, subtitle: subtitleTracks), selectedAudioId: selectedAudioId, selectedSubtitleId: selectedSubtitleId);
return (
tracks: Tracks(audio: audioTracks, subtitle: subtitleTracks),
selectedAudioId: selectedAudioId,
selectedSubtitleId: selectedSubtitleId,
);
}
/// Update the selected audio track.
@@ -591,11 +594,9 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
}
} catch (e) {
// Font configuration is not critical - continue without it
logController.add(PlayerLog(
prefix: 'fonts',
level: PlayerLogLevel.warn,
text: 'Failed to configure subtitle fonts: $e',
));
logController.add(
PlayerLog(prefix: 'fonts', level: PlayerLogLevel.warn, text: 'Failed to configure subtitle fonts: $e'),
);
}
}
@@ -609,15 +610,14 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
/// without needing a real misbehaving server.
void debugSimulateServer500() {
if (_disposed) return;
logController.add(const PlayerLog(
level: PlayerLogLevel.warn,
prefix: 'ffmpeg',
text: 'https: HTTP error 500 Internal Server Error',
));
errorController.add(const PlayerError(
'HTTP 500',
cause: PlayerError.serverHttp500,
));
logController.add(
const PlayerLog(
level: PlayerLogLevel.warn,
prefix: 'ffmpeg',
text: 'https: HTTP error 500 Internal Server Error',
),
);
errorController.add(const PlayerError('HTTP 500', cause: PlayerError.serverHttp500));
}
// ============================================