mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user