mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
fix: merging albums
+ remove "original" version from soundtrack albums
This commit is contained in:
@@ -69,6 +69,9 @@ class Album:
|
||||
if "super_deluxe" in self.versions:
|
||||
self.versions.remove("deluxe")
|
||||
|
||||
if "original" in self.versions and self.check_is_soundtrack():
|
||||
self.versions.remove("original")
|
||||
|
||||
self.versions = [v.replace("_", " ") for v in self.versions]
|
||||
else:
|
||||
self.base_title = get_base_title_and_versions(
|
||||
|
||||
+4
-3
@@ -62,7 +62,7 @@ class Track:
|
||||
featured, new_title = parse_feat_from_title(self.title)
|
||||
original_lower = "-".join([create_hash(a) for a in artists])
|
||||
artists.extend(
|
||||
[a for a in featured if create_hash(a) not in original_lower]
|
||||
a for a in featured if create_hash(a) not in original_lower
|
||||
)
|
||||
|
||||
self.artist_hashes = "-".join(create_hash(a, decode=True) for a in artists)
|
||||
@@ -127,7 +127,7 @@ class Track:
|
||||
return
|
||||
|
||||
self.trackhash = create_hash(
|
||||
", ".join([a.name for a in self.artists]), self.og_album, self.title
|
||||
", ".join(a.name for a in self.artists), self.og_album, self.title
|
||||
)
|
||||
|
||||
def recreate_artists_hash(self):
|
||||
@@ -140,7 +140,8 @@ class Track:
|
||||
"""
|
||||
Recreates an albumhash of a track to merge all versions of an album.
|
||||
"""
|
||||
self.albumhash = create_hash(self.album, self.albumartists)
|
||||
albumartists = (a.name for a in self.albumartists)
|
||||
self.albumhash = create_hash(self.album, *albumartists)
|
||||
|
||||
def rename_album(self, new_album: str):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user