mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
rename album title in track object after extract feat from album title
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ class Album:
|
||||
self.albumartists.extend([Artist(a) for a in featured if a.lower() not in original_lower])
|
||||
|
||||
from ..store.tracks import TrackStore
|
||||
TrackStore.append_track_artists(self.albumhash, featured)
|
||||
TrackStore.append_track_artists(self.albumhash, featured, self.title)
|
||||
|
||||
self.albumartists_hashes = "-".join(a.artisthash for a in self.albumartists)
|
||||
|
||||
|
||||
+5
-1
@@ -85,9 +85,13 @@ class Track:
|
||||
def recreate_artists_hash(self):
|
||||
self.artist_hashes = "-".join(a.artisthash for a in self.artist)
|
||||
|
||||
def add_artists(self, artists: list[str]):
|
||||
def rename_album(self, new_album: str):
|
||||
self.album = new_album
|
||||
|
||||
def add_artists(self, artists: list[str], new_album_title: str):
|
||||
for artist in artists:
|
||||
if create_hash(artist) not in self.artist_hashes:
|
||||
self.artist.append(ArtistMinimal(artist))
|
||||
|
||||
self.recreate_artists_hash()
|
||||
self.rename_album(new_album_title)
|
||||
|
||||
Reference in New Issue
Block a user