Deployed 3bdca22b with MkDocs version: 1.6.1

This commit is contained in:
2026-12-04 23:35:53 +00:00
parent 52a6d28dec
commit 0ddd1d508a
8 changed files with 258 additions and 195 deletions
+8
View File
@@ -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.&lt;TAG&gt;.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
+1 -1
View File
@@ -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>
+49 -2
View File
@@ -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">&para;</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: &lt;TAG&gt;: 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">&para;</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>,
+1 -2
View File
@@ -3029,7 +3029,7 @@ that adapts to almost any request/response shape through YAML alone. A minimal e
</span></code></pre></div>
<p>The <code>custom_api</code> type supports much more: request/response field remapping,
transforms (base64/hex/JSON encoding, <code>kid:key</code> parsing), conditional parameters,
success/error detection, and vault-backed caching. Its full schema is for developers
and success/error detection. Its full schema is for developers
who integrate a bespoke CDM API. See the developer note below.</p>
<div class="admonition note">
<p class="admonition-title">Developer: full <code>custom_api</code> schema</p>
@@ -3043,7 +3043,6 @@ who integrate a bespoke CDM API. See the developer note below.</p>
<code>conditional_params</code>, <code>transforms</code>, <code>nested_params</code>, <code>exclude_params</code>) and
<code>response_mapping</code> (<code>fields</code>, <code>transforms</code>, <code>response_types</code>,
<code>success_conditions</code>, <code>error_fields</code>, <code>key_fields</code>)</li>
<li><code>caching</code> (<code>enabled</code>, <code>use_vaults</code>, <code>check_cached_first</code>)</li>
<li><code>legacy</code> and <code>timeout</code></li>
</ul>
<p>unshackle infers PlayReady mode when <code>device.type == PLAYREADY</code> or the device name
+181 -181
View File
@@ -4583,8 +4583,7 @@ option <code>chapter_fallback_name</code>. For example, <code>"Chapter {i:02}"</
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-158">158</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-159">159</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-159">159</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-160">160</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-161">161</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-162">162</a></span>
@@ -4595,19 +4594,20 @@ option <code>chapter_fallback_name</code>. For example, <code>"Chapter {i:02}"</
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-167">167</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-168">168</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-169">169</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-170">170</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.cache_identity--source--__span-0-158"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-158" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-158"></a><span class="k">def</span><span class="w"> </span><span class="nf">cache_identity</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">CacheIdentity</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-159"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-159" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-159"></a><span class="w"> </span><span class="sd">"""The cache, and the title ID, region and account that this source files its cached titles and metadata under.</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-160"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-160" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-160"></a>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-161"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-161" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-161"></a><span class="sd"> A service keeps its title ID in ``title`` or ``title_id``, whichever it sets.</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-162"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-162" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-162"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-163"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-163" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-163"></a> <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"title"</span><span class="p">):</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-164"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-164" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-164"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">title</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-165"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-165" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-165"></a> <span class="k">elif</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"title_id"</span><span class="p">):</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-166"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-166" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-166"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">title_id</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-167"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-167" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-167"></a> <span class="k">else</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-168"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-168" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-168"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="kc">None</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-169"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-169" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-169"></a> <span class="n">account</span> <span class="o">=</span> <span class="n">get_account_hash</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">credential</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">cookie_file</span><span class="p">)</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-170"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-170" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-170"></a> <span class="k">return</span> <span class="n">CacheIdentity</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">title_cache</span><span class="p">,</span> <span class="n">title_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">current_region</span><span class="p">,</span> <span class="n">account</span><span class="p">)</span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-170">170</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-171">171</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.cache_identity--source--__span-0-159"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-159" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-159"></a><span class="k">def</span><span class="w"> </span><span class="nf">cache_identity</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">CacheIdentity</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-160"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-160" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-160"></a><span class="w"> </span><span class="sd">"""The cache, and the title ID, region and account that this source files its cached titles and metadata under.</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-161"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-161" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-161"></a>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-162"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-162" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-162"></a><span class="sd"> A service keeps its title ID in ``title`` or ``title_id``, whichever it sets.</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-163"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-163" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-163"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-164"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-164" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-164"></a> <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"title"</span><span class="p">):</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-165"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-165" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-165"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">title</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-166"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-166" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-166"></a> <span class="k">elif</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"title_id"</span><span class="p">):</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-167"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-167" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-167"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">title_id</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-168"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-168" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-168"></a> <span class="k">else</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-169"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-169" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-169"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="kc">None</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-170"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-170" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-170"></a> <span class="n">account</span> <span class="o">=</span> <span class="n">get_account_hash</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">credential</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">cookie_file</span><span class="p">)</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-171"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-171" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-171"></a> <span class="k">return</span> <span class="n">CacheIdentity</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">title_cache</span><span class="p">,</span> <span class="n">title_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">current_region</span><span class="p">,</span> <span class="n">account</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4641,8 +4641,7 @@ option <code>chapter_fallback_name</code>. For example, <code>"Chapter {i:02}"</
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-176">176</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-177">177</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-177">177</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-178">178</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-179">179</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-180">180</a></span>
@@ -4654,20 +4653,21 @@ option <code>chapter_fallback_name</code>. For example, <code>"Chapter {i:02}"</
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-186">186</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-187">187</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-188">188</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-189">189</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-176"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-176" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-176"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_service_certificate</span><span class="p">(</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-177"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-177" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-177"></a> <span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-178"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-178" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-178"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-179"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-179" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-179"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-180"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-180" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-180"></a><span class="sd"> Get the Widevine Service Certificate used for Privacy Mode.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-181"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-181" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-181"></a>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-182"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-182" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-182"></a><span class="sd"> :param challenge: The service challenge, providing this to a License endpoint should return the</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-183"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-183" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-183"></a><span class="sd"> privacy certificate that the service uses.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-184"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-184" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-184"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-185"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-185" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-185"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-186"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-186" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-186"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-187"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-187" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-187"></a><span class="sd"> :return: The Service Privacy Certificate as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-188"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-188" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-188"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-189"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-189" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-189"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-189">189</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-190">190</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-177"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-177" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-177"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_service_certificate</span><span class="p">(</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-178"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-178" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-178"></a> <span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-179"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-179" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-179"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-180"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-180" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-180"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-181"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-181" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-181"></a><span class="sd"> Get the Widevine Service Certificate used for Privacy Mode.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-182"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-182" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-182"></a>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-183"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-183" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-183"></a><span class="sd"> :param challenge: The service challenge, providing this to a License endpoint should return the</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-184"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-184" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-184"></a><span class="sd"> privacy certificate that the service uses.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-185"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-185" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-185"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-186"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-186" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-186"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-187"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-187" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-187"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-188"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-188" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-188"></a><span class="sd"> :return: The Service Privacy Certificate as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-189"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-189" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-189"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-190"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-190" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-190"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4703,8 +4703,7 @@ The service can then ban, revoke, disable, or downgrade that device.</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-191">191</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-192">192</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-192">192</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-193">193</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-194">194</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-195">195</a></span>
@@ -4720,24 +4719,25 @@ The service can then ban, revoke, disable, or downgrade that device.</p>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-205">205</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-206">206</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-207">207</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-208">208</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-191"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-191" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-191"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-192"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-192" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-192"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-193"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-193" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-193"></a><span class="sd"> Get a Widevine License message by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-194"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-194" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-194"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-195"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-195" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-195"></a><span class="sd"> This License message contains the encrypted content keys and will be</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-196"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-196" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-196"></a><span class="sd"> read by the Cdm and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-197"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-197" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-197"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-198"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-198" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-198"></a><span class="sd"> This is a very important request to get correct. A bad, unexpected, or missing</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-199"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-199" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-199"></a><span class="sd"> value in the request can cause the service to detect your CDM device.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-200"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-200" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-200"></a><span class="sd"> The service can then ban, revoke, disable, or downgrade that device.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-201"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-201" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-201"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-202"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-202" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-202"></a><span class="sd"> :param challenge: The license challenge from the Widevine CDM.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-203"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-203" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-203"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-204"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-204" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-204"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-205"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-205" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-205"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-206"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-206" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-206"></a><span class="sd"> :return: The License response as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-207"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-207" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-207"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-208"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-208" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-208"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-208">208</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-209">209</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-192"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-192" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-192"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-193"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-193" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-193"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-194"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-194" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-194"></a><span class="sd"> Get a Widevine License message by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-195"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-195" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-195"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-196"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-196" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-196"></a><span class="sd"> This License message contains the encrypted content keys and will be</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-197"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-197" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-197"></a><span class="sd"> read by the Cdm and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-198"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-198" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-198"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-199"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-199" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-199"></a><span class="sd"> This is a very important request to get correct. A bad, unexpected, or missing</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-200"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-200" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-200"></a><span class="sd"> value in the request can cause the service to detect your CDM device.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-201"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-201" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-201"></a><span class="sd"> The service can then ban, revoke, disable, or downgrade that device.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-202"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-202" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-202"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-203"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-203" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-203"></a><span class="sd"> :param challenge: The license challenge from the Widevine CDM.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-204"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-204" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-204"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-205"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-205" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-205"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-206"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-206" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-206"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-207"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-207" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-207"></a><span class="sd"> :return: The License response as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-208"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-208" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-208"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-209"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-209" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-209"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4773,8 +4773,7 @@ The service can then ban, revoke, disable, or downgrade that device.</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-210">210</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-211">211</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-211">211</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-212">212</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-213">213</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-214">214</a></span>
@@ -4795,29 +4794,30 @@ The service can then ban, revoke, disable, or downgrade that device.</p>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-229">229</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-230">230</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-231">231</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-232">232</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-210"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-210" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-210"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_playready_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-211"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-211" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-211"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-212"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-212" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-212"></a><span class="sd"> Get a PlayReady License message by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-213"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-213" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-213"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-214"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-214" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-214"></a><span class="sd"> This License message contains the encrypted content keys and will be</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-215"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-215" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-215"></a><span class="sd"> read by the CDM and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-216"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-216" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-216"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-217"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-217" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-217"></a><span class="sd"> This is a very important request to get correct. A bad, unexpected, or missing</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-218"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-218" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-218"></a><span class="sd"> value in the request can cause the service to detect your CDM device.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-219"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-219" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-219"></a><span class="sd"> The service can then ban, revoke, disable, or downgrade that device.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-220"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-220" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-220"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-221"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-221" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-221"></a><span class="sd"> :param challenge: The license challenge from the PlayReady CDM.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-222"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-222" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-222"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-223"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-223" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-223"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-224"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-224" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-224"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-225"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-225" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-225"></a><span class="sd"> :return: The License response as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-226"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-226" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-226"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-227"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-227" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-227"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-228"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-228" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-228"></a> <span class="c1"># A service that implements Widevine licensing only still gets PlayReady, with the</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-229"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-229" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-229"></a> <span class="c1"># arguments its own signature declares.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-230"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-230" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-230"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span><span class="p">(</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-231"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-231" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-231"></a> <span class="o">**</span><span class="n">declared_kwargs</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span><span class="p">,</span> <span class="p">{</span><span class="s2">"challenge"</span><span class="p">:</span> <span class="n">challenge</span><span class="p">,</span> <span class="s2">"title"</span><span class="p">:</span> <span class="n">title</span><span class="p">,</span> <span class="s2">"track"</span><span class="p">:</span> <span class="n">track</span><span class="p">})</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-232"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-232" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-232"></a> <span class="p">)</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-232">232</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-233">233</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-211"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-211" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-211"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_playready_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-212"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-212" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-212"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-213"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-213" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-213"></a><span class="sd"> Get a PlayReady License message by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-214"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-214" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-214"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-215"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-215" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-215"></a><span class="sd"> This License message contains the encrypted content keys and will be</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-216"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-216" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-216"></a><span class="sd"> read by the CDM and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-217"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-217" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-217"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-218"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-218" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-218"></a><span class="sd"> This is a very important request to get correct. A bad, unexpected, or missing</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-219"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-219" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-219"></a><span class="sd"> value in the request can cause the service to detect your CDM device.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-220"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-220" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-220"></a><span class="sd"> The service can then ban, revoke, disable, or downgrade that device.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-221"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-221" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-221"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-222"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-222" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-222"></a><span class="sd"> :param challenge: The license challenge from the PlayReady CDM.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-223"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-223" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-223"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-224"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-224" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-224"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-225"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-225" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-225"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-226"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-226" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-226"></a><span class="sd"> :return: The License response as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-227"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-227" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-227"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-228"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-228" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-228"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-229"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-229" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-229"></a> <span class="c1"># A service that implements Widevine licensing only still gets PlayReady, with the</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-230"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-230" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-230"></a> <span class="c1"># arguments its own signature declares.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-231"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-231" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-231"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span><span class="p">(</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-232"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-232" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-232"></a> <span class="o">**</span><span class="n">declared_kwargs</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span><span class="p">,</span> <span class="p">{</span><span class="s2">"challenge"</span><span class="p">:</span> <span class="n">challenge</span><span class="p">,</span> <span class="s2">"title"</span><span class="p">:</span> <span class="n">title</span><span class="p">,</span> <span class="s2">"track"</span><span class="p">:</span> <span class="n">track</span><span class="p">})</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-233"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-233" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-233"></a> <span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4853,8 +4853,7 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-234">234</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-235">235</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-235">235</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-236">236</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-237">237</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-238">238</a></span>
@@ -4870,24 +4869,25 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-248">248</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-249">249</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-250">250</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-251">251</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-234"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-234" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-234"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_clearkey_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-235"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-235" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-235"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-236"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-236" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-236"></a><span class="sd"> Get a W3C ClearKey License (JWK Set) by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-237"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-237" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-237"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-238"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-238" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-238"></a><span class="sd"> Used for DASH `org.w3.clearkey` tracks. unshackle uses no CDM here: the challenge is</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-239"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-239" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-239"></a><span class="sd"> the W3C EME JSON license request, e.g. ``{"kids": ["&lt;base64url&gt;"], "type": "temporary"}``,</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-240"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-240" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-240"></a><span class="sd"> and the license is a JWK Set, e.g. ``{"keys": [{"kty": "oct", "k": "...", "kid": "..."}]}``.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-241"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-241" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-241"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-242"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-242" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-242"></a><span class="sd"> :param challenge: The JSON license request bytes to POST to the license server.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-243"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-243" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-243"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-244"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-244" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-244"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-245"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-245" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-245"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-246"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-246" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-246"></a><span class="sd"> :return: The JWK Set license as a dict, JSON str, or raw bytes. Return None (the default)</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-247"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-247" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-247"></a><span class="sd"> to let the framework POST the challenge to the manifest-provided Laurl, if any.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-248"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-248" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-248"></a><span class="sd"> Services with no license server can instead pre-populate the DRM object's</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-249"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-249" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-249"></a><span class="sd"> `signatures` in get_tracks.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-250"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-250" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-250"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-251"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-251" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-251"></a> <span class="k">return</span> <span class="kc">None</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-251">251</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-252">252</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-235"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-235" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-235"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_clearkey_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-236"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-236" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-236"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-237"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-237" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-237"></a><span class="sd"> Get a W3C ClearKey License (JWK Set) by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-238"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-238" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-238"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-239"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-239" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-239"></a><span class="sd"> Used for DASH `org.w3.clearkey` tracks. unshackle uses no CDM here: the challenge is</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-240"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-240" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-240"></a><span class="sd"> the W3C EME JSON license request, e.g. ``{"kids": ["&lt;base64url&gt;"], "type": "temporary"}``,</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-241"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-241" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-241"></a><span class="sd"> and the license is a JWK Set, e.g. ``{"keys": [{"kty": "oct", "k": "...", "kid": "..."}]}``.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-242"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-242" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-242"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-243"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-243" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-243"></a><span class="sd"> :param challenge: The JSON license request bytes to POST to the license server.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-244"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-244" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-244"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-245"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-245" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-245"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-246"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-246" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-246"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-247"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-247" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-247"></a><span class="sd"> :return: The JWK Set license as a dict, JSON str, or raw bytes. Return None (the default)</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-248"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-248" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-248"></a><span class="sd"> to let the framework POST the challenge to the manifest-provided Laurl, if any.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-249"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-249" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-249"></a><span class="sd"> Services with no license server can instead pre-populate the DRM object's</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-250"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-250" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-250"></a><span class="sd"> `signatures` in get_tracks.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-251"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-251" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-251"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-252"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-252" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-252"></a> <span class="k">return</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4914,19 +4914,19 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-253">253</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-254">254</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-254">254</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-255">255</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-256">256</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-257">257</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-258">258</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-259">259</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-253"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-253" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-253"></a><span class="k">def</span><span class="w"> </span><span class="nf">fairplay_bridge</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span><span class="p">[</span><span class="o">...</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-254"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-254" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-254"></a><span class="w"> </span><span class="sd">"""The service's ``get_fairplay_bridge_license``, or None: only a service with it gets FairPlay-only tracks bridged.</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-255"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-255" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-255"></a>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-256"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-256" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-256"></a><span class="sd"> The hook gets a PlayReady or Widevine challenge for the key IDs of the init segments, with ``challenge``,</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-257"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-257" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-257"></a><span class="sd"> ``title``, ``track``, ``drm_system`` and the extras of that system's licence callback.</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-258"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-258" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-258"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-259"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-259" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-259"></a> <span class="k">return</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"get_fairplay_bridge_license"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-259">259</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-260">260</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-254"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-254" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-254"></a><span class="k">def</span><span class="w"> </span><span class="nf">fairplay_bridge</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span><span class="p">[</span><span class="o">...</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-255"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-255" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-255"></a><span class="w"> </span><span class="sd">"""The service's ``get_fairplay_bridge_license``, or None: only a service with it gets FairPlay-only tracks bridged.</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-256"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-256" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-256"></a>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-257"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-257" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-257"></a><span class="sd"> The hook gets a PlayReady or Widevine challenge for the key IDs of the init segments, with ``challenge``,</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-258"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-258" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-258"></a><span class="sd"> ``title``, ``track``, ``drm_system`` and the extras of that system's licence callback.</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-259"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-259" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-259"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-260"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-260" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-260"></a> <span class="k">return</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"get_fairplay_bridge_license"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4951,9 +4951,9 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-277">277</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-278">278</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-277"><a id="unshackle.core.service.Service.close--source--__codelineno-0-277" name="unshackle.core.service.Service.close--source--__codelineno-0-277"></a><span class="k">def</span><span class="w"> </span><span class="nf">close</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.close--source--__span-0-278"><a id="unshackle.core.service.Service.close--source--__codelineno-0-278" name="unshackle.core.service.Service.close--source--__codelineno-0-278"></a><span class="w"> </span><span class="sd">"""Release what the source holds open once dl has finished every title."""</span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-278">278</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-279">279</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-278"><a id="unshackle.core.service.Service.close--source--__codelineno-0-278" name="unshackle.core.service.Service.close--source--__codelineno-0-278"></a><span class="k">def</span><span class="w"> </span><span class="nf">close</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.close--source--__span-0-279"><a id="unshackle.core.service.Service.close--source--__codelineno-0-279" name="unshackle.core.service.Service.close--source--__codelineno-0-279"></a><span class="w"> </span><span class="sd">"""Release what the source holds open once dl has finished every title."""</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4978,11 +4978,11 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-282">282</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-283">283</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-284">284</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-282"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-282" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-282"></a><span class="k">def</span><span class="w"> </span><span class="nf">decrypts_samples</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-283"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-283" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-283"></a><span class="w"> </span><span class="sd">"""Whether this service decrypts the cbcs file of `track` after the download, through `get_sample_decrypter`."""</span>
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-284"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-284" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-284"></a> <span class="k">return</span> <span class="kc">False</span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-283">283</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-284">284</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-285">285</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-283"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-283" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-283"></a><span class="k">def</span><span class="w"> </span><span class="nf">decrypts_samples</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-284"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-284" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-284"></a><span class="w"> </span><span class="sd">"""Whether this service decrypts the cbcs file of `track` after the download, through `get_sample_decrypter`."""</span>
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-285"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-285" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-285"></a> <span class="k">return</span> <span class="kc">False</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5009,19 +5009,19 @@ runs it on the server, so a decrypter that needs a local process works for remot
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-286">286</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-287">287</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-287">287</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-288">288</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-289">289</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-290">290</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-291">291</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-292">292</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-286"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-286" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-286"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">entry</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-287"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-287" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-287"></a><span class="w"> </span><span class="sd">"""The content key, or a `cbcs.SampleDecrypter`, for `stsd` entry `entry` (1-based) of `track`.</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-288"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-288" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-288"></a>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-289"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-289" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-289"></a><span class="sd"> unshackle calls this only for a track `decrypts_samples` names, before TRACK_DOWNLOADED. A remote session</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-290"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-290" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-290"></a><span class="sd"> runs it on the server, so a decrypter that needs a local process works for remote clients too.</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-291"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-291" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-291"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-292"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-292" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-292"></a> <span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2"> does not decrypt samples"</span><span class="p">)</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-292">292</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-293">293</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-287"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-287" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-287"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">entry</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-288"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-288" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-288"></a><span class="w"> </span><span class="sd">"""The content key, or a `cbcs.SampleDecrypter`, for `stsd` entry `entry` (1-based) of `track`.</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-289"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-289" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-289"></a>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-290"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-290" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-290"></a><span class="sd"> unshackle calls this only for a track `decrypts_samples` names, before TRACK_DOWNLOADED. A remote session</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-291"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-291" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-291"></a><span class="sd"> runs it on the server, so a decrypter that needs a local process works for remote clients too.</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-292"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-292" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-292"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-293"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-293" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-293"></a> <span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2"> does not decrypt samples"</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5046,11 +5046,11 @@ runs it on the server, so a decrypter that needs a local process works for remot
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-294">294</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-295">295</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-296">296</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-294"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-294" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-294"></a><span class="k">def</span><span class="w"> </span><span class="nf">sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span><span class="p">[[</span><span class="nb">int</span><span class="p">],</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-295"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-295" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-295"></a><span class="w"> </span><span class="sd">"""`get_sample_decrypter` for `track`, when `decrypts_samples` names it."""</span>
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-296"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-296" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-296"></a> <span class="k">return</span> <span class="n">partial</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_sample_decrypter</span><span class="p">,</span> <span class="n">track</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">decrypts_samples</span><span class="p">(</span><span class="n">track</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-295">295</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-296">296</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-297">297</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-295"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-295" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-295"></a><span class="k">def</span><span class="w"> </span><span class="nf">sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span><span class="p">[[</span><span class="nb">int</span><span class="p">],</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-296"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-296" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-296"></a><span class="w"> </span><span class="sd">"""`get_sample_decrypter` for `track`, when `decrypts_samples` names it."""</span>
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-297"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-297" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-297"></a> <span class="k">return</span> <span class="n">partial</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_sample_decrypter</span><span class="p">,</span> <span class="n">track</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">decrypts_samples</span><span class="p">(</span><span class="n">track</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5122,21 +5122,21 @@ runs it on the server, so a decrypter that needs a local process works for remot
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-300">300</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-301">301</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-301">301</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-302">302</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-303">303</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-304">304</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-305">305</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-306">306</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-307">307</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-300"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-300" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-300"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_segment_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">Path</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-301"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-301" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-301"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-302"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-302" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-302"></a><span class="sd"> Called when one of a Track's Segments has finished downloading.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-303"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-303" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-303"></a>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-304"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-304" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-304"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-305"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-305" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-305"></a><span class="sd"> track: The Track object that had a Segment downloaded.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-306"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-306" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-306"></a><span class="sd"> segment: The Path to the downloaded Segment.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-307"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-307" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-307"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-307">307</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-308">308</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-301"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-301" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-301"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_segment_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">Path</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-302"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-302" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-302"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-303"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-303" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-303"></a><span class="sd"> Called when one of a Track's Segments has finished downloading.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-304"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-304" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-304"></a>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-305"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-305" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-305"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-306"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-306" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-306"></a><span class="sd"> track: The Track object that had a Segment downloaded.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-307"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-307" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-307"></a><span class="sd"> segment: The Path to the downloaded Segment.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-308"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-308" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-308"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5193,21 +5193,21 @@ In a licence-only run the track has no file.</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-309">309</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-310">310</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-310">310</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-311">311</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-312">312</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-313">313</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-314">314</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-315">315</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-316">316</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-309"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-309" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-309"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-310"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-310" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-310"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-311"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-311" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-311"></a><span class="sd"> Called once when a Track has finished downloading, after unshackle decrypted it.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-312"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-312" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-312"></a><span class="sd"> In a licence-only run the track has no file.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-313"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-313" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-313"></a>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-314"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-314" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-314"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-315"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-315" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-315"></a><span class="sd"> track: The downloaded Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-316"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-316" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-316"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-316">316</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-317">317</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-310"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-310" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-310"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-311"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-311" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-311"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-312"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-312" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-312"></a><span class="sd"> Called once when a Track has finished downloading, after unshackle decrypted it.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-313"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-313" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-313"></a><span class="sd"> In a licence-only run the track has no file.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-314"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-314" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-314"></a>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-315"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-315" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-315"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-316"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-316" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-316"></a><span class="sd"> track: The downloaded Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-317"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-317" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-317"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5296,8 +5296,7 @@ for an HLS track that merged during the download (merge_segments).</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-318">318</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-319">319</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-319">319</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-320">320</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-321">321</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-322">322</a></span>
@@ -5305,16 +5304,17 @@ for an HLS track that merged during the download (merge_segments).</p>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-324">324</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-325">325</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-326">326</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-327">327</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-318"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-318" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-318"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_decrypted</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">drm</span><span class="p">:</span> <span class="n">DRM_T</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">m3u8</span><span class="o">.</span><span class="n">Segment</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-319"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-319" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-319"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-320"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-320" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-320"></a><span class="sd"> Called when a Track has finished decrypting.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-321"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-321" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-321"></a>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-322"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-322" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-322"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-323"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-323" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-323"></a><span class="sd"> track: The decrypted Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-324"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-324" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-324"></a><span class="sd"> drm: The DRM object it decrypted with. None for a track `get_sample_decrypter` decrypted.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-325"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-325" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-325"></a><span class="sd"> segment: The decrypted HLS segment information. None for DASH and ISM tracks and</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-326"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-326" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-326"></a><span class="sd"> for an HLS track that merged during the download (merge_segments).</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-327"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-327" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-327"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-327">327</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-328">328</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-319"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-319" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-319"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_decrypted</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">drm</span><span class="p">:</span> <span class="n">DRM_T</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">m3u8</span><span class="o">.</span><span class="n">Segment</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-320"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-320" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-320"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-321"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-321" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-321"></a><span class="sd"> Called when a Track has finished decrypting.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-322"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-322" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-322"></a>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-323"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-323" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-323"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-324"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-324" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-324"></a><span class="sd"> track: The decrypted Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-325"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-325" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-325"></a><span class="sd"> drm: The DRM object it decrypted with. None for a track `get_sample_decrypter` decrypted.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-326"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-326" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-326"></a><span class="sd"> segment: The decrypted HLS segment information. None for DASH and ISM tracks and</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-327"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-327" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-327"></a><span class="sd"> for an HLS track that merged during the download (merge_segments).</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-328"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-328" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-328"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5370,19 +5370,19 @@ for an HLS track that merged during the download (merge_segments).</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-329">329</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-330">330</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-330">330</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-331">331</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-332">332</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-333">333</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-334">334</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-335">335</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-329"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-329" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-329"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_repacked</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-330"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-330" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-330"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-331"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-331" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-331"></a><span class="sd"> Called when a Track has finished repacking.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-332"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-332" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-332"></a>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-333"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-333" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-333"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-334"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-334" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-334"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-335"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-335" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-335"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-335">335</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-336">336</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-330"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-330" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-330"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_repacked</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-331"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-331" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-331"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-332"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-332" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-332"></a><span class="sd"> Called when a Track has finished repacking.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-333"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-333" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-333"></a>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-334"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-334" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-334"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-335"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-335" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-335"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-336"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-336" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-336"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5441,8 +5441,7 @@ MP4 with FFmpeg/mp4box.</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-337">337</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-338">338</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-338">338</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-339">339</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-340">340</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-341">341</a></span>
@@ -5451,17 +5450,18 @@ MP4 with FFmpeg/mp4box.</p>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-344">344</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-345">345</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-346">346</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-347">347</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-337"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-337" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-337"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_multiplex</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-338"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-338" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-338"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-339"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-339" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-339"></a><span class="sd"> Called immediately before unshackle multiplexes a Track into a Container.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-340"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-340" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-340"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-341"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-341" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-341"></a><span class="sd"> Note: Right now unshackle multiplexes only MKV containers. In the future</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-342"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-342" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-342"></a><span class="sd"> unshackle can also call this when it multiplexes to other containers like</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-343"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-343" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-343"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-344"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-344" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-344"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-345"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-345" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-345"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-346"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-346" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-346"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-347"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-347" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-347"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-347">347</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-348">348</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-338"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-338" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-338"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_multiplex</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-339"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-339" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-339"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-340"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-340" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-340"></a><span class="sd"> Called immediately before unshackle multiplexes a Track into a Container.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-341"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-341" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-341"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-342"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-342" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-342"></a><span class="sd"> Note: Right now unshackle multiplexes only MKV containers. In the future</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-343"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-343" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-343"></a><span class="sd"> unshackle can also call this when it multiplexes to other containers like</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-344"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-344" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-344"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-345"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-345" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-345"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-346"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-346" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-346"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-347"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-347" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-347"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-348"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-348" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-348"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
+7 -7
View File
@@ -2149,7 +2149,8 @@ licenses the remote session.
On a server, an API key can replace the entry for a service with its own (see
<a href="../services/#serve"><code>serve</code></a>).
With only the top-level <code>default</code> entry, the server CDM licenses when the API key has it. Set
<code>server_cdm: true</code> on the server entry to keep a per-service entry for local runs only. See
<code>server_cdm: true</code> on the server entry to keep a per-service entry for local runs only. Its device
then licenses only a track that the server refuses or fails to license. See
<a href="../services/#remote_services"><code>remote_services</code></a>.</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nt">cdm</span><span class="p">:</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="w"> </span><span class="nt">default</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">chromecdm_l3</span>
@@ -2220,7 +2221,7 @@ the default device of the plugin when its entry names no device of that system.<
<tr>
<td><code>custom_api</code></td>
<td>Fully YAML-configurable remote API</td>
<td><code>host</code> (required), <code>device</code>, <code>auth</code>, <code>endpoints</code>, <code>request_mapping</code>, <code>response_mapping</code>, <code>caching</code>, <code>timeout</code> (<a href="#remote-cdm-custom-api">fields</a>)</td>
<td><code>host</code> (required), <code>device</code>, <code>auth</code>, <code>endpoints</code>, <code>request_mapping</code>, <code>response_mapping</code>, <code>timeout</code> (<a href="#remote-cdm-custom-api">fields</a>)</td>
</tr>
<tr>
<td><em>(none)</em>, <code>Device Type: PLAYREADY</code></td>
@@ -2343,11 +2344,6 @@ configuration error.</p>
<td>Per endpoint: <code>fields</code>, <code>transforms</code>, <code>response_types</code>, <code>success_conditions</code>, <code>error_fields</code>, <code>key_fields</code></td>
</tr>
<tr>
<td><code>caching</code></td>
<td>dict</td>
<td><code>enabled</code>, <code>use_vaults</code>, <code>check_cached_first</code></td>
</tr>
<tr>
<td><code>legacy</code></td>
<td>dict</td>
<td>Legacy mode options.</td>
@@ -2394,6 +2390,10 @@ service tag case-insensitively and uses the <code>default</code> entry as the fa
<p>unshackle decrypts a stereoscopic 3D (MV-HEVC) track with mp4decrypt whatever this setting says.
shaka-packager refuses its Dolby Vision configuration (version 3), and before v3.5.0 it also drops
the boxes of the second view.</p>
<p>unshackle also uses mp4decrypt, whatever this setting says, for a fragmented track whose first
<code>moof</code> gives a base data offset in its <code>tfhd</code> or has a <code>trun</code> with no data offset, as
<code>MP4Box -frag</code> writes. shaka-packager reads every sample offset from the start of the <code>moof</code>, so
it writes noise for such a track.</p>
<p>mp4decrypt finds a content key by the KID in the first <code>sinf</code> box of the track. When that box
has no CENC <code>tenc</code> (for example, a PIFF <code>sinf</code> before the CENC one), unshackle also gives
mp4decrypt the content key of that KID by track ID. When mp4decrypt copies a track through
+10 -1
View File
@@ -2125,7 +2125,10 @@ the result to the service as <code>self.config</code>. A nested config key repla
other values in the same section stay.</p>
<p>Over <code>--remote</code>, the server builds the service from its own config. The client sends only the
config keys that the service lists for a client identity, see
<a href="../../../dev/rest-api/remote-sessions/#your-own-device-identity">your own device identity</a>.
<a href="../../../dev/rest-api/remote-sessions/#your-own-device-identity">your own device identity</a>,
and the strings, numbers and booleans of its <code>preferences</code> block. Each preference that you set
replaces the server's value for that config key, in every licensing mode, see
<a href="../../../dev/rest-api/remote-sessions/#your-preferences">your preferences</a>.
For every other setting, the value in the server's config applies.</p>
<p>User- or device-specific values (API keys, account IDs, device attributes) belong in this block
rather than in the service's own <code>config.yaml</code>, which holds shared defaults. See
@@ -2216,6 +2219,12 @@ applies to remote runs:</p>
</span></code></pre></div>
<p>When the server refuses the server CDM for a service whose <code>cdm</code> entry loaded the device,
unshackle logs the fallback to that device as info, not as a warning.</p>
<p>The same device licenses a track when the server licence for that track fails, for example with a
server error or an answer with no content key for the track. unshackle logs one info line that
gives the server failure and the device. Without a <code>cdm</code> entry for the service that names the
loaded device, a failed server licence stops the run with one <code>DRM_ERROR</code> line: unshackle never
falls back to the device of the <code>default</code> entry. When the fallback device also fails, the run
stops at the licence step of that track.</p>
<p>The server has the last word. When it keeps the server CDM for a remote session that your
device was to license, unshackle shows a warning. This occurs with a server that does not read
your choice, and with a service option that runs the remote session on the server's device.</p>
File diff suppressed because one or more lines are too long