This commit is contained in:
2026-04-14 16:21:06 +02:00
parent 287477753e
commit 460b41a8c5
5 changed files with 301 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ class SongData(BaseModel):
duration_sec: int = 0
file_format: str = ""
mbid: str = ""
acoustid: str = ""
class DanceData(BaseModel):
name: str
@@ -115,6 +116,8 @@ def push(
existing.bpm = s.bpm
if s.mbid and not existing.mbid:
existing.mbid = s.mbid
if s.acoustid and not existing.acoustid:
existing.acoustid = s.acoustid
else:
song = Song(
owner_id=me.id,
@@ -122,6 +125,7 @@ def push(
bpm=s.bpm, duration_sec=s.duration_sec,
file_format=s.file_format,
mbid=s.mbid or None,
acoustid=s.acoustid or None,
)
db.add(song)
db.flush()