mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-29 02:21:15 +00:00
break down store.py into multiple files in a module
+ fix last updated date bug
This commit is contained in:
1 parent
43c480cf3e
commit
d43dcbff46
26 files changed
+688
-636
No files matched your search
@@ -4,7 +4,7 @@ from collections import OrderedDict
|
||||
from app.db.sqlite.tracks import SQLiteTrackMethods
|
||||
from app.db.sqlite.utils import SQLiteManager, tuple_to_playlist, tuples_to_playlists
|
||||
from app.models import Artist
|
||||
from app.utils.generators import create_new_date
|
||||
from app.utils.dates import create_new_date
|
||||
from app.utils.threading import background
|
||||
|
||||
|
||||
@@ -151,12 +151,12 @@ class SQLitePlaylistMethods:
|
||||
cur.execute(sql, params)
|
||||
|
||||
@staticmethod
|
||||
def update_last_updated(playlist_id: int, date=create_new_date()):
|
||||
def update_last_updated(playlist_id: int):
|
||||
"""Updates the last updated date of a playlist."""
|
||||
sql = """UPDATE playlists SET last_updated = ? WHERE id = ?"""
|
||||
|
||||
with SQLiteManager(userdata_db=True) as cur:
|
||||
cur.execute(sql, (date, playlist_id))
|
||||
cur.execute(sql, (create_new_date(), playlist_id))
|
||||
|
||||
@staticmethod
|
||||
def delete_playlist(pid: str):
|
||||
|
||||
Reference in new issue
Block a user