refactor: fix variable naming, indentation, remove debug log

This commit is contained in:
edde746
2026-04-06 04:12:33 +02:00
parent 93496849ec
commit 29ab2ddad3
2 changed files with 7 additions and 8 deletions
+2 -3
View File
@@ -1127,9 +1127,8 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
final watchFromStart = await _showWatchFromStartDialog(effectiveStart, nowEpoch);
if (!mounted) return;
if (watchFromStart == true) {
final _programBeginsAtOffset = _programBeginsAt! - _captureBuffer!.startedAt.round();
appLogger.d('Watch from start: _programBeginsAtOffset=${_programBeginsAtOffset}, _captureBuffer!.seekStartSeconds.round()=${_captureBuffer!.seekStartSeconds.round()}');
offsetSeconds = max(_programBeginsAtOffset, _captureBuffer!.seekStartSeconds.round());
final programBeginsAtOffset = _programBeginsAt! - _captureBuffer!.startedAt.round();
offsetSeconds = max(programBeginsAtOffset, _captureBuffer!.seekStartSeconds.round());
}
}
}
+5 -5
View File
@@ -2656,11 +2656,11 @@ class PlexClient {
final firstMedia = media.first;
if (firstMedia is Map<String, dynamic>) {
final rawBeginsAt = firstMedia['beginsAt'];
beginsAt = switch (rawBeginsAt) {
num n => n.toInt(),
String s => int.tryParse(s),
_ => null,
};
beginsAt = switch (rawBeginsAt) {
num n => n.toInt(),
String s => int.tryParse(s),
_ => null,
};
}
}
}