mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 07:25:08 +00:00
Deployed 3bdca22b with MkDocs version: 1.6.1
This commit is contained in:
@@ -2436,6 +2436,14 @@ split is exactly why every URL lives in <code>config.yaml</code> with <code>{}</
|
||||
placeholders while the secrets that fill them stay out of it. Both halves
|
||||
read back through the same <code>self.config[...]</code>.</p>
|
||||
</div>
|
||||
<div class="admonition tip">
|
||||
<p class="admonition-title">User choices go under <code>preferences</code></p>
|
||||
<p>Put each choice a user makes (a metadata language, a subtitle format) under
|
||||
<code>preferences</code> in <code>config.yaml</code>, and read it from <code>self.config["preferences"]</code>.
|
||||
Over <code>--remote</code>, the client's own <code>services.<TAG>.preferences</code> values reach
|
||||
that block on the server with no extra code. See
|
||||
<a href="../rest-api/remote-sessions/#your-preferences">Your preferences</a>.</p>
|
||||
</div>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Split across files? Use relative imports</p>
|
||||
<p>If your service grows beyond a single <code>__init__.py</code>, import your own
|
||||
|
||||
@@ -2677,7 +2677,7 @@ full detail:</p>
|
||||
<tr>
|
||||
<td><code>speed</code></td>
|
||||
<td>string or <code>null</code></td>
|
||||
<td>Transfer speed of the track in progress, e.g. <code>4.20 MB/s</code>. <code>null</code> when no track downloads.</td>
|
||||
<td>Transfer speed of the track in progress, e.g. <code>4.2 MB/s</code>. <code>null</code> when no track downloads.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>skipped_subtitles</code></td>
|
||||
|
||||
@@ -1762,6 +1762,17 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#your-preferences" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Your preferences
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -2300,6 +2311,17 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#your-preferences" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Your preferences
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -2803,6 +2825,11 @@ See <a href="../../../reference/configuration/drm/"><code>cdm</code></a>.</p>
|
||||
<li>A content key in the client's own vaults goes first, even when the server
|
||||
already answered. The client proves it, and a server key waits as the next
|
||||
candidate.</li>
|
||||
<li>When the server licence fails, or the server gives a track no content key, your
|
||||
own device licenses the track only when the <code>cdm</code> entry for the service names the
|
||||
loaded device (see <a href="../../../reference/configuration/services/#remote_services"><code>remote_services</code></a>).
|
||||
Otherwise, or when that device also fails, the run stops at the licence step of
|
||||
that track with one <code>DRM_ERROR</code> line.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2857,7 +2884,7 @@ licence at all: each content key comes from the server vault or the client's own
|
||||
and a content key that no vault holds stops the download with an error that names its KID,
|
||||
when the client knows it. The create response sets <code>server_device</code> to <code>true</code> for such a
|
||||
remote session. The service then uses the server's own config: the client's identity
|
||||
values do not apply. The client reads the
|
||||
values do not apply, but its preferences do (see <a href="#your-preferences">Your preferences</a>). The client reads the
|
||||
server vault only when the API key has the <code>server_vault</code> grant (or <code>server_cdm</code>); without
|
||||
it, the client reads only its own vaults. The login tokens of such a remote session hold the
|
||||
server's device identity, so the server keeps them: <code>DELETE</code> returns no cache files, and the
|
||||
@@ -2869,6 +2896,25 @@ device licenses still takes content keys from the server vault. The server tries
|
||||
vault first. A track that no server vault holds goes back to your device. See
|
||||
<a href="../../../reference/configuration/services/"><code>server_vault</code></a>.</p>
|
||||
</div>
|
||||
<h3 id="your-preferences">Your preferences<a class="headerlink" href="#your-preferences" title="Permanent link">¶</a></h3>
|
||||
<p>The <code>preferences</code> block of a service is the place for user choices, such as a metadata
|
||||
language or a subtitle format. It is not an identity, so it crosses <code>--remote</code> in every
|
||||
licensing mode, whatever CDM the client has, and no service declares anything for it:</p>
|
||||
<ul>
|
||||
<li>The client sends each entry of its own <code>services: <TAG>: preferences:</code> block in
|
||||
<code>unshackle.yaml</code> that is a string, a number or a boolean. It leaves out other entries and
|
||||
logs one debug line for each.</li>
|
||||
<li>The server merges the entries key by key over its own <code>preferences</code> block for that
|
||||
service. An entry that the client sends replaces the server's value, and a config key that
|
||||
the client does not send keeps the server's value. The entries never count as an identity,
|
||||
and they stay when the service builds the remote session on the server's device.</li>
|
||||
<li>The server refuses a <code>preferences</code> value that is not an object of strings, numbers and
|
||||
booleans with <code>INVALID_INPUT</code>.</li>
|
||||
</ul>
|
||||
<p>A service reads its preferences from <code>self.config["preferences"]</code>, locally and over
|
||||
<code>--remote</code> alike. Keep a value that changes the server's account (a profile, an account
|
||||
type) out of <code>preferences</code> unless every client of the server may choose it: a server
|
||||
account is shared, and the service can store the choice in its cache.</p>
|
||||
<hr />
|
||||
<h2 id="remote-session-lifecycle-and-expiry">Remote session lifecycle and expiry<a class="headerlink" href="#remote-session-lifecycle-and-expiry" title="Permanent link">¶</a></h2>
|
||||
<p>Remote sessions live in an <strong>in-memory store on the server</strong>. They expire on a timer, or when their client is gone. You
|
||||
@@ -3073,7 +3119,8 @@ session when the new one is stored, and the server answers the ID of another API
|
||||
<code>no_proxy</code>, <code>profile</code>, <code>cache</code> (a map of <code>filename → base64(zlib(bytes))</code>),
|
||||
<code>client_region</code>, <code>server_cdm</code> (<code>false</code> when the user picked the local CDM), <code>cdm_type</code>, <code>cdm_security_level</code>, <code>cdm_relay</code> (<code>true</code> when the client
|
||||
answers CDM calls; a plugin <code>cdm_type</code> gets no relay), <code>cdm_system_id</code> and <code>cdm_device_type</code> (Widevine only), <code>service_config</code>
|
||||
(the identity config keys the service lists in <code>client_config</code>), <code>plugins</code> (the version of each DRM plugin of the
|
||||
(the identity config keys the service lists in <code>client_config</code>, and the client's
|
||||
<a href="#your-preferences">preferences</a>), <code>plugins</code> (the version of each DRM plugin of the
|
||||
client and the values of the plugin device attributes that the plugin names in <code>device_facts</code>; see
|
||||
<a href="../endpoints/#post-apisessioncreate">endpoints</a>), <code>client</code> (a freeform identity
|
||||
object the dashboard shows as sent), and the track-selection hints <code>range_</code>, <code>vcodec</code>,
|
||||
|
||||
Reference in New Issue
Block a user