mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
fix: stores not being populated on track indexing
This commit is contained in:
+30
-9
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user