fix: folder endpoint returning same track for different files of the same trackhash

+ fix: chunked streaming. return instead of yield chunks
This commit is contained in:
cwilvx
2024-08-15 17:07:34 +03:00
parent cd992419c5
commit ca31054f48
18 changed files with 508 additions and 138 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import datetime
from typing import Any
from typing import Any, Literal
from sqlalchemy import (
JSON,
Boolean,
@@ -409,7 +409,7 @@ class LibDataTable(Base):
)
@classmethod
def find_one(cls, hash: str, type: str):
def find_one(cls, hash: str, type: Literal["album", "artist"]):
result = cls.execute(
select(cls).where((cls.itemhash == hash) & (cls.itemtype == type))
)