mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Fix edgecases for new playback speed control
This commit is contained in:
+2
-2
@@ -2166,9 +2166,9 @@ class VideoDetailView : ConstraintLayout {
|
||||
var playbackSpeedString = v;
|
||||
val stepSpeed = Settings.instance.playback.getPlaybackSpeedStep();
|
||||
if(v == "+")
|
||||
playbackSpeedString = String.format("%.2f", (currentPlaybackSpeed?.toDouble() ?: 1.0) + stepSpeed).toString();
|
||||
playbackSpeedString = String.format("%.2f", Math.min((currentPlaybackSpeed?.toDouble() ?: 1.0) + stepSpeed, 5.0)).toString();
|
||||
else if(v == "-")
|
||||
playbackSpeedString = String.format("%.2f", (currentPlaybackSpeed?.toDouble() ?: 1.0) - stepSpeed).toString();
|
||||
playbackSpeedString = String.format("%.2f", Math.max(0.1, (currentPlaybackSpeed?.toDouble() ?: 1.0) - stepSpeed)).toString();
|
||||
val newPlaybackSpeed = playbackSpeedString.toDouble();
|
||||
if (_isCasting) {
|
||||
val ad = StateCasting.instance.activeDevice ?: return@subscribe
|
||||
|
||||
@@ -90,7 +90,7 @@ class ToggleField : TableRow, IField {
|
||||
|
||||
val advancedFieldAttr = field.getAnnotation(AdvancedField::class.java)
|
||||
if(advancedFieldAttr != null || advanced) {
|
||||
Logger.w("ToggleField", "Found advanced field: " + field.name);
|
||||
Logger.w("ToggleField", "Found cccadvanced field: " + field.name);
|
||||
isAdvanced = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user