From 38ff2607cfe93145c88a01d4812a232ed68b3c58 Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 2 May 2025 16:52:45 -0700 Subject: [PATCH] Update play_utils.py added artist, album and track info to the shuffle feature --- resources/lib/play_utils.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/resources/lib/play_utils.py b/resources/lib/play_utils.py index 54ca143..e70e1b4 100644 --- a/resources/lib/play_utils.py +++ b/resources/lib/play_utils.py @@ -730,8 +730,20 @@ def set_list_item_props(item_id, list_item, result, server, extra_props, title): details = { 'title': title, - 'mediatype': mediatype + 'mediatype': mediatype, + 'artist': "Unknown Artist", + 'album': "Unknown Album" } + artist = result.get("Artists", []) + if artist: + details['artist'] = artist[0] + track = result.get("IndexNumber") + if track: + details['tracknumber'] = track + album = result.get("Album") + if album: + details['album'] = album + list_item.setInfo("Music", infoLabels=details) else: