fix favorites on homescreen

+ reduce tagger process count
This commit is contained in:
cwilvx
2025-03-10 12:23:25 +03:00
parent 26c4c599d5
commit 9725fd427b
10 changed files with 44 additions and 33 deletions
+10 -10
View File
@@ -43,13 +43,17 @@ api = APIBlueprint("logger", __name__, url_prefix="/logger", abp_tags=[bp_tag])
class LogTrackBody(TrackHashSchema):
timestamp: int = Field(description="The timestamp of the track", example=1622217600)
duration: int = Field(
description="The duration of the track in seconds", example=300
)
timestamp: int = Field(description="The timestamp of the track")
duration: int = Field(description="The duration of the track in seconds")
source: str = Field(
description="The play source of the track",
example=f"al:{Defaults.API_ALBUMHASH}",
json_schema_extra={
"examples": [
f"al:{Defaults.API_ALBUMHASH}",
f"tr:{Defaults.API_TRACKHASH}",
f"ar:{Defaults.API_ARTISTHASH}",
]
},
)
@@ -354,11 +358,7 @@ def get_stats():
if len(tracks) > 0
else ""
),
(
tracks[0].image
if len(tracks) > 0
else None
),
(tracks[0].image if len(tracks) > 0 else None),
)
fav_count = FavoritesTable.count_favs_in_period(start_time, end_time)