mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-24 09:55:12 +00:00
feat(api): expose optional account-scoped title availability
This commit is contained in:
@@ -335,6 +335,19 @@ def get_titles(self) -> Titles_T:
|
||||
])
|
||||
```
|
||||
|
||||
### Optional availability metadata
|
||||
|
||||
A service may set `title.data["availability"]` to a dict with two optional fields:
|
||||
|
||||
- `paid`: a boolean describing the catalogue offer, not the account's entitlement.
|
||||
- `access`: `"granted"`, `"denied"`, or `"unknown"` for the authenticated account.
|
||||
Report `"denied"` only when the platform explicitly confirms lack of access.
|
||||
Missing or unverified access is not denial.
|
||||
|
||||
Only these allowlisted fields reach the REST API as `availability`, including
|
||||
through remote title reconstruction. The CLI's `--list-titles` does not display
|
||||
them, and nothing in core reads them to select or authorize downloads.
|
||||
|
||||
Common constructor fields:
|
||||
|
||||
=== "Movie"
|
||||
|
||||
@@ -283,6 +283,7 @@ These keys are sent only when the title carries them, so a title without them se
|
||||
|
||||
| Key | Type | On | Meaning |
|
||||
| --- | --- | --- | --- |
|
||||
| `availability` | object | all | Optional account-scoped metadata: `paid` is a boolean describing the catalogue offer; `access` is `"granted"`, `"denied"`, or `"unknown"`. Both fields are optional; missing or unknown access is not denial. Only these allowlisted fields are forwarded, including through remote services. |
|
||||
| `part` | integer | episode | Part index of a [split episode](../creating-a-service.md#split-episodes), counting from 1. |
|
||||
| `air_date` | string | episode | ISO air date of [daily and date-based content](../../guide/downloading.md#daily-and-date-based-content). unshackle names the episode by date instead of `SxxExx`. |
|
||||
| `absolute` | integer | episode | Absolute episode number across all seasons. |
|
||||
|
||||
Reference in New Issue
Block a user