From 531da56dd071cdedf9177fea68597a49cb5bfba4 Mon Sep 17 00:00:00 2001 From: Max Isom Date: Thu, 1 Apr 2021 15:28:46 -0400 Subject: [PATCH] Bump dependency --- package.json | 2 +- src/services/get-songs.ts | 5 ++--- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 1db634d..5145e3d 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "spotify-web-api-node": "^5.0.2", "sqlite3": "^5.0.2", "unique-random-array": "^2.0.0", - "youtube.ts": "^0.1.9", + "youtube.ts": "^0.2.0", "ytdl-core": "^4.5.0" } } 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; diff --git a/yarn.lock b/yarn.lock index 7bc2afb..a78be7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3160,10 +3160,10 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -youtube.ts@^0.1.9: - version "0.1.9" - resolved "https://registry.yarnpkg.com/youtube.ts/-/youtube.ts-0.1.9.tgz#a43e48f5b406e87549053ee4e6949c9a95d5da23" - integrity sha512-j+U5Mhf9G0Y65fVX/hX/GSik4WJAoSFjwGQTSBGIb/mhs7OUMIJ5VL0SETK/qJ1/r06zGECnsXd5YBLNXu2Sqg== +youtube.ts@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/youtube.ts/-/youtube.ts-0.2.0.tgz#a6cbc153bda9aa712a10098b22060877fb2995f3" + integrity sha512-cRHN/7L9FO+DkdKTzvUAiB/hQo+ZtzLb4GfVywPTTtf9JBol87fqzLKf86cBWwuXLOJzJNLB/wvZmUmsxpbByQ== dependencies: axios "^0.19.0" ytdl-core "^4.0.3"