| 73 | } |
| 74 | |
| 75 | async loadAll() { |
| 76 | if (this.onPlaylistsLoadingStarted) { |
| 77 | this.onPlaylistsLoadingStarted() |
| 78 | } |
| 79 | |
| 80 | await this.loadSlice() |
| 81 | |
| 82 | // Get the rest of them if necessary |
| 83 | for (var offset = this.PLAYLIST_LIMIT; offset < this.data.length; offset = offset + this.PLAYLIST_LIMIT) { |
| 84 | await this.loadSlice(offset, offset + this.PLAYLIST_LIMIT) |
| 85 | } |
| 86 | |
| 87 | if (this.onPlaylistsLoadingDone) { |
| 88 | this.onPlaylistsLoadingDone() |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | private async loadSlice(start = 0, end = start + this.PLAYLIST_LIMIT) { |
| 93 | if (this.dataInitialized) { |