mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +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:
+1
-1
@@ -48,7 +48,7 @@ def get_album_tracks_and_info(body: AlbumHashSchema):
|
||||
tracks = TrackDb.get_tracks_by_albumhash(albumhash)
|
||||
album.trackcount = len(tracks)
|
||||
album.duration = sum(t.duration for t in tracks)
|
||||
album.type = album.check_type(
|
||||
album.check_type(
|
||||
tracks=tracks, singleTrackAsSingle=UserConfig().showAlbumsAsSingles
|
||||
)
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ def get_all_items(path: GetAllItemsPath, query: GetAllItemsQuery):
|
||||
item_dict = serialize_album(item) if is_albums else serialize_artist(item)
|
||||
|
||||
if sort_is_date:
|
||||
item_dict["help_text"] = item.date
|
||||
item_dict["help_text"] = datetime.fromtimestamp(item.date).year
|
||||
|
||||
if sort_is_create_date:
|
||||
date = create_new_date(datetime.fromtimestamp(item.created_date))
|
||||
|
||||
Reference in New Issue
Block a user