mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
check if album colors have contrast
- remove albumid field from album class - set accent color to $red
This commit is contained in:
committed by
Mungai Geoffrey
parent
a23b6200eb
commit
5acb8cb84d
@@ -61,11 +61,11 @@ class Albums(MongoAlbums):
|
||||
album = self.collection.find_one({"hash": hash})
|
||||
return convert_one(album)
|
||||
|
||||
def set_album_colors(self, colors: List[str], album_id: str) -> None:
|
||||
def set_album_colors(self, colors: List[str], hash: str) -> None:
|
||||
"""
|
||||
Sets the colors for an album.
|
||||
"""
|
||||
self.collection.update_one(
|
||||
{"_id": ObjectId(album_id)},
|
||||
{"hash": hash},
|
||||
{"$set": {"colors": colors}},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user