mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
add function to validate albums
+ extract colors in watchdogg + rename color db files
This commit is contained in:
+8
-1
@@ -4,7 +4,7 @@ import random
|
||||
from tqdm import tqdm
|
||||
|
||||
from app.models import Album, Track
|
||||
from app.db.sqlite.albums import SQLiteAlbumMethods as aldb
|
||||
from app.db.sqlite.albumcolors import SQLiteAlbumMethods as aldb
|
||||
from .tracks import TrackStore
|
||||
from ..utils.hashing import create_hash
|
||||
|
||||
@@ -133,6 +133,13 @@ class AlbumStore:
|
||||
"""
|
||||
return albumhash in "-".join([a.albumhash for a in cls.albums])
|
||||
|
||||
@classmethod
|
||||
def remove_album(cls, album: Album):
|
||||
"""
|
||||
Removes an album from the store.
|
||||
"""
|
||||
cls.albums.remove(album)
|
||||
|
||||
@classmethod
|
||||
def remove_album_by_hash(cls, albumhash: str):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user