refactor(core)!: drop leading underscores from internal definitions

Renames 314 defs and 41 module/class-level constants. Keeps 11 names underscored where the stripped form collides in scope, plus 5.5.0 shims for the three symbols external service repos call.
This commit is contained in:
imSp4rky
2026-08-15 22:07:41 -06:00
parent db4f0b39f9
commit 21d5f1c5e1
116 changed files with 1671 additions and 1492 deletions
+5 -5
View File
@@ -429,22 +429,22 @@ Each exposes `from_url(url, session=...)` (or `from_text(text, url)`) and then
token.
Some services deliver a **separate manifest per codec/range**. The base class
provides `_get_tracks_for_variants(title, fetch_fn)` to fan out over every
provides `get_tracks_for_variants(title, fetch_fn)` to fan out over every
codec×range in the `TrackRequest`, including `HYBRID` (fetch HDR10 + DV and
merge) and `--best-available` skip-on-error handling:
```python
def get_tracks(self, title: Title_T) -> Tracks:
def _fetch_variant(title, codec, range_) -> Tracks:
def fetch_variant(title, codec, range_) -> Tracks:
vcodec = "H265" if codec == Video.Codec.HEVC else "H264"
return self._fetch_dash_manifest(title, vcodec=vcodec, range_=range_)
return self._get_tracks_for_variants(title, _fetch_variant)
return self.fetch_dash_manifest(title, vcodec=vcodec, range_=range_)
return self.get_tracks_for_variants(title, fetch_variant)
```
After parsing, you may **correct** track metadata the manifest gets wrong:
stamp the real `video.range`, fix odd audio channel counts, mark descriptive
audio, add hand-built subtitles or an `Attachment` (e.g. cover art). Do *not*
filter for resolution/bitrate. See `_fetch_dash_manifest` in the EXAMPLE service
filter for resolution/bitrate. See `fetch_dash_manifest` in the EXAMPLE service
for a thorough demonstration.
!!! note "Flip HDR10 → HDR10+ by hand when you know the platform embeds it"
+1 -1
View File
@@ -391,7 +391,7 @@ and base64-encoding, **excluding** `titles_*` files) and returns them under a
Source: `unshackle/core/remote_service.py`. This is the canonical consumer of the
session API and a good template for any client.
- **`RemoteClient._request`** sets `X-Secret-Key` and `User-Agent: unshackle/<version>`,
- **`RemoteClient.request`** sets `X-Secret-Key` and `User-Agent: unshackle/<version>`,
uses a 120s timeout for `POST` and 30s for `GET`/`DELETE`, and treats any
`status_code >= 400` as fatal: it logs `Server error [<error_code>]: <message>`
and raises `SystemExit(1)`.