mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
rewrite get all endpoint with stores
This commit is contained in:
@@ -8,6 +8,7 @@ from app.db.sqlite.albumcolors import SQLiteAlbumMethods as aldb
|
||||
from app.lib.tagger import create_albums
|
||||
from app.models import Album, Track
|
||||
from app.store.artists import ArtistStore
|
||||
from app.utils import flatten
|
||||
from app.utils.customlist import CustomList
|
||||
from app.utils.remove_duplicates import remove_duplicates
|
||||
|
||||
@@ -76,6 +77,13 @@ class AlbumStore:
|
||||
|
||||
print("Done!")
|
||||
|
||||
@classmethod
|
||||
def get_flat_list(cls):
|
||||
"""
|
||||
Returns a flat list of all albums.
|
||||
"""
|
||||
return [a.album for a in cls.albummap.values()]
|
||||
|
||||
@classmethod
|
||||
def add_album(cls, album: Album):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user