diff --git a/src/sources/spotify.ts b/src/sources/spotify.ts index 13706b2f..b5b3861d 100644 --- a/src/sources/spotify.ts +++ b/src/sources/spotify.ts @@ -777,14 +777,7 @@ export default class SpotifySource implements SourceInstance { return this.getRecommendations(query) try { - let limit = this.config.playlistLoadLimit || 10 - - // fixes the error Argument for field /searchV2 cannot be greater than 1000 - // this is a config issue from the user side, but if this can be used as a workaround, - // we set it to 10 to avoid the error :p. - if (limit > 999) { - limit = 10 - } + let limit = Math.min(Math.max(this.nodelink.options.search.maxResults ?? 10, 1), 50) // Priority 1: Internal Search (Rich nodes + Local matching) if (this.anonymousToken || this.config.sp_dc) {