feat: Implement playlist management routes and integrate with music player service
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user