mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
handle favorites on recently played
+ use client side timestamp on track logger
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
from app.db.sqlite.utils import SQLiteManager
|
||||
import time
|
||||
|
||||
|
||||
class SQLiteTrackLogger:
|
||||
@classmethod
|
||||
def insert_track(cls, trackhash: str, duration: int, source: str):
|
||||
def insert_track(cls, trackhash: str, duration: int, source: str, timestamp: int):
|
||||
"""
|
||||
Inserts a track into the database
|
||||
"""
|
||||
@@ -18,7 +17,6 @@ class SQLiteTrackLogger:
|
||||
userid
|
||||
) VALUES(?,?,?,?,?)
|
||||
"""
|
||||
timestamp = int(time.time())
|
||||
|
||||
cur.execute(sql, (trackhash, duration, timestamp, source, 0))
|
||||
lastrowid = cur.lastrowid
|
||||
|
||||
Reference in New Issue
Block a user