mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
show artist decade in genres
+ assign default artist separators if db is empty + add instrumental to album version + check if album is a single by checking og_title and current title + hard code juice wrld artist name in model + set album aritst to first artist if track has no album artist + rewrite get_base_album_title regex to use existing album versions + misc
This commit is contained in:
+8
-6
@@ -173,8 +173,10 @@ class Album:
|
||||
|
||||
if (
|
||||
len(tracks) == 1
|
||||
and create_hash(tracks[0].title)
|
||||
== create_hash(self.title) # if they have the same title
|
||||
and (
|
||||
create_hash(tracks[0].title) == create_hash(self.title)
|
||||
or create_hash(tracks[0].title) == create_hash(self.og_title)
|
||||
) # if they have the same title
|
||||
# and tracks[0].track == 1
|
||||
# and tracks[0].disc == 1
|
||||
# TODO: Review -> Are the above commented checks necessary?
|
||||
@@ -191,10 +193,10 @@ class Album:
|
||||
if self.date:
|
||||
return
|
||||
|
||||
dates = {int(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
|
||||
return
|
||||
# if len(dates) == 0:
|
||||
# self.date = 0
|
||||
# return
|
||||
|
||||
self.date = datetime.datetime.fromtimestamp(min(dates)).year
|
||||
|
||||
Reference in New Issue
Block a user