fix(invidious): fix float formating (#5841)

This commit is contained in:
Stavros Kois 2022-12-26 18:49:17 +02:00 committed by GitHub
parent c51ee92236
commit 112bc8a56f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 10 deletions

View File

@ -25,7 +25,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/invidious
- https://github.com/iv-org/invidious
- https://docs.invidious.io/installation/#docker
version: 1.0.5
version: 1.0.6
annotations:
truecharts.org/catagories: |
- media

View File

@ -4,10 +4,10 @@
Accepted formats are:
- Integers (eg `1`, `2`)
- Floats (eg `1.25`, `1.50`)
- Floats (eg `1.25`, `1.50`, `2.5`)
Regex used to match those: `^[0-9]+(\.[0-9]*)?$`
You can try live [here](https://regex101.com/r/jnZ19W/1)
Regex used to match those: `^[0-9]+(\.[0-9]{1,2})?$`
You can try live [here](https://regex101.com/r/4HI4wW/1)
---

View File

@ -1113,7 +1113,7 @@ questions:
schema:
type: string
required: true
valid_chars: '^[0-9]+(\.[0-9]*)?$'
valid_chars: '^[0-9]+(\.[0-9]{1,2})?$'
default: "1.00"
- variable: volume
label: Volume

View File

@ -164,11 +164,7 @@ stringData:
# Video Playback Settigns
quality: {{ $vVidPlay.quality }}
quality_dash: {{ $vVidPlay.quality_dash }}
{{- if not (contains "." (toString $vVidPlay.speed)) }}
speed: {{ printf "%s.00" (toString $vVidPlay.speed) }}
{{- else }}
speed: {{ $vVidPlay.speed | float64 }}
{{- end }}
speed: {{ printf "%.2f" ($vVidPlay.speed | float64) }}
volume: {{ $vVidPlay.volume }}
vr_mode: {{ $vVidPlay.vr_mode }}