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
+14
View File
@@ -311,6 +311,20 @@ class FavoritesTable(Base):
return 0
@classmethod
def count_tracks(cls):
result = cls.execute(select(func.count(cls.id)).where(cls.type == "track"))
return next(result).scalar()
@classmethod
def get_last_trackhash(cls):
result = cls.execute(
select(cls.hash).where(cls.type == "track").order_by(cls.timestamp.desc())
)
return next(result).scalar()
class ScrobbleTable(Base):
__tablename__ = "scrobble"