add route to save folder as playlist

+ modify playlist table sql
This commit is contained in:
mungai-njoroge
2023-07-27 13:37:07 +03:00
parent d4a1a6ee1a
commit a0c51d5f82
6 changed files with 124 additions and 44 deletions
+7
View File
@@ -166,3 +166,10 @@ class TrackStore:
"""
tracks = [t for t in cls.tracks if artisthash in t.artist_hashes]
return remove_duplicates(tracks)
@classmethod
def get_tracks_in_path(cls, path: str):
"""
Returns all tracks in the given path.
"""
return (t for t in cls.tracks if t.folder.startswith(path))