port: artist page

This commit is contained in:
cwilvx
2024-06-24 22:08:05 +03:00
parent 3593b205eb
commit 54a1b85d8b
7 changed files with 187 additions and 119 deletions
+3 -2
View File
@@ -41,6 +41,7 @@ class IndexAlbums:
if track.albumhash not in albums:
albums[track.albumhash] = {
"albumartists": track.albumartists,
"artisthashes": [a['artisthash'] for a in track.albumartists],
"albumhash": track.albumhash,
"base_title": None,
"color": None,
@@ -107,7 +108,7 @@ class IndexArtists:
"dates": [track.date],
"date": None,
"duration": track.duration,
"genres": [*track.genre] if track.genre else [],
"genres": track.genre if track.genre else [],
"name": artist["name"],
"trackcount": None,
"tracks": {track.trackhash},
@@ -121,7 +122,7 @@ class IndexArtists:
artist["created_dates"].append(track.last_mod)
if track.genre:
artist["genres"].append(track.genre)
artist["genres"].extend(track.genre)
for artist in artists.values():
+3
View File
@@ -262,6 +262,9 @@ def get_tags(filepath: str):
for a in split_albumartists
]
tags.artisthashes = list({a["artisthash"] for a in tags.artists + tags.albumartists})
# remove prod by
if config.removeProdBy:
new_title = remove_prod(new_title)