mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
draft stats
This commit is contained in:
@@ -281,6 +281,15 @@ class ScrobbleTable(Base):
|
||||
|
||||
return tracklog_to_dataclasses(result.fetchall())
|
||||
|
||||
@classmethod
|
||||
def get_all_in_period(cls, start_time: int, end_time: int):
|
||||
result = cls.execute(
|
||||
select(cls)
|
||||
.where(and_(cls.timestamp >= start_time, cls.timestamp <= end_time))
|
||||
.order_by(cls.timestamp.desc())
|
||||
)
|
||||
return tracklog_to_dataclasses(result.fetchall())
|
||||
|
||||
|
||||
class PlaylistTable(Base):
|
||||
__tablename__ = "playlist"
|
||||
|
||||
Reference in New Issue
Block a user