Fixed loading spinner when playlist empty

This commit is contained in:
nsteel 2015-11-13 12:17:57 +00:00
parent 24cea6d4be
commit 67246cda2f

View File

@ -183,6 +183,11 @@ function processGetPlaylists(resultArr) {
* process results of a returned list of playlist track refs
*********************************************************/
function processPlaylistItems(resultDict) {
if (resultDict.items.length == 0) {
console.log('Playlist', resultDict.uri, 'is empty');
showLoading(false);
return;
}
var trackUris = []
for (i = 0; i < resultDict.items.length; i++) {
trackUris.push(resultDict.items[i].uri);
@ -197,6 +202,7 @@ function processPlaylistItems(resultDict) {
resultsToTables(playlists[newplaylisturi].tracks, PLAYLIST_TABLE, newplaylisturi);
showLoading(false);
});
}
/********************************************************