Create callback for music data

This commit is contained in:
1hitsong 2022-05-15 20:08:14 -04:00
parent 00df907c94
commit 577569a26f

View File

@ -54,10 +54,21 @@ sub loadItems()
end if
resp = APIRequest(url, params)
data = getJson(resp)
if data <> invalid
if data.TotalRecordCount <> invalid then m.top.totalRecordCount = data.TotalRecordCount
' When loading the music collection, if no artists are found, try searching by albums
if m.top.collectionType = "music"
if m.top.ItemType = "MusicArtist"
if data.TotalRecordCount = 0
m.top.ItemType = "MusicAlbum"
loadItems()
end if
end if
end if
for each item in data.Items
tmp = invalid
if item.Type = "Movie"