feat: Implement hash-first identification strategy in audio file syncing and enhance tests for renamed files
Some checks failed
Backend CI / lint (push) Failing after 4m55s
Backend CI / test (push) Failing after 4m32s

This commit is contained in:
JSC
2025-08-25 11:56:07 +02:00
parent d81a54207c
commit da66516bb3
3 changed files with 316 additions and 68 deletions

View File

@@ -34,7 +34,11 @@ class Sound(BaseModel, table=True):
__table_args__ = (UniqueConstraint("hash", name="uq_sound_hash"),)
# relationships
playlist_sounds: list["PlaylistSound"] = Relationship(back_populates="sound")
playlist_sounds: list["PlaylistSound"] = Relationship(
back_populates="sound", cascade_delete=True
)
extractions: list["Extraction"] = Relationship(back_populates="sound")
play_history: list["SoundPlayed"] = Relationship(back_populates="sound")
play_history: list["SoundPlayed"] = Relationship(
back_populates="sound", cascade_delete=True
)
favorites: list["Favorite"] = Relationship(back_populates="sound")