mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-29 05:51:15 +00:00
add methods to get recently played items
This commit is contained in:
1 parent
5a420214f2
commit
ddfa7f1b03
10 files changed
+277
-101
No files matched your search
@@ -24,3 +24,17 @@ class SQLiteTrackLogger:
|
||||
lastrowid = cur.lastrowid
|
||||
|
||||
return lastrowid
|
||||
|
||||
@classmethod
|
||||
def get_all(cls):
|
||||
"""
|
||||
Returns all tracks from the database
|
||||
"""
|
||||
|
||||
with SQLiteManager(userdata_db=True) as cur:
|
||||
sql = """SELECT * FROM track_logger ORDER BY timestamp DESC"""
|
||||
|
||||
cur.execute(sql)
|
||||
rows = cur.fetchall()
|
||||
|
||||
return rows
|
||||
Reference in new issue
Block a user