fix: removing favorites not being commited to db

+ improve: collision of hashes on the favorite table
+ rename pages to collections
+ bump mix sleep time from 6hrs to 12hrs
This commit is contained in:
cwilvx
2025-02-25 23:30:51 +03:00
parent 0a1ab72932
commit 620974561c
8 changed files with 215 additions and 190 deletions
+1 -6
View File
@@ -39,9 +39,8 @@ class FavoritesAddBody(BaseModel):
description="The hash of the item",
min_length=Defaults.HASH_LENGTH,
max_length=Defaults.HASH_LENGTH,
example=Defaults.API_ALBUMHASH,
)
type: str = Field(description="The type of the item", example=FavType.album)
type: str = Field(description="The type of the item")
def toggle_fav(type: str, hash: str):
@@ -110,7 +109,6 @@ class GetAllOfTypeQuery(GenericLimitSchema):
start: int = Field(
description="Where to start from",
example=Defaults.API_CARD_LIMIT,
default=Defaults.API_CARD_LIMIT,
)
@@ -167,19 +165,16 @@ class GetAllFavoritesQuery(BaseModel):
track_limit: int = Field(
description="The number of tracks to return",
example=Defaults.API_CARD_LIMIT,
default=Defaults.API_CARD_LIMIT,
)
album_limit: int = Field(
description="The number of albums to return",
example=Defaults.API_CARD_LIMIT,
default=Defaults.API_CARD_LIMIT,
)
artist_limit: int = Field(
description="The number of artists to return",
example=Defaults.API_CARD_LIMIT,
default=Defaults.API_CARD_LIMIT,
)