mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-29 13:46:46 +00:00
Fix edgecases for new playback speed control
This commit is contained in:
parent
fe0aac7c6e
commit
8f28653b28
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue