Add files via upload

This commit is contained in:
erew123 authored and GitHub committed 2023-12-25 02:05:05 +00:00
1 parent 558583b16f
commit 52a7922e98
3 files changed
+3 -5

No files matched your search

+1 -1
View File
@@ -10,4 +10,4 @@ requests>=2.31.0
tqdm>=4.66.1 tqdm>=4.66.1
importlib-metadata>=4.8.1 importlib-metadata>=4.8.1
packaging>=23.2 packaging>=23.2
pydantic>=2.5.0 pydantic>=1.10.13
+1 -1
View File
@@ -10,4 +10,4 @@ requests>=2.31.0
tqdm>=4.66.1 tqdm>=4.66.1
importlib-metadata>=4.8.1 importlib-metadata>=4.8.1
packaging>=23.2 packaging>=23.2
pydantic>=2.5.0 pydantic>=1.10.13
+1 -3
View File
@@ -22,7 +22,6 @@ from fastapi.templating import Jinja2Templates
from fastapi.staticfiles import StaticFiles from fastapi.staticfiles import StaticFiles
from jinja2 import Template from jinja2 import Template
from contextlib import asynccontextmanager from contextlib import asynccontextmanager
from pydantic import field_validator
########################### ###########################
#### STARTUP VARIABLES #### #### STARTUP VARIABLES ####
@@ -647,11 +646,10 @@ class JSONInput(BaseModel):
autoplay: bool = Field(..., description="autoplay needs to be a true or false value.") autoplay: bool = Field(..., description="autoplay needs to be a true or false value.")
autoplay_volume: float = Field(..., ge=0.1, le=1.0, description="autoplay_volume needs to be from 0.1 to 1.0") autoplay_volume: float = Field(..., ge=0.1, le=1.0, description="autoplay_volume needs to be from 0.1 to 1.0")
@field_validator("autoplay_volume")
@classmethod @classmethod
def validate_autoplay_volume(cls, value): def validate_autoplay_volume(cls, value):
if not (0.1 <= value <= 1.0): if not (0.1 <= value <= 1.0):
raise ValidationError("Autoplay volume must be between 0.1 and 1.0") raise ValueError("Autoplay volume must be between 0.1 and 1.0")
return value return value