diff options
| author | Max Isom <[email protected]> | 2021-04-01 15:28:46 -0400 |
|---|---|---|
| committer | Max Isom <[email protected]> | 2021-04-01 15:28:46 -0400 |
| commit | 531da56dd071cdedf9177fea68597a49cb5bfba4 (patch) | |
| tree | 0d91af3e1df86142c40a17c95792751bc4b6374f /src | |
| parent | 6e0d4c792721d21de43290358180b0f2d717d576 (diff) | |
| download | muse-531da56dd071cdedf9177fea68597a49cb5bfba4.tar.xz muse-531da56dd071cdedf9177fea68597a49cb5bfba4.zip | |
Bump dependency
Diffstat (limited to 'src')
| -rw-r--r-- | src/services/get-songs.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/services/get-songs.ts b/src/services/get-songs.ts index 13866ae..d3e951d 100644 --- a/src/services/get-songs.ts +++ b/src/services/get-songs.ts @@ -4,7 +4,7 @@ import {toSeconds, parse} from 'iso8601-duration'; import got from 'got'; import spotifyURI from 'spotify-uri'; import Spotify from 'spotify-web-api-node'; -import YouTube, {YoutubePlaylistItem, YoutubePlaylistItemsSearch} from 'youtube.ts'; +import YouTube, {YoutubePlaylistItem} from 'youtube.ts'; import pLimit from 'p-limit'; import uniqueRandomArray from 'unique-random-array'; import {QueuedSong, QueuedPlaylist} from '../services/player'; @@ -68,9 +68,8 @@ export default class { let nextToken: string | undefined; while (playlistVideos.length !== playlist.contentDetails.itemCount) { - // TODO: https://github.com/Tenpi/youtube.ts/pull/7 // eslint-disable-next-line no-await-in-loop - const {items, nextPageToken} = (await this.youtube.playlists.items(listId, {maxResults: '50', pageToken: nextToken})) as YoutubePlaylistItemsSearch & {nextPageToken: string | undefined}; + const {items, nextPageToken} = await this.youtube.playlists.items(listId, {maxResults: '50', pageToken: nextToken}); nextToken = nextPageToken; |
