combine userdata and swing db into one

+ port populate to new db interface
+ add genrehashes and hash info to tracks
+ properly structure new db table files
+ move helpers to dedicated utils file
+ move settings from db to config file
+ move artists, albums, auth and favorites endpoint to new db interface
+ use folder store to index filepaths
+ paginate favorite pages
+ 56 moretiny changes 😅
This commit is contained in:
cwilvx
2024-06-30 15:06:33 +03:00
parent 1a66194c6c
commit 4a9f804e70
53 changed files with 1719 additions and 1353 deletions
+5 -4
View File
@@ -6,7 +6,8 @@ from pydantic import BaseModel, Field
from datetime import datetime
from app.api.apischemas import GenericLimitSchema
from app.db import AlbumTable, ArtistTable
from app.db.libdata import ArtistTable
from app.db.libdata import AlbumTable
from app.store.albums import AlbumStore
from app.store.artists import ArtistStore
@@ -61,11 +62,11 @@ def get_all_items(path: GetAllItemsPath, query: GetAllItemsQuery):
is_artists = path.itemtype == "artists"
if is_albums:
items, total = AlbumTable.get_all(query.start, query.limit)
items = AlbumTable.get_all()
elif is_artists:
items, total = ArtistTable.get_all(query.start, query.limit)
items = ArtistTable.get_all()
# print(items)
total = len(items)
start = query.start
limit = query.limit