Skip to main content

Module library

Module library 

Source
Expand description

The library: lists, pages and writes (spec 0006). Requests are answered through the Authenticator; every list and page has a pure DTO to core mapping behind it.

Choices the spec leaves open:

  • The artist’s albums are the plain list, then EPs and singles. Both are paged by the page size asked: the plain list takes the offsets below ceil(total / limit) * limit, the EPs and singles the offsets after, counted from 0. A plain page costs a second request, for the EP total only (limit=1), so total is always the sum.
  • The credits’ dataApiPath is read from /pages/contributor on offset 0 and kept per artist in the client; later pages use it, and read it again once when it fails with a 404.
  • A credits page smaller than Tidal’s 50 keeps the first rows of what Tidal sent.
  • A playlist’s own in its header is creator.id == user_id.
  • A playlist edit that answers 412 is retried once per request to Tidal’s items endpoint (one per chunk of 100 tracks).
  • A search’s top hit whose value cannot be read is no top hit: the lists still show (spec 0007).
  • A search’s Atmos-only tracks are dropped without counting them as hidden: the window’s title shows Tidal’s total, as 0006’s favorite tracks do (spec 0007 “Edge cases”).
  • A search 400 without a userMessage reads as any other status (Tidal answered 400).

Structs§

LibraryClient
Reads and writes the library through the Authenticator.

Enums§

LibraryError
Why a library request failed. Display is the message a user sees.
Subject
What was not found.