add function to validate albums

+ extract colors in watchdogg
+ rename color db files
This commit is contained in:
mungai-njoroge
2023-07-12 08:56:30 +03:00
parent 4a7416853a
commit 861a854f91
18 changed files with 170 additions and 38 deletions
+8 -1
View File
@@ -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):
"""
+1 -1
View File
@@ -2,7 +2,7 @@ import json
from tqdm import tqdm
from app.db.sqlite.artists import SQLiteArtistMethods as ardb
from app.db.sqlite.artistcolors import SQLiteArtistMethods as ardb
from app.lib.artistlib import get_all_artists
from app.models import Artist
from app.utils.bisection import UseBisection