From 8cd02de4faaa6a730513674d73559eba182cfd03 Mon Sep 17 00:00:00 2001 From: rafael Date: Wed, 1 Jul 2026 02:35:04 -0300 Subject: [PATCH 1/2] fix(spotify): use search.maxResults configuration for search limit --- src/sources/spotify.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/sources/spotify.ts b/src/sources/spotify.ts index 13706b2f..6cdc9ea1 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 = this.nodelink.options.search.maxResults || 10 // Priority 1: Internal Search (Rich nodes + Local matching) if (this.anonymousToken || this.config.sp_dc) { From 8e305356c797a126a074629f411d47cb4ffd88a1 Mon Sep 17 00:00:00 2001 From: ToddyTheNoobDud Date: Sat, 4 Jul 2026 16:45:58 -0300 Subject: [PATCH 2/2] fix: clamp search maxResults to 50 for Spotify API compatibility --- src/sources/spotify.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sources/spotify.ts b/src/sources/spotify.ts index 6cdc9ea1..b5b3861d 100644 --- a/src/sources/spotify.ts +++ b/src/sources/spotify.ts @@ -777,7 +777,7 @@ export default class SpotifySource implements SourceInstance { return this.getRecommendations(query) try { - let limit = this.nodelink.options.search.maxResults || 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) {