diff options
| author | Max Isom <[email protected]> | 2023-02-14 19:12:19 -0800 |
|---|---|---|
| committer | Max Isom <[email protected]> | 2023-02-14 19:13:35 -0800 |
| commit | c8414f2714b6a289eb3f224cb5470c7ac8fcb87a (patch) | |
| tree | 7c5270804541b58f6571890427dc0e03fa1dcadc | |
| parent | 90d083acddee6f5bf071fd54fcd561becf499128 (diff) | |
| download | muse-c8414f2714b6a289eb3f224cb5470c7ac8fcb87a.tar.xz muse-c8414f2714b6a289eb3f224cb5470c7ac8fcb87a.zip | |
Fix infinite loop
Resolves https://github.com/codetheweb/muse/issues/884
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | src/services/youtube-api.ts | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a0d76f..eaa13cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Queueing a YouTube playlist sometimes resulted in an infinite loop ## [2.1.8] - 2023-02-09 ### Changed diff --git a/src/services/youtube-api.ts b/src/services/youtube-api.ts index fd729b5..01a29dc 100644 --- a/src/services/youtube-api.ts +++ b/src/services/youtube-api.ts @@ -96,7 +96,7 @@ export default class { let nextToken: string | undefined; - while (playlistVideos.length !== playlist.contentDetails.itemCount) { + while (playlistVideos.length < playlist.contentDetails.itemCount) { // eslint-disable-next-line no-await-in-loop const {items, nextPageToken} = await this.cache.wrap( this.youtube.playlists.items, |
