playlist folders will now load recursively
This commit is contained in:
parent
1b5474a81e
commit
bda22b2321
3 changed files with 40 additions and 18 deletions
|
@ -619,15 +619,7 @@ const app = new Vue({
|
|||
async refreshPlaylists() {
|
||||
let self = this
|
||||
this.apiCall('https://api.music.apple.com/v1/me/library/playlist-folders/p.playlistsroot/children/', res => {
|
||||
console.log(res)
|
||||
self.playlists.listing = res.data
|
||||
self.playlists.listing.forEach(playlist => {
|
||||
if(playlist.type === "library-playlist-folders") {
|
||||
self.mk.api.library.playlistFolderChildren(playlist.id).then(children => {
|
||||
playlist.children = children
|
||||
})
|
||||
}
|
||||
})
|
||||
self.playlists.listing.sort((a, b) => {
|
||||
if (a.type === "library-playlist-folders" && b.type !== "library-playlist-folders") {
|
||||
return -1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue