feat: Implement playlist management routes and integrate with music player service

This commit is contained in:
JSC
2025-07-12 15:17:45 +02:00
parent 93897921fb
commit 842e1dff13
5 changed files with 413 additions and 55 deletions

View File

@@ -276,3 +276,14 @@ class Playlist(db.Model):
db.session.commit()
return new_playlist
def save(self, commit: bool = True) -> None:
"""Save changes to the playlist."""
if commit:
db.session.commit()
def delete(self, commit: bool = True) -> None:
"""Delete the playlist."""
db.session.delete(self)
if commit:
db.session.commit()