Fixes to Add Melody Page, minor UI Tweaks

This commit is contained in:
2026-02-17 18:11:04 +02:00
parent dff1ec921d
commit bec0e606e6
21 changed files with 863 additions and 899 deletions

View File

@@ -28,7 +28,6 @@ class MelodyInfo(BaseModel):
color: str = ""
isTrueRing: bool = False
previewURL: str = ""
notes: List[int] = []
class MelodyAttributes(BaseModel):

View File

@@ -82,7 +82,7 @@ async def upload_file(
url = service.upload_file(melody_id, contents, file.filename, content_type)
# Update the melody document with the new URL if it's a preview
# Update the melody document with the file URL
if file_type == "preview":
service.update_melody(melody_id, MelodyUpdate(
information=MelodyInfo(
@@ -90,6 +90,8 @@ async def upload_file(
previewURL=url,
)
))
elif file_type == "binary":
service.update_melody(melody_id, MelodyUpdate(url=url))
return {"url": url, "file_type": file_type}