beetbox / beetbox/beets

tidal: `search_limit` is ignored

Open
#6,770 2 comments 0 reactions 0 assignees View on GitHub
good first issue tidal
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem

The Tidal plugin does not appear to honor `tidal.search_limit`. With a config such as:

```yaml
tidal:
search_limit: 1
```

Tidal album and track searches still return (at least 20+) results.

### Expected behavior

Tidal should cap album and track search candidates using the configured `search_limit`, matching the behavior of other metadata source plugins.

### Likely cause

Tidal implements `candidates()` and `item_candidates()` directly, then calls `api.search_results()` from `search_albums_by_query()` and `search_tracks_by_query()`. That bypasses the shared search path that reads `search_limit` into `SearchParams.limit`.

### Suggested fix

Thread `search_limit` through the Tidal query search path, or truncate returned Tidal relationships before resolving album/track IDs. Add focused tests for both album and track search with `search_limit: 1`.

Tagging @semohr for visibility.

Contributor guide

Open the contributing guide

Research direction

Start with the Tidal candidates(), item_candidates(), search_albums_by_query(), and search_tracks_by_query() entry points described in the issue, then trace how search_limit reaches SearchParams.limit in the shared search path. Add focused album and track search tests using search_limit: 1, and verify both return no more than one candidate.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.