diff --git a/app/models/album.py b/app/models/album.py index 993c563f..3d09c45f 100644 --- a/app/models/album.py +++ b/app/models/album.py @@ -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( diff --git a/app/models/track.py b/app/models/track.py index 2b6ba4cc..91ad2b49 100644 --- a/app/models/track.py +++ b/app/models/track.py @@ -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): """