revert: remove download size estimates

This commit is contained in:
zarzet
2026-09-06 22:17:23 +07:00
parent 174852b056
commit ed51b5d6ea
17 changed files with 10 additions and 806 deletions
-47
View File
@@ -148,53 +148,6 @@ labels, with `downloadFallbackTier` helping classify `best` and `default`;
explicit kinds avoid ambiguity for custom IDs. Descriptions are not used
because they may describe other fallback formats.
### Estimated download sizes
The quality picker estimates audio size locally from the known track durations.
An optional `sizeEstimate` object on a quality option supplies audio parameters
for custom IDs without resolving streams or triggering verification:
```json
{
"id": "studio",
"label": "Best FLAC",
"kind": "lossless",
"sizeEstimate": {
"bitDepth": 24,
"sampleRate": 192000,
"channels": 2,
"isMaximum": true
}
}
```
- For encoded audio, supply `bitrateKbps` (total target bitrate across channels).
For example, `"sizeEstimate": {"bitrateKbps": 256}`.
- For compressed lossless audio, supply `bitDepth` and `sampleRate` in Hz.
`channels` defaults to 2. Do not use this model for uncompressed PCM.
- Set `isMaximum: true` for a lossless tier that can return lower quality.
The picker caps the declared depth/rate using each track's `audio_quality`
(for example, `16bit/44.1kHz` or `24bit/96kHz`). Metadata must belong to the
selected provider; missing or incomplete quality stays unavailable.
A capped bitrate alone remains unavailable.
- Omitted parameters remain unknown. Older extensions retain estimates for
the picker's legacy `LOSSLESS`, `HI_RES`, and `HI_RES_LOSSLESS` tiers and
explicit codec/bitrate IDs or labels such as `opus_256` or `Opus 256kbps`.
`best`, `default`, and `flac` options with `kind: "lossless"` can use track
quality directly. Other generic and spatial tiers need explicit parameters.
Lossy estimates use duration × bitrate / 8. Lossless estimates use a rough
65% of uncompressed PCM size at the effective track quality. This is a comparison
heuristic, not measured compression for the recording or a guaranteed size.
Do not combine a CD-quality minimum with a hi-res maximum: that range hides
the distinction between tiers and provides little useful size information.
Estimates exclude artwork, tags, and container overhead. They describe the
selected quality before automatic conversion, with a separate converted-size
estimate when enabled. Fallback quality and intermediate transfers can change
both the final size and data usage. Collection estimates sum each track's
individual estimate. If any selected track lacks the required metadata,
the picker does not show a partial sum as a complete total.
### Permissions
```json