From a106aa6760d93a821c6a707f37675ce7b9027b0e Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Mon, 25 Mar 2024 21:07:17 +1300 Subject: [PATCH] Tracks count for Spotify playlists (simple object) --- src/js/util/format.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/util/format.js b/src/js/util/format.js index 7f6112518..1ee5080fc 100755 --- a/src/js/util/format.js +++ b/src/js/util/format.js @@ -527,7 +527,7 @@ const formatPlaylist = function (data) { } if (playlist.tracks_total === undefined) { - playlist.tracks_total = playlist.tracks ? playlist.tracks.length : 0; + playlist.tracks_total = playlist.tracks?.length || data?.tracks?.total || 0; } if (data.last_modified_date && playlist.last_modified === undefined) {