Deployed 3b6bd02e with MkDocs version: 1.6.1

This commit is contained in:
2026-12-02 22:25:59 +00:00
parent e09254fdaf
commit db7b0bba39
14 changed files with 656 additions and 276 deletions
+182 -55
View File
@@ -2246,6 +2246,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.kids" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;kids
</span>
</a>
</li>
<li class="md-nav__item">
@@ -2282,10 +2293,10 @@
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.content_keys" class="md-nav__link">
<a href="#unshackle.core.drm.MonaLisa.tool" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;content_keys
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;tool
</span>
</a>
@@ -2373,6 +2384,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.to_dict" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;to_dict
</span>
</a>
</li>
<li class="md-nav__item">
@@ -2682,6 +2704,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.monalisa_drm" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-function"></code>&nbsp;monalisa_drm
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3096,6 +3129,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.kids" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;kids
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3132,10 +3176,10 @@
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.content_keys" class="md-nav__link">
<a href="#unshackle.core.drm.MonaLisa.tool" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;content_keys
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;tool
</span>
</a>
@@ -3223,6 +3267,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.to_dict" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;to_dict
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3532,6 +3587,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.monalisa_drm" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-function"></code>&nbsp;monalisa_drm
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4411,13 +4477,15 @@ A cipher built with <code>key</code> holds its content key from the start.
<a href="#unshackle.core.drm.MonaLisa" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="language-python doc-signature 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="nf">MonaLisa</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="n">ticket</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">device_path</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="n">ticket</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">device_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> <span class="n">tool_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">command_builder</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">segment_decrypt</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a><span class="p">)</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">segment_decrypt</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> <span class="o">*</span><span class="p">,</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a> <span class="n">kid</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-10"><a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
@@ -4448,7 +4516,7 @@ directly, and a WASM module extracts the content keys locally.</p>
<code>ticket</code>
</td>
<td>
<code><span title="str">str</span> | <span title="bytes">bytes</span></code>
<code><span title="str">str</span> | <span title="bytes">bytes</span> | None</code>
</td>
<td>
<div class="doc-md-description">
@@ -4456,7 +4524,7 @@ directly, and a WASM module extracts the content keys locally.</p>
</div>
</td>
<td>
<em>required</em>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
@@ -4464,7 +4532,7 @@ directly, and a WASM module extracts the content keys locally.</p>
<code>device_path</code>
</td>
<td>
<code><span title="pathlib.Path">Path</span></code>
<code><span title="pathlib.Path">Path</span> | None</code>
</td>
<td>
<div class="doc-md-description">
@@ -4472,7 +4540,7 @@ directly, and a WASM module extracts the content keys locally.</p>
</div>
</td>
<td>
<em>required</em>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
@@ -4484,7 +4552,8 @@ directly, and a WASM module extracts the content keys locally.</p>
</td>
<td>
<div class="doc-md-description">
<p>Optional path to an external decryption binary.</p>
<p>Optional path to an external decryption binary; without it, this machine's
tool (<code>local_tool</code>) decrypts, else the built-in BBTS decrypter.</p>
</div>
</td>
<td>
@@ -4496,12 +4565,12 @@ directly, and a WASM module extracts the content keys locally.</p>
<code>command_builder</code>
</td>
<td>
<code><span title="collections.abc.Callable">Callable</span>[[<span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="str">str</span>, <span title="str">str</span>], <span title="collections.abc.Sequence">Sequence</span>[<span title="str">str</span> | <span title="pathlib.Path">Path</span>]] | None</code>
<code><span title="unshackle.core.drm.monalisa.CommandBuilder">CommandBuilder</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Optional callback <code>(tool_path, src, dst, kid_hex, key_hex) -&gt; args</code>
that builds the decryption CLI invocation (default: <code>-i src -o dst -k kid:key</code>).</p>
that builds the decryption CLI invocation (default: <code>bbtsdecrypt_command</code>).</p>
</div>
</td>
<td>
@@ -4513,15 +4582,31 @@ that builds the decryption CLI invocation (default: <code>-i src -o dst -k kid:k
<code>segment_decrypt</code>
</td>
<td>
<code><span title="bool">bool</span></code>
<code><span title="bool">bool</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Whether the external tool supports per-segment decryption.</p>
<p>Whether the decrypter supports per-segment decryption.</p>
</div>
</td>
<td>
<code>True</code>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>kid</code>
</td>
<td>
<code><span title="uuid.UUID">UUID</span> | <span title="str">str</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>The KID of a copy with no ticket, whose content key comes from elsewhere (a remote server).</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
@@ -4559,7 +4644,7 @@ that builds the decryption CLI invocation (default: <code>-i src -o dst -k kid:k
</td>
<td>
<div class="doc-md-description">
<p>If ticket/PSSH is empty.</p>
<p>If ticket/PSSH is empty and the caller gives no kid.</p>
</div>
</td>
</tr>
@@ -4622,6 +4707,30 @@ that builds the decryption CLI invocation (default: <code>-i src -o dst -k kid:k
<h3 id="unshackle.core.drm.MonaLisa.kids" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">kids</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-property"><code>property</code></small>
</span>
<a href="#unshackle.core.drm.MonaLisa.kids" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature 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="n">kids</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The KID of the track's content key, as a list like the other DRM systems give.</p>
</div>
</div>
<div class="doc doc-object doc-attribute">
<h3 id="unshackle.core.drm.MonaLisa.key" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">key</span>
@@ -4742,44 +4851,21 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<h3 id="unshackle.core.drm.MonaLisa.content_keys" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">content_keys</span>
<h3 id="unshackle.core.drm.MonaLisa.tool" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">tool</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-property"><code>property</code></small>
</span>
<a href="#unshackle.core.drm.MonaLisa.content_keys" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature 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="n">content_keys</span>
<a href="#unshackle.core.drm.MonaLisa.tool" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature 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="n">tool</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Get content keys in the same format as Widevine/PlayReady.</p>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="dict">dict</span>[<span title="uuid.UUID">UUID</span>, <span title="str">str</span>]</code>
</td>
<td>
<div class="doc-md-description">
<p>Dictionary mapping KID to the content key hex string.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p>The external decrypter: the service's, else this machine's (<code>local_tool</code>), else None.</p>
</div>
@@ -4803,7 +4889,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<div class="doc doc-contents ">
<p>Whether the configured external tool supports per-segment decryption.</p>
<p>Whether the decrypter supports per-segment decryption; the built-in one does.</p>
</div>
@@ -5015,6 +5101,27 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<div class="doc doc-contents ">
<p>Extract keys from the ticket using the MonaLisa CDM.</p>
<p>One licence at a time per process (<code>CDM_LOCK</code>): concurrent wasmtime sessions corrupt its shared function table.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.drm.MonaLisa.to_dict" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">to_dict</span>
<a href="#unshackle.core.drm.MonaLisa.to_dict" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature 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="nf">to_dict</span><span class="p">()</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>This DRM in the export form; see <code>wire.drm_to_dict</code>.</p>
</div>
@@ -5038,7 +5145,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">device_path</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> <span class="n">tool_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">command_builder</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">segment_decrypt</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">segment_decrypt</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a><span class="p">)</span>
</span></code></pre></div>
@@ -5111,7 +5218,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<code>command_builder</code>
</td>
<td>
<code><span title="collections.abc.Callable">Callable</span>[[<span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="str">str</span>, <span title="str">str</span>], <span title="collections.abc.Sequence">Sequence</span>[<span title="str">str</span> | <span title="pathlib.Path">Path</span>]] | None</code>
<code><span title="unshackle.core.drm.monalisa.CommandBuilder">CommandBuilder</span> | None</code>
</td>
<td>
<div class="doc-md-description">
@@ -5127,7 +5234,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<code>segment_decrypt</code>
</td>
<td>
<code><span title="bool">bool</span></code>
<code><span title="bool">bool</span> | None</code>
</td>
<td>
<div class="doc-md-description">
@@ -5135,7 +5242,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
</div>
</td>
<td>
<code>True</code>
<code>None</code>
</td>
</tr>
</tbody>
@@ -5182,7 +5289,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<div class="doc doc-contents ">
<p>Decrypt an individual segment file using the configured CLI tool via subprocess.</p>
<p>Decrypt an individual segment file with the external tool, else the built-in decrypter.</p>
<p><span class="doc-section-title">Parameters:</span></p>
@@ -5249,7 +5356,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<div class="doc doc-contents ">
<p>Decrypt a media file (segment or track) using the configured CLI tool via subprocess.</p>
<p>Decrypt a media file (segment or track) with the external tool, else the built-in decrypter.</p>
<p>A whole-track tool runs once on a service's own merged file, which the service gives an <code>output_path</code>.
The in-place calls of core after it do nothing.</p>
@@ -6050,6 +6157,26 @@ the challenge and the session ID.</p>
<div class="doc doc-object doc-function">
<h2 id="unshackle.core.drm.monalisa_drm" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">monalisa_drm</span>
<a href="#unshackle.core.drm.monalisa_drm" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="language-python doc-signature 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="nf">monalisa_drm</span><span class="p">(</span><span class="n">track</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The MonaLisa DRM of a track, with or without a content key.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h2 id="unshackle.core.drm.is_null_key" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">is_null_key</span>
+193 -191
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-132">132</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-133">133</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-133">133</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-134">134</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-135">135</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-136">136</a></span>
@@ -4594,18 +4593,21 @@ 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-140">140</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-141">141</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-142">142</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-143">143</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.cache_identity--source--__span-0-132"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-132" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-132"></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-133"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-133" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-133"></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-134"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-134" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-134"></a>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-135"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-135" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-135"></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-136"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-136" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-136"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-137"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-137" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-137"></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-138"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-138" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-138"></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-139"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-139" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-139"></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-140"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-140" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-140"></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-141"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-141" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-141"></a> <span class="k">else</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-142"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-142" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-142"></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-143"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-143" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-143"></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">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="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-143">143</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-144">144</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-145">145</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.cache_identity--source--__span-0-133"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-133" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-133"></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-134"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-134" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-134"></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-135"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-135" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-135"></a>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-136"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-136" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-136"></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-137"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-137" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-137"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-138"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-138" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-138"></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-139"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-139" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-139"></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-140"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-140" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-140"></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-141"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-141" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-141"></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-142"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-142" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-142"></a> <span class="k">else</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-143"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-143" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-143"></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-144"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-144" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-144"></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-145"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-145" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-145"></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>
@@ -4639,9 +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-149">149</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-150">150</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151">151</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-151">151</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152">152</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153">153</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154">154</a></span>
@@ -4652,20 +4652,22 @@ 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-159">159</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160">160</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161">161</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162">162</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-149"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-149" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-149"></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-150"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-150" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-150"></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-151"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151"></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-152"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-153"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153"></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-154"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154"></a>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-155"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155"></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-156"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156"></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-157"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157"></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-158"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158"></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-159"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159"></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-160"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160"></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-161"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161"></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-162"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162">162</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-163">163</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-164">164</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-151"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151"></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-152"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152"></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-153"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153"></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-154"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-155"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155"></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-156"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156"></a>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-157"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157"></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-158"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158"></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-159"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159"></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-160"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160"></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-161"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161"></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-162"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162"></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-163"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-163" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-163"></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-164"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-164" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-164"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4701,9 +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-164">164</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-165">165</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166">166</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-166">166</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167">167</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168">168</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169">169</a></span>
@@ -4718,24 +4718,26 @@ 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-178">178</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179">179</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180">180</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181">181</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-164"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-164" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-164"></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-165"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-165" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-165"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-166"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166"></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-167"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-168"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168"></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-169"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169"></a><span class="sd"> read by the Cdm and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-170"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-170" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-170"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-171"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-171" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-171"></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-172"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-172" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-172"></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-173"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-173" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-173"></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-174"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-175"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175"></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-176"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176"></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-177"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177"></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-178"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178"></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-179"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179"></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-180"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180"></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-181"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181">181</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-182">182</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-183">183</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-166"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166"></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-167"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-168"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168"></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-169"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-170"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-170" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-170"></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-171"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-171" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-171"></a><span class="sd"> read by the Cdm and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-172"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-172" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-172"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-173"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-173" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-173"></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-174"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174"></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-175"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175"></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-176"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-177"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177"></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-178"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178"></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-179"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179"></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-180"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180"></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-181"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181"></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-182"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-182" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-182"></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-183"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-183" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-183"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4771,9 +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-183">183</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-184">184</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185">185</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-185">185</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186">186</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187">187</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188">188</a></span>
@@ -4793,29 +4793,31 @@ 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-202">202</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203">203</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204">204</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205">205</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-183"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-183" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-183"></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-184"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-184" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-184"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-185"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185"></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-186"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-187"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187"></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-188"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188"></a><span class="sd"> read by the CDM and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-189"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-189" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-189"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-190"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-190" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-190"></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-191"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-191" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-191"></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-192"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-192" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-192"></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-193"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-193" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-193"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-194"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-194" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-194"></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-195"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-195" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-195"></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-196"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-196" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-196"></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-197"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-197" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-197"></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-198"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198"></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-199"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199"></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-200"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-201"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201"></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-202"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202"></a> <span class="c1"># arguments its own signature declares.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-203"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203"></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-204"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204"></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-205"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205"></a> <span class="p">)</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205">205</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-206">206</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-207">207</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-185"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185"></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-186"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-187"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187"></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-188"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-189"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-189" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-189"></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-190"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-190" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-190"></a><span class="sd"> read by the CDM and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-191"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-191" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-191"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-192"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-192" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-192"></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-193"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-193" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-193"></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-194"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-194" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-194"></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-195"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-195" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-195"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-196"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-196" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-196"></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-197"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-197" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-197"></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-198"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198"></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-199"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199"></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-200"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200"></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-201"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201"></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-202"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-203"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203"></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-204"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204"></a> <span class="c1"># arguments its own signature declares.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-205"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205"></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-206"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-206" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-206"></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-207"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-207" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-207"></a> <span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4851,9 +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-207">207</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-208">208</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209">209</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-209">209</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210">210</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211">211</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212">212</a></span>
@@ -4868,24 +4868,26 @@ 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-221">221</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222">222</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223">223</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224">224</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-207"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-207" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-207"></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-208"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-208" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-208"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-209"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209"></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-210"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-211"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211"></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-212"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212"></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-213"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-213" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-213"></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-214"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-214" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-214"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-215"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-215" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-215"></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-216"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-216" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-216"></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-217"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217"></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-218"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218"></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-219"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219"></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-220"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220"></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-221"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221"></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-222"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222"></a><span class="sd"> `signatures` in get_tracks.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-223"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-224"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224"></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-224">224</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-225">225</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-226">226</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-209"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209"></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-210"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-211"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211"></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-212"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-213"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-213" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-213"></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-214"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-214" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-214"></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-215"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-215" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-215"></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-216"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-216" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-216"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-217"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217"></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-218"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218"></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-219"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219"></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-220"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220"></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-221"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221"></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-222"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222"></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-223"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223"></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-224"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224"></a><span class="sd"> `signatures` in get_tracks.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-225"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-225" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-225"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-226"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-226" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-226"></a> <span class="k">return</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4912,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-226">226</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-227">227</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228">228</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-228">228</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229">229</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230">230</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231">231</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232">232</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-226"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-226" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-226"></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-227"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-227" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-227"></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-228"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228"></a>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-229"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229"></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-230"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230"></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-231"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-232"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232"></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-232">232</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-233">233</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-234">234</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-228"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228"></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-229"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229"></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-230"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230"></a>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-231"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231"></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-232"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232"></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-233"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-233" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-233"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-234"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-234" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-234"></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>
@@ -4949,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-250">250</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-251">251</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-250"><a id="unshackle.core.service.Service.close--source--__codelineno-0-250" name="unshackle.core.service.Service.close--source--__codelineno-0-250"></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-251"><a id="unshackle.core.service.Service.close--source--__codelineno-0-251" name="unshackle.core.service.Service.close--source--__codelineno-0-251"></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-252">252</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-253">253</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-252"><a id="unshackle.core.service.Service.close--source--__codelineno-0-252" name="unshackle.core.service.Service.close--source--__codelineno-0-252"></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-253"><a id="unshackle.core.service.Service.close--source--__codelineno-0-253" name="unshackle.core.service.Service.close--source--__codelineno-0-253"></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>
@@ -4976,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-255">255</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-256">256</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257">257</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-255"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-255" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-255"></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-256"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-256" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-256"></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-257"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257"></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-257">257</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-258">258</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-259">259</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-257"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257"></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-258"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-258" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-258"></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-259"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-259" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-259"></a> <span class="k">return</span> <span class="kc">False</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5007,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-259">259</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-260">260</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261">261</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-261">261</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262">262</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263">263</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264">264</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265">265</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-259"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-259" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-259"></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-260"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-260" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-260"></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-261"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261"></a>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-262"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262"></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-263"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263"></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-264"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-265"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265"></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-265">265</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-266">266</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-267">267</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-261"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261"></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-262"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262"></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-263"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263"></a>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-264"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264"></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-265"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265"></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-266"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-266" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-266"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-267"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-267" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-267"></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>
@@ -5044,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-267">267</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-268">268</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269">269</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-267"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-267" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-267"></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-268"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-268" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-268"></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-269"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269"></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-269">269</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-270">270</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-271">271</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-269"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269"></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-270"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-270" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-270"></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-271"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-271" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-271"></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>
@@ -5120,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-273">273</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-274">274</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275">275</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-275">275</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276">276</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277">277</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278">278</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279">279</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280">280</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-273"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-273" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-273"></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-274"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-274" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-274"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-275"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275"></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-276"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276"></a>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-277"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-278"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278"></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-279"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279"></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-280"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280">280</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-281">281</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-282">282</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-275"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275"></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-276"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-277"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277"></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-278"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278"></a>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-279"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-280"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280"></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-281"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-281" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-281"></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-282"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-282" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-282"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5191,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-282">282</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-283">283</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284">284</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-284">284</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285">285</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286">286</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287">287</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288">288</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289">289</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-282"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-282" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-282"></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-283"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-283" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-283"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-284"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284"></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-285"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285"></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-286"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286"></a>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-287"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-288"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288"></a><span class="sd"> track: The downloaded Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-289"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289">289</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-290">290</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-291">291</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-284"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284"></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-285"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-286"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286"></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-287"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287"></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-288"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288"></a>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-289"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-290"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-290" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-290"></a><span class="sd"> track: The downloaded Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-291"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-291" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-291"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5294,25 +5296,25 @@ 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-291">291</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292">292</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293">293</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-293">293</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294">294</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295">295</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296">296</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297">297</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298">298</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299">299</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300">300</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-291"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291"></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-292"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-293"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293"></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-294"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294"></a>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-295"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-296"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296"></a><span class="sd"> track: The decrypted Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-297"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297"></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-298"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298"></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-299"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299"></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-300"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300">300</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-301">301</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-302">302</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-293"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293"></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-294"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-295"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295"></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-296"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296"></a>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-297"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-298"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298"></a><span class="sd"> track: The decrypted Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-299"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299"></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-300"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300"></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-301"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-301" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-301"></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-302"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-302" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-302"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5368,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-302">302</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-303">303</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304">304</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-304">304</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305">305</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306">306</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307">307</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--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_track_repacked--source--__span-0-302"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-302" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-302"></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-303"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-303" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-303"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-304"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304"></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-305"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305"></a>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-306"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-307"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-308"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308">308</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-309">309</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-310">310</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-304"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304"></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-305"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-306"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306"></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-307"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307"></a>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-308"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-309"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-309" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-309"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-310"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-310" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-310"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5439,9 +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-310">310</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311">311</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312">312</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-312">312</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313">313</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314">314</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315">315</a></span>
@@ -5449,17 +5449,19 @@ MP4 with FFmpeg/mp4box.</p>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317">317</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318">318</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319">319</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320">320</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-310"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310"></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-311"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-312"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312"></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-313"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-314"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314"></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-315"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315"></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-316"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-317"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-318"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-319"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-320"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320">320</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-321">321</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-322">322</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-312"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312"></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-313"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-314"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314"></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-315"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-316"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316"></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-317"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317"></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-318"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-319"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-320"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-321"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-321" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-321"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-322"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-322" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-322"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
+222 -7
View File
@@ -2009,6 +2009,17 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Audio.resolution_label" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;resolution_label
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3046,6 +3057,28 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Track.held_playlist" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;held_playlist
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Track.playlist_text" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;playlist_text
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3195,6 +3228,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Tracks.drop" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;drop
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3752,6 +3796,17 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Audio.resolution_label" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;resolution_label
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4789,6 +4844,28 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Track.held_playlist" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;held_playlist
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Track.playlist_text" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;playlist_text
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4938,6 +5015,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Tracks.drop" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;drop
</span>
</a>
</li>
<li class="md-nav__item">
@@ -5334,7 +5422,7 @@
If providing a URL, download() fetches the file during the download phase.
You must give either path or url.</p>
<p>If name is not provided it will use the file name (without extension).
If mime_type is not provided, it will try to guess it.</p>
If mime_type is not provided, it comes from the file signature, else from the suffix.</p>
<p><span class="doc-section-title">Parameters:</span></p>
@@ -5511,6 +5599,7 @@ If mime_type is not provided, it will try to guess it.</p>
<div class="doc doc-contents ">
<p>Download a URL-backed attachment to the temp directory with the same retries as a track.</p>
<p>A type equal to the suffix type can be a guess, also one a remote server sent, so the file signature replaces it.</p>
</div>
@@ -5729,8 +5818,10 @@ If mime_type is not provided, it will try to guess it.</p>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">channels</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">joc</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> <span class="n">descriptive</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a><span class="p">)</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a> <span class="n">bit_depth</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a> <span class="n">sample_rate</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-10"><a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
@@ -5837,6 +5928,38 @@ not supported. All numbers and strings will be cast to float.</p>
<code>False</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>bit_depth</code>
</td>
<td>
<code><span title="int">int</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Bits per sample, e.g. 24. A manifest rarely states it, so a service sets it.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>sample_rate</code>
</td>
<td>
<code><span title="int">int</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Samples per second in Hz, e.g. 96000.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p>Note: If codec, bitrate, channels, or joc is not specified some checks may be
@@ -5985,6 +6108,30 @@ recommended.</p>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Audio.resolution_label" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">resolution_label</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
<a href="#unshackle.core.tracks.Audio.resolution_label" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature 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="nf">resolution_label</span><span class="p">(</span><span class="n">bit_depth</span><span class="p">,</span> <span class="n">sample_rate</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The bit depth and sample rate in the form music services show, e.g. "24-bit / 96 kHz"; "" for neither.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Audio.parse_channels" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">parse_channels</span>
@@ -8474,6 +8621,8 @@ nested saving and safer exists-checks.</p>
<li>playlist: m3u8.model.Playlist - The primary track information.</li>
<li>media: m3u8.model.Media - The audio/subtitle track information.</li>
<li>segment_durations: list[int] - A list of each segment's duration.</li>
<li>playlist_text: str - The media playlist, set by a service that has its text and no
playlist URL. Its segment URIs resolve against the track URL.</li>
<li>"dash" used by the DASH class.</li>
<li>manifest: lxml.ElementTree - DASH MPD manifest.</li>
<li>period: lxml.Element - The period of this track.</li>
@@ -8482,6 +8631,11 @@ nested saving and safer exists-checks.</p>
<li>timescale: int - The timescale of the track's segments.</li>
<li>segment_durations: list[int] - A list of each segment's duration.</li>
</ul>
<p>A service can set:</p>
<ul>
<li>"own_stream_only": bool - Mux only the track of the same kind from the file: a video
without the audio its file holds, or an audio track without the video in its file.</li>
</ul>
<p>You should not add, change, or remove any data within reserved keys.
You may use their data, but note that these values can change or be removed
at any point.</p>
@@ -9044,6 +9198,46 @@ of <code>get_init_segment</code> to find the Key ID.</p>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Track.held_playlist" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">held_playlist</span>
<a href="#unshackle.core.tracks.Track.held_playlist" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature 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="nf">held_playlist</span><span class="p">()</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The HLS media playlist text the track holds: <code>data["hls"]["playlist_text"]</code>, else the <code>from_file</code> text.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Track.playlist_text" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">playlist_text</span>
<a href="#unshackle.core.tracks.Track.playlist_text" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature 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="nf">playlist_text</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The HLS media playlist text the track holds, else the one at its URL; a response that is not ok raises.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Track.load_drm_from_playlist" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">load_drm_from_playlist</span>
@@ -9193,10 +9387,11 @@ is larger than it. Use a value of 20000 (20KB) or higher.</p>
<p>Remux the track with FFmpeg <code>-c copy</code>.</p>
<p>A given <code>bsf_v</code> goes into the same pass as <code>-bsf:v</code>, which normalises video VUI
colour metadata without a second full-file remux. Repackaging is mandatory. The
bitstream filter is best-effort: if the combined pass fails, and it is not the
AAC-retry case, unshackle tries it again once without <code>bsf_v</code> so the remux still
succeeds. Returns True if unshackle applied the requested <code>bsf_v</code> (always False
when <code>bsf_v</code> is None, because the caller requested nothing).</p>
bitstream filter is best-effort: if the combined pass fails, unshackle tries it again
once without <code>bsf_v</code> so the remux still succeeds, and the caller falls back to
<code>normalize_vui</code>. Returns True if unshackle applied
the requested <code>bsf_v</code> (always False when <code>bsf_v</code> is None, because the caller
requested nothing).</p>
</div>
@@ -9482,6 +9677,26 @@ sorts "en-US" and "en-GB".</p>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Tracks.drop" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">drop</span>
<a href="#unshackle.core.tracks.Tracks.drop" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature 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="nf">drop</span><span class="p">(</span><span class="n">ids</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Remove the video, audio and subtitle tracks whose id is in <code>ids</code>.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Tracks.filter" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">filter</span>