Deployed 9901b623 with MkDocs version: 1.6.1

This commit is contained in:
2026-11-27 08:46:34 +00:00
parent 8ede94f88a
commit cf662a16fa
11 changed files with 595 additions and 234 deletions
+255
View File
@@ -2173,6 +2173,56 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.ClearKeyCTR" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code>&nbsp;ClearKeyCTR
</span>
</a>
<nav class="md-nav" aria-label=" ClearKeyCTR">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#unshackle.core.drm.ClearKeyCTR.take_key" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;take_key
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.ClearKeyCTR.content_key" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;content_key
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.ClearKeyCTR.decrypt" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;decrypt
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
@@ -2599,6 +2649,17 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.whole_file_cipher" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-function"></code>&nbsp;whole_file_cipher
</span>
</a>
</li>
<li class="md-nav__item">
@@ -2940,6 +3001,56 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.ClearKeyCTR" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code>&nbsp;ClearKeyCTR
</span>
</a>
<nav class="md-nav" aria-label=" ClearKeyCTR">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#unshackle.core.drm.ClearKeyCTR.take_key" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;take_key
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.ClearKeyCTR.content_key" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;content_key
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.ClearKeyCTR.decrypt" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;decrypt
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
@@ -3366,6 +3477,17 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.whole_file_cipher" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-function"></code>&nbsp;whole_file_cipher
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4125,6 +4247,119 @@ challenge there directly instead.</p>
<h2 id="unshackle.core.drm.ClearKeyCTR" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">ClearKeyCTR</span>
<a href="#unshackle.core.drm.ClearKeyCTR" 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">ClearKeyCTR</span><span class="p">(</span><span class="n">licence</span><span class="p">,</span> <span class="n">iv</span><span class="p">,</span> <span class="n">magic</span><span class="p">,</span> <span class="n">skip</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>AES-128-CTR over a whole file: the service gives the IV and returns the content key through <code>licence</code>.</p>
<p>The key resolver asks <code>licence</code> at the licence step of a download or of a <code>--skip-dl</code> run, so listing tracks costs no request.
A cipher built with <code>key</code> holds its content key from the start.
<code>magic</code> is the signature the decrypted file must start with; a mismatch raises and keeps the input.
<code>skip</code> drops that many decrypted bytes from the start of the file: a header that sits in front of the media.
<code>rewrite_paged</code> rewrites a decrypted file in the paged AAC container (<code>PAGED_AAC</code>).</p>
<div class="doc doc-children">
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.drm.ClearKeyCTR.take_key" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">take_key</span>
<a href="#unshackle.core.drm.ClearKeyCTR.take_key" 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">take_key</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Hold and return a content key: the one the licence callback returned, or one another source licensed.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.drm.ClearKeyCTR.content_key" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">content_key</span>
<a href="#unshackle.core.drm.ClearKeyCTR.content_key" 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">content_key</span><span class="p">()</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The content key, licensed on first use.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.drm.ClearKeyCTR.decrypt" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">decrypt</span>
<a href="#unshackle.core.drm.ClearKeyCTR.decrypt" 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">decrypt</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Decrypt the file to a new file that then replaces it.</p>
<p>The dropped header goes through the cipher too, so the keystream stays aligned with the file.</p>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h2 id="unshackle.core.drm.MonaLisa" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">MonaLisa</span>
@@ -5687,6 +5922,26 @@ the challenge and the session ID.</p>
<div class="doc doc-object doc-function">
<h2 id="unshackle.core.drm.whole_file_cipher" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">whole_file_cipher</span>
<a href="#unshackle.core.drm.whole_file_cipher" 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">whole_file_cipher</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 whole-file cipher 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>
+185 -185
View File
@@ -4579,10 +4579,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-127">127</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-128">128</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-129">129</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-130">130</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-130">130</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-131">131</a></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>
@@ -4590,18 +4587,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-135">135</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-136">136</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-137">137</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-138">138</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.cache_identity--source--__span-0-127"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-127" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-127"></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-128"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-128" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-128"></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-129"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-129" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-129"></a>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-130"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-130" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-130"></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-131"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-131" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-131"></a><span class="sd"> """</span>
</span><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">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-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="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-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="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-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="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-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="k">else</span><span class="p">:</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="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-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">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-138">138</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-139">139</a></span>
<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></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.cache_identity--source--__span-0-130"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-130" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-130"></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-131"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-131" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-131"></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-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><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="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-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="sd"> """</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 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-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="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-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">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-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_id</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">else</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="kc">None</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">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></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4635,10 +4635,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-144">144</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-145">145</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-146">146</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-147">147</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-147">147</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-148">148</a></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>
@@ -4648,20 +4645,23 @@ 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-154">154</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155">155</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156">156</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157">157</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-144"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-144" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-144"></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-145"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-145" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-145"></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-146"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-146" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-146"></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-147"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-147" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-147"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-148"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-148" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-148"></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-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><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="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-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="sd"> privacy certificate that the service uses.</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="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-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"> 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-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="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-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"> :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-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"> 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-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"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157">157</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158">158</a></span>
<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></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-147"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-147" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-147"></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-148"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-148" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-148"></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-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="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-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="w"> </span><span class="sd">"""</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="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-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><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"> :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-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="sd"> privacy certificate that the service uses.</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"> :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-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"> 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-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 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-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"> :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-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"> 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-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"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4697,10 +4697,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-159">159</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-160">160</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-161">161</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-162">162</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-162">162</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-163">163</a></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>
@@ -4714,24 +4711,27 @@ 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-173">173</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174">174</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175">175</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176">176</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-159"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-159" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-159"></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-160"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-160" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-160"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-161"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-161" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-161"></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-162"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-162" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-162"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-163"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-163" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-163"></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-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="sd"> read by the Cdm and decrypted.</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176">176</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177">177</a></span>
<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></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-162"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-162" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-162"></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-163"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-163" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-163"></a><span class="w"> </span><span class="sd">"""</span>
</span><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="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-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><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"> 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-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="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-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"> 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-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"> :param challenge: The license challenge from the Widevine CDM.</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"> :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-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"> 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-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"> :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-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"> :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-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"> Decode the data, return as is to reduce unnecessary computations.</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"> """</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"> 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-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="sd"> read by the Cdm and decrypted.</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><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"> 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-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"> 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-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"> 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-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"> :param challenge: The license challenge from the Widevine CDM.</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"> :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-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"> 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-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 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-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"> :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-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"> Decode the data, return as is to reduce unnecessary computations.</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"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4767,10 +4767,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-178">178</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-179">179</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-180">180</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-181">181</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-181">181</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-182">182</a></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>
@@ -4789,29 +4786,32 @@ 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-197">197</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198">198</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199">199</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200">200</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-178"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-178" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-178"></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-179"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-179" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-179"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-180"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-180" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-180"></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-181"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-181" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-181"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-182"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-182" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-182"></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-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="sd"> read by the CDM and decrypted.</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200">200</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201">201</a></span>
<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></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-181"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-181" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-181"></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-182"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-182" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-182"></a><span class="w"> </span><span class="sd">"""</span>
</span><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="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-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><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"> 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-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="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-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"> 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-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"> :param challenge: The license challenge from the PlayReady CDM.</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"> :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-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"> 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-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"> :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-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"> :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-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"> Decode the data, return as is to reduce unnecessary computations.</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"> """</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="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-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="c1"># arguments its own signature declares.</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="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-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="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-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="p">)</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"> 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-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="sd"> read by the CDM and decrypted.</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><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"> 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-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"> 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-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"> 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-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"> :param challenge: The license challenge from the PlayReady CDM.</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"> :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-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"> 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-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 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-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"> :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-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"> Decode the data, return as is to reduce unnecessary computations.</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"> """</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="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-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="c1"># arguments its own signature declares.</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="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-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="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-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="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4847,10 +4847,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-202">202</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-203">203</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-204">204</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-205">205</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-205">205</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-206">206</a></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>
@@ -4864,24 +4861,27 @@ 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-216">216</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217">217</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218">218</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219">219</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-202"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-202" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-202"></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-203"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-203" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-203"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-204"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-204" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-204"></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-205"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-205" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-205"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-206"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-206" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-206"></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-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="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-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="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-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><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="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-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"> :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-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"> 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-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"> :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-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"> :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-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"> 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-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"> 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-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"> `signatures` in get_tracks.</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"> """</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="k">return</span> <span class="kc">None</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219">219</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220">220</a></span>
<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></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-205"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-205" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-205"></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-206"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-206" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-206"></a><span class="w"> </span><span class="sd">"""</span>
</span><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="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-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><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"> 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-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="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-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"> 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-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"> :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-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"> :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-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"> 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-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 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-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"> :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-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"> 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-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"> 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-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"> `signatures` in get_tracks.</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"> """</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="k">return</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4906,9 +4906,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-237">237</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-238">238</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-237"><a id="unshackle.core.service.Service.close--source--__codelineno-0-237" name="unshackle.core.service.Service.close--source--__codelineno-0-237"></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-238"><a id="unshackle.core.service.Service.close--source--__codelineno-0-238" name="unshackle.core.service.Service.close--source--__codelineno-0-238"></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-240">240</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-241">241</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-240"><a id="unshackle.core.service.Service.close--source--__codelineno-0-240" name="unshackle.core.service.Service.close--source--__codelineno-0-240"></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-241"><a id="unshackle.core.service.Service.close--source--__codelineno-0-241" name="unshackle.core.service.Service.close--source--__codelineno-0-241"></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>
@@ -4933,11 +4933,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-242">242</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-243">243</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-244">244</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-242"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-242" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-242"></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-243"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-243" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-243"></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-244"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-244" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-244"></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-245">245</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-246">246</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-247">247</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-245"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-245" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-245"></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-246"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-246" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-246"></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-247"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-247" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-247"></a> <span class="k">return</span> <span class="kc">False</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4964,19 +4964,19 @@ server, so a decrypter that needs a local process works for remote clients too.<
<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-246">246</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-247">247</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-248">248</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-249">249</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-249">249</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-250">250</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-251">251</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-252">252</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-246"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-246" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-246"></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-247"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-247" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-247"></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-248"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-248" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-248"></a>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-249"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-249" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-249"></a><span class="sd"> unshackle calls this only for a track `decrypts_samples` names. A remote session runs it on the</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-250"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-250" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-250"></a><span class="sd"> 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-251"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-251" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-251"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-252"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-252" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-252"></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-252">252</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-253">253</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-254">254</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-255">255</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-249"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-249" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-249"></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-250"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-250" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-250"></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-251"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-251" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-251"></a>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-252"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-252" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-252"></a><span class="sd"> unshackle calls this only for a track `decrypts_samples` names. A remote session runs it on the</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-253"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-253" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-253"></a><span class="sd"> 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-254"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-254" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-254"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-255"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-255" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-255"></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>
@@ -5048,21 +5048,21 @@ server, so a decrypter that needs a local process works for remote clients too.<
<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-256">256</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-257">257</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-258">258</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-259">259</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-259">259</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-260">260</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-261">261</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-262">262</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-263">263</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-256"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-256" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-256"></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-257"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-257" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-257"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-258"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-258" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-258"></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-259"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-259" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-259"></a>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-260"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-260" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-260"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-261"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-261" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-261"></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-262"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-262" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-262"></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-263"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-263" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-263"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-263">263</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-264">264</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-265">265</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-266">266</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-259"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-259" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-259"></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-260"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-260" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-260"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-261"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-261" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-261"></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-262"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-262" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-262"></a>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-263"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-263" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-263"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-264"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-264" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-264"></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-265"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-265" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-265"></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-266"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-266" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-266"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5118,19 +5118,19 @@ server, so a decrypter that needs a local process works for remote clients too.<
<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-265">265</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-266">266</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-267">267</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-268">268</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-268">268</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-269">269</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-270">270</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-271">271</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-265"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-265" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-265"></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-266"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-266" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-266"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-267"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-267" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-267"></a><span class="sd"> Called when a Track has finished downloading.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-268"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-268" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-268"></a>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-269"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-269" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-269"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-270"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-270" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-270"></a><span class="sd"> track: The downloaded Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-271"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-271" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-271"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-271">271</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-272">272</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-273">273</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-274">274</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-268"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-268" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-268"></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-269"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-269" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-269"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-270"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-270" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-270"></a><span class="sd"> Called when a Track has finished downloading.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-271"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-271" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-271"></a>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-272"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-272" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-272"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-273"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-273" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-273"></a><span class="sd"> track: The downloaded Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-274"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-274" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-274"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5219,25 +5219,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-273">273</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-274">274</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-275">275</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-276">276</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-276">276</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-277">277</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-278">278</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-279">279</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-280">280</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-281">281</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--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_track_decrypted--source--__span-0-273"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-273" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-273"></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="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-274"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-274" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-274"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-275"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-275" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-275"></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-276"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-276" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-276"></a>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-277"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-277" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-277"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-278"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-278" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-278"></a><span class="sd"> track: The decrypted Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-279"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-279" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-279"></a><span class="sd"> drm: The DRM object it decrypted with.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-280"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-280" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-280"></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-281"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-281" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-281"></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-282"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-282" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-282"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-282">282</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-283">283</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-284">284</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-285">285</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-276"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-276" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-276"></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="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-277"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-277" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-277"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-278"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-278" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-278"></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-279"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-279" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-279"></a>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-280"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-280" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-280"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-281"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-281" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-281"></a><span class="sd"> track: The decrypted Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-282"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-282" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-282"></a><span class="sd"> drm: The DRM object it decrypted with.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-283"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-283" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-283"></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-284"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-284" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-284"></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-285"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-285" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-285"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5293,19 +5293,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-284">284</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-285">285</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-286">286</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-287">287</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-287">287</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-288">288</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-289">289</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-290">290</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-284"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-284" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-284"></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-285"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-285" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-285"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-286"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-286" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-286"></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-287"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-287" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-287"></a>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-288"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-288" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-288"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-289"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-289" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-289"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-290"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-290" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-290"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-290">290</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-291">291</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-292">292</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-293">293</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-287"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-287" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-287"></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-288"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-288" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-288"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-289"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-289" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-289"></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-290"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-290" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-290"></a>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-291"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-291" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-291"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-292"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-292" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-292"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-293"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-293" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-293"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5364,27 +5364,27 @@ 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-292">292</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-293">293</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-294">294</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-295">295</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-295">295</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-296">296</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-297">297</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-298">298</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-299">299</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-300">300</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-301">301</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--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_multiplex--source--__span-0-292"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-292" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-292"></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-293"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-293" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-293"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-294"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-294" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-294"></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-295"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-295" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-295"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-296"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-296" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-296"></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-297"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-297" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-297"></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-298"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-298" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-298"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-299"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-299" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-299"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-300"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-300" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-300"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-301"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-301" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-301"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-302"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-302" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-302"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-302">302</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-303">303</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-304">304</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-305">305</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-295"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-295" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-295"></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-296"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-296" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-296"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-297"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-297" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-297"></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-298"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-298" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-298"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-299"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-299" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-299"></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-300"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-300" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-300"></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-301"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-301" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-301"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-302"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-302" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-302"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-303"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-303" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-303"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-304"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-304" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-304"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-305"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-305" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-305"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
+44
View File
@@ -2881,6 +2881,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Track.ensure_url" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;ensure_url
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4558,6 +4569,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Track.ensure_url" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;ensure_url
</span>
</a>
</li>
<li class="md-nav__item">
@@ -8433,6 +8455,28 @@ the init data, and the byte range of the window. Returns None when the file has
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Track.ensure_url" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">ensure_url</span>
<a href="#unshackle.core.tracks.Track.ensure_url" 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">ensure_url</span><span class="p">()</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Set the URL from <code>resolve_url</code> when the track has none.</p>
<p>A service sets <code>resolve_url</code> when each URL costs a request, so only a track that is downloaded or sent to a
remote client asks for its URL.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Track.download" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">download</span>