mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
rewrite migrations
+ delete older migrations ... oops + change migratrions from "migrations" to "dbmigrations" + restructure migrations, order them based on release version + add a utils/decorators.py file with a coroutine decorator
This commit is contained in:
+1
-1
@@ -191,7 +191,7 @@ class Album:
|
||||
if self.date:
|
||||
return
|
||||
|
||||
dates = {t.date for t in tracks if t.date}
|
||||
dates = {int(t.date) for t in tracks if t.date}
|
||||
|
||||
if len(dates) == 0:
|
||||
self.date = 0
|
||||
|
||||
@@ -11,7 +11,6 @@ class Playlist:
|
||||
"""Creates playlist objects"""
|
||||
|
||||
id: int
|
||||
artisthashes: str | list[str]
|
||||
image: str
|
||||
last_updated: str
|
||||
name: str
|
||||
@@ -26,11 +25,8 @@ class Playlist:
|
||||
|
||||
def __post_init__(self):
|
||||
self.trackhashes = json.loads(str(self.trackhashes))
|
||||
# self.artisthashes = json.loads(str(self.artisthashes))
|
||||
# commentted until we need it 👆
|
||||
|
||||
self.artisthashes = []
|
||||
|
||||
self.count = len(self.trackhashes)
|
||||
|
||||
if isinstance(self.settings, str):
|
||||
@@ -55,4 +51,3 @@ class Playlist:
|
||||
over the API.
|
||||
"""
|
||||
self.trackhashes = []
|
||||
self.artisthashes = []
|
||||
|
||||
+1
-1
@@ -30,10 +30,10 @@ class Track:
|
||||
filepath: str
|
||||
folder: str
|
||||
genre: str | list[str]
|
||||
last_mod: float
|
||||
title: str
|
||||
track: int
|
||||
trackhash: str
|
||||
last_mod: float
|
||||
|
||||
filetype: str = ""
|
||||
image: str = ""
|
||||
|
||||
Reference in New Issue
Block a user