crabidy/docs/src/providers/search.md

2.3 KiB

Search

Crabidy has no search dialog. Searching is done by editing the library tree: inside a provider's search subtree you create a node whose title is your search term, and that node holds the results. The created node is persistent — you can revisit it, queue from it, and (for providers that allow it) rename or delete it — so a search is just another place in the tree.

Creating a search node

A node that accepts creation is marked creatable. When the currently open node is creatable, press %: a one-line input opens at the bottom of the library pane, you type a term and press Enter (or Esc to cancel), and the term is sent to the provider as the title of a new child node. The client then navigates into that node.

`%` acts on the **open** node, not the selected child — you enter a
search subtree (e.g. `/tidal/search`) and press `%` there. Creatable
nodes render with a `%` marker in the child list, and the pane title
shows a hint when the open node itself is creatable, so the affordance
is visible without documentation.

Creating a term that already exists returns the existing node rather than erroring; empty or whitespace-only terms are rejected. Terms containing / or % are safe: the term is percent-encoded into the path segment while the node keeps the raw term as its display title.

What the results look like

The shape depends on the provider:

  • Tidal/tidal/search/<term> carries track results directly (queueable in place) and lists artist and album results as children whose paths are canonical (/tidal/artists/<id>, …), so diving into an artist reuses the normal browse machinery. The term node itself is not queueable.
  • YouTube/youtube/search/<term> lists the top video results as tracks and is queueable, since the results are homogeneous.

In both cases results are a live view, fetched fresh when the node is opened — nothing is cached. Terms live in memory for the life of the server process.

This tree-editing search is distinct from the terminal client's `/`
**live filter**, which narrows the children already shown in the current
node without fetching anything. See the [Terminal UI](../clients/tui.md)
for that.