refactor: Remove unused playlist routes and related logic; clean up sound and stream models

This commit is contained in:
JSC
2025-07-12 22:00:04 +02:00
parent 627b95c961
commit 688b95b6af
12 changed files with 34 additions and 1139 deletions

View File

@@ -197,21 +197,6 @@ class Sound(db.Model):
"""Find all sounds by type."""
return cls.query.filter_by(type=sound_type).all()
@classmethod
def get_most_played(cls, limit: int = 10) -> list["Sound"]:
"""Get the most played sounds."""
return cls.query.order_by(cls.play_count.desc()).limit(limit).all()
@classmethod
def get_music_sounds(cls) -> list["Sound"]:
"""Get all music sounds."""
return cls.query.filter_by(is_music=True).all()
@classmethod
def get_deletable_sounds(cls) -> list["Sound"]:
"""Get all deletable sounds."""
return cls.query.filter_by(is_deletable=True).all()
@classmethod
def create_sound(
cls,