Skip to content

Commit 8e30535

Browse files
fix: clamp search maxResults to 50 for Spotify API compatibility
1 parent 8cd02de commit 8e30535

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/sources/spotify.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ export default class SpotifySource implements SourceInstance {
777777
return this.getRecommendations(query)
778778

779779
try {
780-
let limit = this.nodelink.options.search.maxResults || 10
780+
let limit = Math.min(Math.max(this.nodelink.options.search.maxResults ?? 10, 1), 50)
781781

782782
// Priority 1: Internal Search (Rich nodes + Local matching)
783783
if (this.anonymousToken || this.config.sp_dc) {

0 commit comments

Comments
 (0)