From 204c5a27ac78a6022277897d66e9c26a563feb2b Mon Sep 17 00:00:00 2001 From: Nick Steel Date: Fri, 19 Jun 2015 01:17:32 +0100 Subject: [PATCH] Correctly identify user's Spotify starred playlist. (Fixes #110). --- mopidy_musicbox_webclient/static/js/process_ws.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mopidy_musicbox_webclient/static/js/process_ws.js b/mopidy_musicbox_webclient/static/js/process_ws.js index 57950b9..65433e0 100644 --- a/mopidy_musicbox_webclient/static/js/process_ws.js +++ b/mopidy_musicbox_webclient/static/js/process_ws.js @@ -170,12 +170,12 @@ function processGetPlaylists(resultArr) { iconClass = getMediaClass(resultArr[i].uri); // Check if this is Spotify's "Starred" playlist - if(starredRegex.test(resultArr[i].uri)) { + if(starredRegex.test(resultArr[i].uri) && resultArr[i].name == "Starred") { starred = '
  • ★ Spotify Starred Tracks
  • '; - } else { - child = '
  • ' + resultArr[i].name + '
  • '; - tmp += child; - } + } else { + child = '
  • ' + resultArr[i].name + '
  • '; + tmp += child; + } }; // Move Spotify "Starred" playlist to top as this is the way Spotify does it