Fix infinite loop

Resolves https://github.com/codetheweb/muse/issues/884
This commit is contained in:
Max Isom 2023-02-14 19:12:19 -08:00
parent 90d083acdd
commit c8414f2714
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
2 changed files with 3 additions and 1 deletions

View file

@ -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). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
### Fixed
- Queueing a YouTube playlist sometimes resulted in an infinite loop
## [2.1.8] - 2023-02-09 ## [2.1.8] - 2023-02-09
### Changed ### Changed

View file

@ -96,7 +96,7 @@ export default class {
let nextToken: string | undefined; let nextToken: string | undefined;
while (playlistVideos.length !== playlist.contentDetails.itemCount) { while (playlistVideos.length < playlist.contentDetails.itemCount) {
// eslint-disable-next-line no-await-in-loop // eslint-disable-next-line no-await-in-loop
const {items, nextPageToken} = await this.cache.wrap( const {items, nextPageToken} = await this.cache.wrap(
this.youtube.playlists.items, this.youtube.playlists.items,