mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
fix: artist track count
+ fix: album type on artits page + sort by release date help text on get all
This commit is contained in:
+10
-2
@@ -210,6 +210,7 @@ class IndexArtists:
|
||||
|
||||
for a in track.albumartists:
|
||||
if a not in this_artists:
|
||||
a["in_track"] = False
|
||||
this_artists.append(a)
|
||||
|
||||
for thisartist in this_artists:
|
||||
@@ -228,7 +229,11 @@ class IndexArtists:
|
||||
"playcount": track.playcount,
|
||||
"playduration": track.playduration,
|
||||
"trackcount": None,
|
||||
"tracks": {track.trackhash},
|
||||
"tracks": (
|
||||
{track.trackhash}
|
||||
if thisartist.get("in_track", True)
|
||||
else set()
|
||||
),
|
||||
}
|
||||
else:
|
||||
artist = artists[thisartist["artisthash"]]
|
||||
@@ -236,12 +241,15 @@ class IndexArtists:
|
||||
artist["playcount"] += track.playcount
|
||||
artist["playduration"] += track.playduration
|
||||
artist["albums"].add(track.albumhash)
|
||||
artist["tracks"].add(track.trackhash)
|
||||
artist["date"] = min(artist["date"], track.date)
|
||||
artist["lastplayed"] = max(artist["lastplayed"], track.lastplayed)
|
||||
artist["created_date"] = min(artist["created_date"], track.last_mod)
|
||||
artist["names"].add(thisartist["name"])
|
||||
|
||||
|
||||
if thisartist.get("in_track", True):
|
||||
artist["tracks"].add(track.trackhash)
|
||||
|
||||
if track.genres:
|
||||
artist["genres"].extend(track.genres)
|
||||
|
||||
|
||||
+1
-1
@@ -269,7 +269,7 @@ def get_tags(filepath: str, artist_separators: set[str]):
|
||||
]
|
||||
|
||||
tags.artisthashes = list(
|
||||
{a["artisthash"] for a in tags.artists + tags.albumartists}
|
||||
{a["artisthash"] for a in tags.artists}
|
||||
)
|
||||
|
||||
# remove prod by
|
||||
|
||||
Reference in New Issue
Block a user