fix: stores not being populated on track indexing

This commit is contained in:
cwilvx
2024-08-02 19:59:20 +03:00
parent 0463c80070
commit 04946831ce
5 changed files with 56 additions and 27 deletions
+30 -9
View File
@@ -1,23 +1,44 @@
from app.lib.mapstuff import map_album_colors, map_artist_colors, map_favorites, map_scrobble_data
from app.lib.populate import CordinateMedia
from app.lib.tagger import IndexTracks
from app.store.folder import FolderStore
import gc
from time import time
from app.lib.mapstuff import (
map_album_colors,
map_artist_colors,
map_favorites,
map_scrobble_data,
)
from app.lib.populate import CordinateMedia
from app.lib.tagger import IndexTracks
from app.store.albums import AlbumStore
from app.store.artists import ArtistStore
from app.store.folder import FolderStore
from app.store.tracks import TrackStore
from app.utils.threading import background
def load_and_map():
key = str(time())
FolderStore.load_filepaths()
AlbumStore.load_albums(key)
ArtistStore.load_artists(key)
map_scrobble_data()
map_favorites()
map_artist_colors()
map_album_colors()
class IndexEverything:
def __init__(self) -> None:
IndexTracks(instance_key=time())
key = str(time())
TrackStore.load_all_tracks(key)
AlbumStore.load_albums(key)
ArtistStore.load_artists(key)
FolderStore.load_filepaths()
map_scrobble_data()
map_favorites()
map_artist_colors()
map_album_colors()
CordinateMedia(instance_key=str(time()))
gc.collect()