handle XDG_CONFIG_HOME specification ...

+ fix bug that caused duplicate artist color entries to db
+ check if app is windows (prep for windows build)
+ remove caribou migrations lib
+ rename all api blueprints to "api"
+ unregister child directories when customizing root dirs
+ misc
This commit is contained in:
geoffrey45
2023-01-22 23:57:12 +03:00
parent 4e6e1f03dc
commit bcc4873766
18 changed files with 163 additions and 179 deletions
+3 -6
View File
@@ -69,13 +69,12 @@ class ProcessArtistColors:
"""
def __init__(self) -> None:
db_colors: list[tuple] = list(adb.get_all_artists())
db_artisthashes = "-".join([artist[1] for artist in db_colors])
all_artists = Store.artists
if all_artists is None:
return
for artist in tqdm(all_artists, desc="Processing artist colors"):
if len(artist.colors) == 0:
if artist.artisthash not in db_artisthashes:
self.process_color(artist)
@staticmethod
@@ -90,5 +89,3 @@ class ProcessArtistColors:
if len(colors) > 0:
adb.insert_one_artist(artisthash=artist.artisthash, colors=colors)
Store.map_artist_color((0, artist.artisthash, json.dumps(colors)))
# TODO: Load album and artist colors into the store.