mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
port recents endpoints to use stores
This commit is contained in:
+3
-5
@@ -125,11 +125,9 @@ class AlbumStore:
|
||||
"""
|
||||
Returns an album by its hash.
|
||||
"""
|
||||
for album in cls.albums:
|
||||
if album.albumhash == albumhash:
|
||||
return album
|
||||
|
||||
return None
|
||||
entry = cls.albummap.get(albumhash)
|
||||
if entry is not None:
|
||||
return entry.album
|
||||
|
||||
@classmethod
|
||||
def get_albums_by_hashes(cls, albumhashes: Iterable[str]) -> list[Album]:
|
||||
|
||||
Reference in New Issue
Block a user