Deployed 4bcc15df with MkDocs version: 1.6.1

This commit is contained in:
2026-11-29 23:50:33 +00:00
parent 2ea99e27f1
commit c14c48df8c
11 changed files with 347 additions and 240 deletions
+1 -1
View File
@@ -3119,7 +3119,7 @@ flagged, banned, or downgraded.</p>
<p>Override any of these to react to pipeline stages (all no-ops by default):
<code>on_segment_downloaded</code>, <code>on_track_downloaded</code>, <code>on_track_decrypted</code>,
<code>on_track_repacked</code>, <code>on_track_multiplex</code>. <code>on_track_downloaded</code> runs once per track, after
unshackle decrypted the <code>drm</code> of the track. Also override <code>search()</code> to yield
unshackle decrypted the track and after <code>on_track_decrypted</code>. Also override <code>search()</code> to yield
<code>SearchResult</code> objects for <code>unshackle search</code>.</p>
<div class="admonition warning">
<p class="admonition-title">Set <code>ANONYMOUS_SEARCH</code> only for a search that needs no account</p>
+5 -5
View File
@@ -3495,7 +3495,7 @@
<td><code>cdm_type</code></td>
<td>string</td>
<td>no</td>
<td>Preferred CDM type.</td>
<td>Preferred CDM type. A request that sets one of the service's <code>SERVER_DEVICE_OPTIONS</code> ignores it: the server loads the first-listed device of its <code>cdm</code> entry.</td>
</tr>
<tr>
<td><code>credentials</code>, <code>cookies</code>, <code>cache</code></td>
@@ -3687,7 +3687,7 @@ ignore it safely. See <a href="../../creating-a-service/#split-episodes">Split e
</tbody>
</table>
<h3 id="post-apilist-tracks"><code>POST /api/list-tracks</code><a class="headerlink" href="#post-apilist-tracks" title="Permanent link">&para;</a></h3>
<p>Show the video, audio, and subtitle tracks for a title. For series, you can scope to specific episodes.</p>
<p>Show the video, audio, and subtitle tracks for a title. For series, you can scope to specific episodes. Each <code>title</code> in the response has the form of a <a href="#post-apilist-titles"><code>list-titles</code></a> title, with the same service flags (<code>anime</code>, <code>daily</code>, <code>metadata_provider</code>).</p>
<div class="admonition tip">
<p class="admonition-title">Spotting the original-language audio</p>
<p>Each audio track carries <code>is_original</code>, which marks the track the default <code>lang</code> of <code>orig</code> selects. unshackle finds it with the same language matcher the downloader uses. Thus it stays correct for regional variants a client cannot separate from tag text alone (<code>pt</code> marks <code>pt-BR</code> rather than <code>pt-PT</code>). Services need not report a title's language, so every track can legitimately come back <code>false</code>.</p>
@@ -4971,7 +4971,7 @@ answers the prompt within 10 minutes.</p>
<p class="admonition-title">Developer feature</p>
<p>The <code>/api/session/*</code> endpoints power unshackle's <strong>remote download</strong> mode. A thin local client authenticates once against a remote server, then fetches titles, tracks, and segments, and proxies DRM licensing back through it. The server mounts these endpoints in <code>--remote-only</code> mode, and they are what the built-in <code>RemoteService</code> client drives. Most end users never call them directly.</p>
</div>
<p>The server holds remote sessions in memory. They expire after <code>serve.session_ttl</code> (default 300s) without a request, except while awaiting interactive authentication input, which uses a 600s window. A remote session binds to the IP that made it, so the server rejects a request from a different IP with <code>403 FORBIDDEN</code>.</p>
<p>The server holds remote sessions in memory. They expire after <code>serve.session_ttl</code> (default 300s) without a request, except while the login runs, which can stay idle for the larger of <code>session_ttl</code> and 600s. A remote session binds to the IP that made it, so the server rejects a request from a different IP with <code>403 FORBIDDEN</code>.</p>
<h3 id="remote-session-lifecycle-overview">Remote session lifecycle overview<a class="headerlink" href="#remote-session-lifecycle-overview" title="Permanent link">&para;</a></h3>
<div class="language-text highlight"><pre><span></span><code><span id="__span-30-1"><a id="__codelineno-30-1" name="__codelineno-30-1" href="#__codelineno-30-1"></a>POST /api/session/create → returns session_id, status "authenticating"
</span><span id="__span-30-2"><a id="__codelineno-30-2" name="__codelineno-30-2" href="#__codelineno-30-2"></a>GET /api/session/{id}/channel → WebSocket: prompts, CDM calls, logs, login state, drain
@@ -5267,7 +5267,7 @@ A slow answer arrives as a <a href="#slow-responses">slow response</a>.</p>
</tbody>
</table>
<h3 id="post-apisessionsession_idsegments"><code>POST /api/session/{session_id}/segments</code><a class="headerlink" href="#post-apisessionsession_idsegments" title="Permanent link">&para;</a></h3>
<p>Get the download URL, DRM info, headers, cookies, and raw track data for the selected tracks. Body: <code>{ "track_ids": ["v-1", "a-1"] }</code> (required). A track that the tracks response sent with <code>resolve_url</code> gets its URL from the service here. The server makes one service call at a time per remote session, so parallel requests wait for each other. A slow answer arrives as described in <a href="#slow-responses">Slow responses</a>.</p>
<p>Get the download URL, DRM info, headers, cookies, and track data for the selected tracks. Body: <code>{ "track_ids": ["v-1", "a-1"] }</code> (required). A track that the tracks response sent with <code>resolve_url</code> gets its URL from the service here. The server makes one service call at a time per remote session, so parallel requests wait for each other. A slow answer arrives as described in <a href="#slow-responses">Slow responses</a>.</p>
<div class="tabbed-set tabbed-alternate" data-tabs="26:1"><input checked="checked" id="__tabbed_26_1" name="__tabbed_26" type="radio" /><div class="tabbed-labels"><label for="__tabbed_26_1">Response <code>200</code></label></div>
<div class="tabbed-content">
<div class="tabbed-block">
@@ -5280,7 +5280,7 @@ A slow answer arrives as a <a href="#slow-responses">slow response</a>.</p>
</div>
</div>
</div>
<p><code>cookies</code> gives names and values only. <code>cookie_jar</code> gives the same cookies with their domain, path and <code>secure</code> flag, in the <code>session_cookie_jar</code> form of the tracks response.</p>
<p><code>data</code> has the form of the track <code>data</code> in <code>list-tracks</code>: the JSON-safe part of the service-set <code>track.data</code>, without the <code>hls</code>, <code>dash</code>, and <code>ism</code> parser keys. <code>cookies</code> gives names and values only. <code>cookie_jar</code> gives the same cookies with their domain, path and <code>secure</code> flag, in the <code>session_cookie_jar</code> form of the tracks response.</p>
<table>
<thead>
<tr>
+9 -6
View File
@@ -2676,8 +2676,8 @@ full detail:</p>
</tr>
<tr>
<td><code>speed</code></td>
<td>string</td>
<td>Transfer speed of the track in progress, e.g. <code>4.20 MB/s</code>.</td>
<td>string or <code>null</code></td>
<td>Transfer speed of the track in progress, e.g. <code>4.20 MB/s</code>. <code>null</code> when no track downloads.</td>
</tr>
<tr>
<td><code>skipped_subtitles</code></td>
@@ -2903,7 +2903,8 @@ download, and on finish stamps <code>completed_time</code> and records history.<
server process. For each job it spawns a separate Python subprocess:</p>
<div class="language-text highlight"><pre><span></span><code><span id="__span-7-1"><a id="__codelineno-7-1" name="__codelineno-7-1" href="#__codelineno-7-1"></a>python -m unshackle.core.api.download_worker &lt;payload.json&gt; &lt;result.json&gt; &lt;progress.json&gt;
</span></code></pre></div>
<p>Three temporary files bridge the parent and the job worker:</p>
<p>Three temporary files bridge the parent and the job worker. <code>unshackle/core/api/job_channel.py</code> defines each file
and the stdin answer line:</p>
<ul>
<li><strong><code>payload.json</code></strong>: the manager writes it before launch. It contains the job ID,
service, title ID, and merged parameters.</li>
@@ -2920,14 +2921,16 @@ the end of its prompt or notice sets it back to <code>null</code>.</p>
and blocking work inside the download engine, and makes hard cancellation (killing the
process) reliable.</p>
<p>The job worker's exit codes are <code>0</code> for success, <code>1</code> for a download error, and <code>2</code> for bad
arguments. Its <code>result.json</code> is either <code>{"status": "success", "output_files": [...]}</code>
or <code>{"status": "error", "message", "error_details", "error_code", "traceback"}</code>. If the
arguments. Its <code>result.json</code> holds <code>status</code>, <code>output_files</code>, <code>message</code>, <code>error_details</code>, <code>error_code</code> and
<code>traceback</code>. The <code>status</code> is <code>success</code> or <code>error</code>, and a success leaves the error fields <code>null</code>. If the
process exits non-zero, or the result is missing or not a success, the parent marks the
job <code>failed</code> and adopts the job worker's <code>error_code</code> (or derives one by categorising the
exception).</p>
<h3 id="how-progress-reaches-the-api">How progress reaches the API<a class="headerlink" href="#how-progress-reaches-the-api" title="Permanent link">&para;</a></h3>
<p>While the job worker operates, the manager polls <code>progress.json</code> every <strong>0.5 s</strong> and copies the
fields it finds onto the live <code>DownloadJob</code>. That is what the <code>GET</code> endpoints return.</p>
fields it finds onto the live <code>DownloadJob</code>. That is what the <code>GET</code> endpoints return. The file
holds the whole progress record each time, so each field in it replaces the job's value, <code>0</code> and
<code>null</code> too.</p>
<p>The job worker aggregates progress across all selected tracks. It weights each track's
completion fraction by its bitrate, so video and audio dominate the bar and subtitles
barely move it (subtitles get a small fixed weight). Track fractions are kept
+20 -17
View File
@@ -2836,7 +2836,7 @@ generally never touch this directly, but it explains behaviour you might observe
<tr>
<td>Auth/input timeout</td>
<td><strong>600s</strong> (10 min)</td>
<td>Sessions still authenticating or awaiting a prompt use this longer window instead of the TTL</td>
<td>A remote session that still logs in, a prompt included, can stay idle for the larger of the TTL and this value</td>
</tr>
<tr>
<td>Cleanup sweep</td>
@@ -2847,10 +2847,9 @@ generally never touch this directly, but it explains behaviour you might observe
</table>
<div class="admonition note">
<p class="admonition-title">Auth is never rushed</p>
<p>A remote session that is still <code>authenticating</code> or waiting on <code>pending_input</code> is
<strong>not</strong> subject to the short 300s TTL. It gets the full 600s auth window. This gives
you time to enter an interactive code without the remote session vanishing
mid-prompt.</p>
<p>A remote session that is still <code>authenticating</code> or waiting on <code>pending_input</code> can stay
idle for the larger of <code>session_ttl</code> and 600s. This gives you time to enter an interactive
code without the remote session vanishing mid-prompt.</p>
</div>
<p>The TTL and max-session limits are read from server config:</p>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml (server)</span><pre><span></span><code><span id="__span-6-1"><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="nt">serve</span><span class="p">:</span>
@@ -3058,8 +3057,8 @@ layer.</p>
channel carries it, or the client polls while its own requests run. A call that no client fetches within 10 seconds
fails then, because no client is listening. A fetched call waits 60 seconds for its answer.
The call leaves the auth status as it was. An answer never marks the remote session as client-authenticated.</li>
<li><code>AUTH_INPUT_TIMEOUT = 600.0</code> seconds. This is also the TTL granted to
<code>AUTHENTICATING</code> sessions in the store. A remote session that waits on a prompt stays <code>AUTHENTICATING</code>.</li>
<li><code>AUTH_INPUT_TIMEOUT = 600.0</code> seconds. An <code>AUTHENTICATING</code> remote session expires in the store after
the larger of <code>session_ttl</code> and this value. A remote session that waits on a prompt stays <code>AUTHENTICATING</code>.</li>
</ul>
<p><code>GET /api/session/{id}/prompt</code> returns one of:</p>
<div class="language-json highlight"><pre><span></span><code><span id="__span-8-1"><a id="__codelineno-8-1" name="__codelineno-8-1" href="#__codelineno-8-1"></a><span class="p">{</span><span class="w"> </span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"authenticated"</span><span class="w"> </span><span class="p">}</span>
@@ -3156,16 +3155,20 @@ request finds the remote session gone.</p>
take effect without recreating the store.</li>
<li><strong><code>create()</code></strong> evicts the least-recently-accessed remote session of the API key that holds the most when at capacity,
then stores a complete <code>SessionEntry</code> from the fields of the <code>create</code> handler and publishes the <code>create</code> event.</li>
<li><strong><code>get()</code></strong> refreshes <code>last_accessed</code> through <code>touch()</code>. It returns <code>None</code> (and
deletes the entry) if an authenticated remote session has been idle longer than the
TTL. Remote sessions in <code>AUTHENTICATING</code> are exempt from TTL expiry.</li>
<li><strong><code>cleanup_expired()</code></strong> runs every 60s: authenticated remote sessions expire at
<code>ttl</code>, in-flight-auth remote sessions expire at <code>AUTH_INPUT_TIMEOUT</code>. The removal of
a remote session cancels its <code>InputBridge</code> and deletes its cache directory (pruning
empty parent dirs up to, but not including, the cache root).</li>
<li>The server calls <strong><code>cancel_all_bridges()</code></strong> on shutdown. It ends each open remote session, which
unblocks any waiting auth threads, and deletes the cache directory of each one. The server then waits up
to 5 seconds for each login that still runs, and deletes its cache directory again when it ends.</li>
<li><strong>Expiry.</strong> <code>get()</code> and <code>cleanup_expired()</code> use one rule. A remote session that no request holds
expires when it is idle for longer than <code>ttl</code>. While its login runs (<code>AUTHENTICATING</code>), the limit is
the larger of <code>ttl</code> and <code>AUTH_INPUT_TIMEOUT</code>.</li>
<li><strong><code>get()</code></strong> refreshes <code>last_accessed</code> through <code>touch()</code>. It returns <code>None</code> and
deletes the entry when the remote session has expired.</li>
<li><strong><code>cleanup_expired()</code></strong> runs every 60s and removes each expired remote session.</li>
<li><strong>Removal.</strong> Eviction, expiry and <code>delete()</code> end the remote session the same way: they cancel its
<code>InputBridge</code>, close its channel, send the <code>delete</code> dashboard event, schedule a staged service reload
and delete its cache directory (pruning empty parent dirs up to, but not including, the cache root).</li>
<li><strong><code>track_login(task)</code></strong> keeps each login task of <code>session/create</code> until it ends.</li>
<li>The server calls <strong><code>close()</code></strong> on shutdown. It ends each open remote session, which
unblocks any waiting auth threads, and deletes the cache directory of each one. It sends no dashboard event
and schedules no reload. It then waits up to 5 seconds for each login that still runs, and stops the sweep.
A login that ends after the shutdown deletes its cache directory again.</li>
</ul>
<p><code>SessionEntry</code> fields:</p>
<table>
+3 -3
View File
@@ -3237,9 +3237,9 @@ process can use. For these, set no <code>drm</code> on the track and override tw
full-sample cbcs only, not pattern encryption.</li>
</ul>
<p>When the download of the track ends, unshackle calls <code>unshackle.core.drm.cbcs.decrypt_file</code>, and
the progress row shows "Decrypting". Your <code>on_track_downloaded</code> runs before this and gets the
encrypted file. <code>decrypt_file</code> writes the plaintext back in place and removes the
protection boxes, so the muxer reads a clear file. In a remote session <code>get_sample_decrypter</code>
the progress row shows "Decrypting". <code>decrypt_file</code> writes the plaintext back in place and removes the
protection boxes, so the muxer reads a clear file. Then your <code>on_track_decrypted</code> runs with <code>drm</code> set
to <code>None</code>, and after it your <code>on_track_downloaded</code> runs and gets the clear file. In a remote session <code>get_sample_decrypter</code>
runs on the server: the client sends the samples through the <code>samples</code> route, so a decrypter
that needs a process on the server also works for a remote client.</p>
<h3 id="how-unshackle-chooses-a-cdm-and-finds-keys">How unshackle chooses a CDM and finds keys<a class="headerlink" href="#how-unshackle-chooses-a-cdm-and-finds-keys" title="Permanent link">&para;</a></h3>
+1 -1
View File
@@ -2751,7 +2751,7 @@
</div>
<div class="admonition example">
<p class="admonition-title">The temp directory is nearly full</p>
<p><strong>Symptom:</strong> the failure line ends with the free space of the temp volume, for example <code>CalledProcessError: Command '[...]' returned non-zero exit status 2, 38.0 MB free on C:\unshackle\temp</code>. A tool such as shaka-packager often reports a full disk only as a write failure. A full disk during the mux gives a line like <code>mkvmerge failed (exit 2): An exception occurred when writing the destination file. The drive may be full. ..., 38.0 MB free on C:\unshackle\temp</code>.</p>
<p><strong>Symptom:</strong> the failure line ends with the free space of the temp volume, for example <code>CalledProcessError: Command '[...]' returned non-zero exit status 2, 38.0 MB free on C:\unshackle\temp</code>. A tool such as shaka-packager often reports a full disk only as a write failure. A full disk during the mux gives a line like <code>mkvmerge failed (exit 2): An exception occurred when writing the destination file. The drive may be full. ..., 38.0 MB free on C:\unshackle\temp</code>. A hybrid step that fails on a full disk gives a line like <code>Hybrid 2160p failed, skipping it: [Errno 28] No space left on device, 38.0 MB free on C:\unshackle\temp</code>.</p>
<p>Before or during the track downloads, a warning can also show the problem, for example <code>Temp volume C:\unshackle\temp has 3.1 GB free, the selected tracks need about 9.4 GB</code>. unshackle gives this warning when the free space is less than two times the estimated size of the video and audio tracks of the title. The factor is two because each encrypted track and its decrypted copy are on the temp volume together.</p>
<p>For a DASH or ISM track, the estimate is the manifest bitrate multiplied by the playing time, and unshackle checks before the downloads start. An HLS track has no playing time until unshackle reads its media playlist, so unshackle adds its estimate when the playlist is read, before the segments of that track download. The HLS estimate is the sum of the byte ranges when each segment has one, else the bitrate multiplied by the segment durations. An HLS video bitrate includes the audio, so the warning can come early when the free space is near the estimate. A URL track gives no estimate. You get one warning for each title at most. The warning does not stop the download, and <code>--skip-dl</code> and <code>--sample</code> runs do not check.</p>
<p><strong>Inspect:</strong> unshackle adds this part when the volume of <code>directories.temp</code> has less than 1 GiB free. Make space on that volume, or set <code>directories.temp</code> to a larger volume (see <a href="../../reference/configuration/directories/">Directories</a>), and run the download again. Over the REST API the job error carries the same line, and a full disk in the downloader gives <code>DOWNLOAD_ERROR</code>.</p>
BIN
View File
Binary file not shown.
+252 -201
View File
@@ -2128,6 +2128,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.service.Service.sample_decrypter" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;sample_decrypter
</span>
</a>
</li>
<li class="md-nav__item">
@@ -2673,6 +2684,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.service.Service.sample_decrypter" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;sample_decrypter
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4501,9 +4523,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-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>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-132">132</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-133">133</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-134">134</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-135">135</a></span>
@@ -4512,18 +4532,20 @@ option <code>chapter_fallback_name</code>. For example, <code>"Chapter {i:02}"</
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-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 class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-141">141</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-142">142</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-143">143</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.cache_identity--source--__span-0-132"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-132" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-132"></a><span class="k">def</span><span class="w"> </span><span class="nf">cache_identity</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">CacheIdentity</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-133"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-133" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-133"></a><span class="w"> </span><span class="sd">"""The cache, and the title ID, region and account that this source files its cached titles and metadata under.</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-134"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-134" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-134"></a>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-135"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-135" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-135"></a><span class="sd"> A service keeps its title ID in ``title`` or ``title_id``, whichever it sets.</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-136"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-136" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-136"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-137"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-137" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-137"></a> <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"title"</span><span class="p">):</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-138"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-138" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-138"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">title</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-139"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-139" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-139"></a> <span class="k">elif</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"title_id"</span><span class="p">):</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-140"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-140" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-140"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">title_id</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-141"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-141" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-141"></a> <span class="k">else</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-142"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-142" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-142"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="kc">None</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-143"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-143" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-143"></a> <span class="k">return</span> <span class="n">CacheIdentity</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">title_cache</span><span class="p">,</span> <span class="n">title_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">current_region</span><span class="p">,</span> <span class="n">get_account_hash</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">credential</span><span class="p">))</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4557,9 +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.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>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-149">149</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-150">150</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151">151</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152">152</a></span>
@@ -4570,20 +4590,22 @@ option <code>chapter_fallback_name</code>. For example, <code>"Chapter {i:02}"</
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-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 class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160">160</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161">161</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162">162</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-149"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-149" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-149"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_service_certificate</span><span class="p">(</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-150"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-150" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-150"></a> <span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-151"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-152"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-153"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153"></a><span class="sd"> Get the Widevine Service Certificate used for Privacy Mode.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-154"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154"></a>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-155"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155"></a><span class="sd"> :param challenge: The service challenge, providing this to a License endpoint should return the</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-156"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156"></a><span class="sd"> privacy certificate that the service uses.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-157"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-158"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-159"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-160"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160"></a><span class="sd"> :return: The Service Privacy Certificate as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-161"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-162"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4619,9 +4641,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-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>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-164">164</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-165">165</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166">166</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167">167</a></span>
@@ -4636,24 +4656,26 @@ The service can then ban, revoke, disable, or downgrade that device.</p>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-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 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 class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179">179</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180">180</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181">181</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-164"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-164" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-164"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-165"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-165" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-165"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-166"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166"></a><span class="sd"> Get a Widevine License message by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-167"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-168"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168"></a><span class="sd"> This License message contains the encrypted content keys and will be</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-169"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169"></a><span class="sd"> read by the Cdm and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-170"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-170" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-170"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-171"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-171" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-171"></a><span class="sd"> This is a very important request to get correct. A bad, unexpected, or missing</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-172"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-172" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-172"></a><span class="sd"> value in the request can cause the service to detect your CDM device.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-173"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-173" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-173"></a><span class="sd"> The service can then ban, revoke, disable, or downgrade that device.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-174"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-175"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175"></a><span class="sd"> :param challenge: The license challenge from the Widevine CDM.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-176"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-177"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-178"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-179"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179"></a><span class="sd"> :return: The License response as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-180"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-181"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4689,9 +4711,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-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>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-183">183</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-184">184</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185">185</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186">186</a></span>
@@ -4711,29 +4731,31 @@ The service can then ban, revoke, disable, or downgrade that device.</p>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-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 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 class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203">203</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204">204</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205">205</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-183"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-183" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-183"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_playready_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-184"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-184" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-184"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-185"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185"></a><span class="sd"> Get a PlayReady License message by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-186"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-187"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187"></a><span class="sd"> This License message contains the encrypted content keys and will be</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-188"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188"></a><span class="sd"> read by the CDM and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-189"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-189" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-189"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-190"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-190" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-190"></a><span class="sd"> This is a very important request to get correct. A bad, unexpected, or missing</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-191"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-191" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-191"></a><span class="sd"> value in the request can cause the service to detect your CDM device.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-192"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-192" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-192"></a><span class="sd"> The service can then ban, revoke, disable, or downgrade that device.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-193"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-193" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-193"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-194"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-194" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-194"></a><span class="sd"> :param challenge: The license challenge from the PlayReady CDM.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-195"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-195" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-195"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-196"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-196" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-196"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-197"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-197" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-197"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-198"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198"></a><span class="sd"> :return: The License response as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-199"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-200"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-201"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201"></a> <span class="c1"># A service that implements Widevine licensing only still gets PlayReady, with the</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-202"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202"></a> <span class="c1"># arguments its own signature declares.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-203"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span><span class="p">(</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-204"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204"></a> <span class="o">**</span><span class="n">declared_kwargs</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span><span class="p">,</span> <span class="p">{</span><span class="s2">"challenge"</span><span class="p">:</span> <span class="n">challenge</span><span class="p">,</span> <span class="s2">"title"</span><span class="p">:</span> <span class="n">title</span><span class="p">,</span> <span class="s2">"track"</span><span class="p">:</span> <span class="n">track</span><span class="p">})</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-205"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205"></a> <span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4769,9 +4791,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-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>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-207">207</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-208">208</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209">209</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210">210</a></span>
@@ -4786,24 +4806,26 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-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 class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222">222</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223">223</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224">224</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-207"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-207" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-207"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_clearkey_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-208"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-208" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-208"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-209"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209"></a><span class="sd"> Get a W3C ClearKey License (JWK Set) by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-210"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-211"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211"></a><span class="sd"> Used for DASH `org.w3.clearkey` tracks. unshackle uses no CDM here: the challenge is</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-212"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212"></a><span class="sd"> the W3C EME JSON license request, e.g. ``{"kids": ["&lt;base64url&gt;"], "type": "temporary"}``,</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-213"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-213" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-213"></a><span class="sd"> and the license is a JWK Set, e.g. ``{"keys": [{"kty": "oct", "k": "...", "kid": "..."}]}``.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-214"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-214" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-214"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-215"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-215" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-215"></a><span class="sd"> :param challenge: The JSON license request bytes to POST to the license server.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-216"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-216" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-216"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-217"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-218"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-219"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219"></a><span class="sd"> :return: The JWK Set license as a dict, JSON str, or raw bytes. Return None (the default)</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-220"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220"></a><span class="sd"> to let the framework POST the challenge to the manifest-provided Laurl, if any.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-221"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221"></a><span class="sd"> Services with no license server can instead pre-populate the DRM object's</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-222"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222"></a><span class="sd"> `signatures` in get_tracks.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-223"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-224"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224"></a> <span class="k">return</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4828,9 +4850,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-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>
<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-242">242</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-243">243</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-242"><a id="unshackle.core.service.Service.close--source--__codelineno-0-242" name="unshackle.core.service.Service.close--source--__codelineno-0-242"></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-243"><a id="unshackle.core.service.Service.close--source--__codelineno-0-243" name="unshackle.core.service.Service.close--source--__codelineno-0-243"></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>
@@ -4855,11 +4877,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-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>
<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-247">247</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-248">248</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-249">249</a></span></pre></div></td><td class="code"><div><pre><span></span><code><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">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-248"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-248" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-248"></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-249"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-249" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-249"></a> <span class="k">return</span> <span class="kc">False</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4880,25 +4902,54 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<div class="doc doc-contents ">
<p>The content key, or a <code>cbcs.SampleDecrypter</code>, for <code>stsd</code> entry <code>entry</code> (1-based) of <code>track</code>.</p>
<p>unshackle calls this only for a track <code>decrypts_samples</code> names. A remote session runs it on the
server, so a decrypter that needs a local process works for remote clients too.</p>
<p>unshackle calls this only for a track <code>decrypts_samples</code> names, before TRACK_DOWNLOADED. A remote session
runs it on the server, so a decrypter that needs a local process works for remote clients too.</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_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>
<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-251">251</a></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 class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-255">255</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-256">256</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-257">257</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-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="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-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="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-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><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"> unshackle calls this only for a track `decrypts_samples` names, before TRACK_DOWNLOADED. A remote session</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-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="sd"> runs it on the server, so a decrypter that needs a local process works for remote clients too.</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-256"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-256" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-256"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-257"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-257" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-257"></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>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.service.Service.sample_decrypter" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">sample_decrypter</span>
<a href="#unshackle.core.service.Service.sample_decrypter" 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">sample_decrypter</span><span class="p">(</span><span class="n">track</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p><code>get_sample_decrypter</code> for <code>track</code>, when <code>decrypts_samples</code> names it.</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.sample_decrypter--source--__codelineno-0-259">259</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-260">260</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-261">261</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-259"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-259" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-259"></a><span class="k">def</span><span class="w"> </span><span class="nf">sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span><span class="p">[[</span><span class="nb">int</span><span class="p">],</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-260"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-260" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-260"></a><span class="w"> </span><span class="sd">"""`get_sample_decrypter` for `track`, when `decrypts_samples` names it."""</span>
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-261"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-261" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-261"></a> <span class="k">return</span> <span class="n">partial</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_sample_decrypter</span><span class="p">,</span> <span class="n">track</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">decrypts_samples</span><span class="p">(</span><span class="n">track</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4970,21 +5021,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-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>
<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>
<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-265">265</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-266">266</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-267">267</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-268">268</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-269">269</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-270">270</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-271">271</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-272">272</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-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="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-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="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-267"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-267" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-267"></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-268"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-268" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-268"></a>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-269"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-269" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-269"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-270"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-270" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-270"></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-271"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-271" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-271"></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-272"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-272" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-272"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5004,7 +5055,7 @@ server, so a decrypter that needs a local process works for remote clients too.<
<div class="doc doc-contents ">
<p>Called once when a Track has finished downloading, after unshackle decrypted its <code>drm</code>.
<p>Called once when a Track has finished downloading, after unshackle decrypted it.
In a licence-only run the track has no file.</p>
@@ -5041,21 +5092,21 @@ In a licence-only run the track has no file.</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-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>
<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>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-275">275</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 once when a Track has finished downloading, after unshackle decrypted its `drm`.</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"> In a licence-only run the track has no file.</span>
</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><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"> Parameters:</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"> track: The downloaded Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-275"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-275" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-275"></a><span class="sd"> """</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-274">274</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-275">275</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-276">276</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-277">277</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-278">278</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-279">279</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-280">280</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-281">281</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-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="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-275"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-275" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-275"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-276"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-276" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-276"></a><span class="sd"> Called once when a Track has finished downloading, after unshackle decrypted it.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-277"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-277" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-277"></a><span class="sd"> In a licence-only run the track has no file.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-278"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-278" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-278"></a>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-279"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-279" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-279"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-280"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-280" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-280"></a><span class="sd"> track: The downloaded Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-281"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-281" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-281"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5110,11 +5161,11 @@ In a licence-only run the track has no file.</p>
<code>drm</code>
</td>
<td>
<code><span title="unshackle.core.drm.DRM_T">DRM_T</span></code>
<code><span title="unshackle.core.drm.DRM_T">DRM_T</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>The DRM object it decrypted with.</p>
<p>The DRM object it decrypted with. None for a track <code>get_sample_decrypter</code> decrypted.</p>
</div>
</td>
<td>
@@ -5144,25 +5195,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-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>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-283">283</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-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>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-286">286</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-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="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-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="w"> </span><span class="sd">"""</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"> Called when a Track has finished decrypting.</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><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"> Parameters:</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"> track: The decrypted Track object.</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"> drm: The DRM object it decrypted with.</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"> 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-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"> 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-286"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-286" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-286"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-286">286</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-287">287</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-288">288</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-289">289</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-290">290</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291">291</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292">292</a></span></pre></div></td><td class="code"><div><pre><span></span><code><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="k">def</span><span class="w"> </span><span class="nf">on_track_decrypted</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">drm</span><span class="p">:</span> <span class="n">DRM_T</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">m3u8</span><span class="o">.</span><span class="n">Segment</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-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="w"> </span><span class="sd">"""</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"> Called when a Track has finished decrypting.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-286"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-286" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-286"></a>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-287"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-287" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-287"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-288"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-288" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-288"></a><span class="sd"> track: The decrypted Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-289"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-289" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-289"></a><span class="sd"> drm: The DRM object it decrypted with. None for a track `get_sample_decrypter` decrypted.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-290"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-290" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-290"></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-291"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291"></a><span class="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-292"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5218,19 +5269,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-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>
<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>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-294">294</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-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="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-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="w"> </span><span class="sd">"""</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"> Called when a Track has finished repacking.</span>
</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><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"> Parameters:</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"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-294"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-294" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-294"></a><span class="sd"> """</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-294">294</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-295">295</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-296">296</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-297">297</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-298">298</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-299">299</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-300">300</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-294"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-294" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-294"></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-295"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-295" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-295"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-296"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-296" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-296"></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-297"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-297" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-297"></a>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-298"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-298" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-298"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-299"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-299" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-299"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-300"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-300" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-300"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5289,27 +5340,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-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>
<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-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>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-306">306</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-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="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-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="w"> </span><span class="sd">"""</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"> Called immediately before unshackle multiplexes a Track into a Container.</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"> 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-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"> 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-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"> MP4 with FFmpeg/mp4box.</span>
</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><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"> Parameters:</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"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-306"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-306" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-306"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-306">306</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-307">307</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-308">308</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-309">309</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310">310</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311">311</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312">312</a></span></pre></div></td><td class="code"><div><pre><span></span><code><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="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-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="w"> </span><span class="sd">"""</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"> Called immediately before unshackle multiplexes a Track into a Container.</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><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-306"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-306" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-306"></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-307"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-307" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-307"></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-308"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-308" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-308"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-309"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-309" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-309"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-310"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-311"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-312"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
+54 -4
View File
@@ -2743,6 +2743,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.DownloadContext.sample_decrypter" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;sample_decrypter
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4442,6 +4453,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.DownloadContext.sample_decrypter" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;sample_decrypter
</span>
</a>
</li>
<li class="md-nav__item">
@@ -8097,7 +8119,8 @@ Use this to fix the positioning of sentence-ending characters.</p>
</span><span id="__span-0-10"><a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a> <span class="n">license_widevine</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a> <span class="n">cdm</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a> <span class="n">on_segments</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a><span class="p">)</span>
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a> <span class="n">sample_decrypter</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14" href="#__codelineno-0-14"></a><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
@@ -8149,6 +8172,31 @@ Use this to fix the positioning of sentence-ending characters.</p>
</div>
<div class="doc doc-object doc-attribute">
<h3 id="unshackle.core.tracks.DownloadContext.sample_decrypter" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">sample_decrypter</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-class-attribute"><code>class-attribute</code></small>
<small class="doc doc-label doc-label-instance-attribute"><code>instance-attribute</code></small>
</span>
<a href="#unshackle.core.tracks.DownloadContext.sample_decrypter" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">sample_decrypter</span> <span class="o">=</span> <span class="kc">None</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The service's key or <code>cbcs.SampleDecrypter</code> for a 1-based <code>stsd</code> entry, for a track it decrypts itself.</p>
</div>
</div>
@@ -8542,14 +8590,16 @@ remote client asks for its URL.</p>
</span><span id="__span-0-10"><a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a> <span class="n">adaptive_workers</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a> <span class="n">download_processes</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a> <span class="n">on_segments</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a><span class="p">)</span>
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a> <span class="n">sample_decrypter</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14" href="#__codelineno-0-14"></a><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Download and optionally Decrypt this Track.</p>
<p>Download and optionally Decrypt this Track, then emit TRACK_DOWNLOADED.</p>
<p>For a URL-descriptor Video or Audio track with no <code>drm</code> set, unshackle probes the DRM from the
track's init data and stores it on the track, so a service need not declare <code>drm</code> itself.</p>
track's init data and stores it on the track, so a service need not declare <code>drm</code> itself.
<code>sample_decrypter</code> decrypts a track the service decrypts itself (see DownloadContext).</p>
</div>
+1 -1
View File
@@ -2285,7 +2285,7 @@ is the <a href="../../../dev/rest-api/">REST API</a> section. These are the conf
<td><code>session_ttl</code></td>
<td>int (s)</td>
<td><code>300</code></td>
<td>Seconds a remote session can stay idle before it expires. A remote client sends keep-alive requests to its remote session during a download, so the remote session does not expire during a long download.</td>
<td>Seconds a remote session can stay idle before it expires. A remote client sends keep-alive requests to its remote session during a download, so the remote session does not expire during a long download. A remote session that still logs in can stay idle for the larger of this value and 600 seconds.</td>
</tr>
<tr>
<td><code>max_sessions</code></td>
File diff suppressed because one or more lines are too long