~ knotless Search/
↑↓ move↵ open⇧↵ all results

geesawra.industries/hydraulophone

An unofficial YouTube Music app for iPhone, iPad, and Mac.

0
0
main
56 lines · 3.2 KB Raw History
# Search result types and scopes

Updated: 2026-10-12.

## Reference

AuraMusic commit `185a77d31733047de06cbec619d40731755a0ec1`,
[YouTube.kt](https://github.com/TeamAuraMusic/AuraMusic/blob/185a77d31733047de06cbec619d40731755a0ec1/innertube/src/main/kotlin/com/auramusic/innertube/YouTube.kt),
`search`, `searchContinuation`, and `SearchFilter` (lines 413–433 and 1725–1733).
The source was fetched and inspected on 2026-10-12. This remains an undocumented
protocol observation, not an official API contract. No Kotlin code was copied;
the encoded values are protocol data.

Artist, album, and song filters are opaque strings in the first search request
body's `params`. Preserve their percent encoding exactly. Continuation requests
send the existing `continuation` and `ctoken` query values unchanged, without
repeating the original query or filter. The single tested SearchParameters
adapter owns filter literals.

Search shelves can contain responsive or two-row artist/album renderers. Decode
only items in the supported search shelf/continuation containers, classify their
browse endpoint pageType, and preserve opaque browse params and linked album
artists. Do not collect subtitle artist links as independent search results or
reinterpret an album's play-overlay playlist ID as a playlist result.

## Hydraulophone choices

SearchResult now carries artists and albums, alongside songs and playlists.
Scope identity belongs in cache/request keys, preventing a cached artist page or
in-flight request from being reused for an album scope. Search switches cancel
and invalidate the old request generation. Continuation handling accepts an empty
filtered page when it still has a next token and stops on a repeated token.

AuraMusic has separate featured and community playlist filters, with no combined
filter in the consulted source. Hydraulophone's combined Playlists scope uses
broad search pages and retains only playlist items while preserving each page's
cursor. It can require “Load more” before any matching playlist appears; it never
pretends that a partially loaded page is the complete playlist result set.
Artists, Albums, and Songs use server filters. No automatic unbounded page scan,
new endpoint, credential flow, or persisted response data was introduced.

## Fixtures and update risks

SearchScopeTests constructs small synthetic sanitized JSON equivalents of the
pinned renderer contract, with invented IDs/names/params and no account data.
It checks both initial/continuation layouts, responsive/two-row albums, duplicate
items, missing optional artwork, unknown page types, and linked artist metadata.
CatalogResponseParserTests checks first-page filter construction and exact cursor
round-trip with a URLProtocol fixture. Existing suites retain malformed/error
coverage. OfflineFixtureMusicService provides synthetic navigable artists/albums
for UI acceptance without transport or credentials.

If server filters or renderer layouts change, update the isolated adapter and
fixtures together and record the new source commit. Display names must never
substitute for missing browse references. No raw responses, cookies, visitor
values, or stream URLs should enter test attachments or ordinary logs.