Deployed 3b6bd02e with MkDocs version: 1.6.1

This commit is contained in:
2026-12-02 22:25:59 +00:00
parent e09254fdaf
commit db7b0bba39
14 changed files with 656 additions and 276 deletions
+3 -1
View File
@@ -3120,7 +3120,9 @@ 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 track and after <code>on_track_decrypted</code>. Also override <code>search()</code> to yield
unshackle decrypted the track and after <code>on_track_decrypted</code>. A <code>--remote</code> client runs none
of these hooks and no <code>track.downloader</code> of the service, so put what the client needs in
<code>track.data</code>, or leave it to core. 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>
+10 -8
View File
@@ -3779,7 +3779,7 @@ ignore it safely. See <a href="../../creating-a-service/#split-episodes">Split e
</span><span id="__span-8-17"><a id="__codelineno-8-17" name="__codelineno-8-17" href="#__codelineno-8-17"></a><span class="w"> </span><span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"a-1"</span><span class="p">,</span><span class="w"> </span><span class="nt">"codec"</span><span class="p">:</span><span class="w"> </span><span class="s2">"EC3"</span><span class="p">,</span><span class="w"> </span><span class="nt">"codec_display"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DDP"</span><span class="p">,</span>
</span><span id="__span-8-18"><a id="__codelineno-8-18" name="__codelineno-8-18" href="#__codelineno-8-18"></a><span class="w"> </span><span class="nt">"bitrate"</span><span class="p">:</span><span class="w"> </span><span class="mi">640</span><span class="p">,</span><span class="w"> </span><span class="nt">"bitrate_bps"</span><span class="p">:</span><span class="w"> </span><span class="mi">640000</span><span class="p">,</span><span class="w"> </span><span class="nt">"channels"</span><span class="p">:</span><span class="w"> </span><span class="s2">"5.1"</span><span class="p">,</span><span class="w"> </span><span class="nt">"language"</span><span class="p">:</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span>
</span><span id="__span-8-19"><a id="__codelineno-8-19" name="__codelineno-8-19" href="#__codelineno-8-19"></a><span class="w"> </span><span class="nt">"is_original"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="nt">"is_original_lang"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="nt">"atmos"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"joc"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
</span><span id="__span-8-20"><a id="__codelineno-8-20" name="__codelineno-8-20" href="#__codelineno-8-20"></a><span class="w"> </span><span class="nt">"descriptive"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="nt">"track_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"English"</span><span class="p">,</span><span class="w"> </span><span class="nt">"needs_repack"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"edition"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span>
</span><span id="__span-8-20"><a id="__codelineno-8-20" name="__codelineno-8-20" href="#__codelineno-8-20"></a><span class="w"> </span><span class="nt">"descriptive"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"bit_depth"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="nt">"sample_rate"</span><span class="p">:</span><span class="w"> </span><span class="mi">48000</span><span class="p">,</span><span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="nt">"track_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"English"</span><span class="p">,</span><span class="w"> </span><span class="nt">"needs_repack"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"edition"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span>
</span><span id="__span-8-21"><a id="__codelineno-8-21" name="__codelineno-8-21" href="#__codelineno-8-21"></a><span class="w"> </span><span class="nt">"note"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="nt">"data"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="nt">"drm"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span><span class="w"> </span><span class="nt">"descriptor"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DASH"</span>
</span><span id="__span-8-22"><a id="__codelineno-8-22" name="__codelineno-8-22" href="#__codelineno-8-22"></a><span class="w"> </span><span class="p">}</span>
</span><span id="__span-8-23"><a id="__codelineno-8-23" name="__codelineno-8-23" href="#__codelineno-8-23"></a><span class="w"> </span><span class="p">],</span>
@@ -3812,7 +3812,7 @@ ignore it safely. See <a href="../../creating-a-service/#split-episodes">Split e
</div>
<p>The server sorts tracks by bitrate, descending. Episodes the server cannot get go into <code>unavailable_episodes</code>, rather than failing the whole request. Track objects here do <strong>not</strong> include a download <code>url</code>. Only the remote session endpoints give segment URLs.</p>
<p>The <code>drm</code> array on a track is a list of <code>{type, pssh?, kids?, content_keys?, license_url?}</code> objects.</p>
<p>Every track carries the same fields as a local track: <code>is_original_lang</code>, <code>name</code>, <code>needs_repack</code>, <code>edition</code>, <code>note</code>, and <code>data</code>. <code>name</code> is the name the service set, or null. <code>note</code> is display text the service set, such as an encoding profile, or null: <code>--list</code> shows it, but the filename and the mux do not use it. <code>track_name</code> is the name <code>--list</code> shows and the mux writes to an audio or subtitle track: <code>name</code> when the service set one, else the name of the language (English, or in the language itself when the server sets <code>muxing.track_names: native</code>, or no name when it sets <code>none</code>), then the server's <code>muxing.original_label</code> on an original-language track, then the SDH, CC, Forced or Descriptive label. <code>bitrate</code> is in kb/s, and <code>bitrate_bps</code> gives the exact bits/s. <code>data</code> holds the part of the service-set <code>track.data</code> that fits in JSON, without the <code>hls</code>, <code>dash</code>, and <code>ism</code> parser keys. Audio keeps <code>is_original</code> and <code>atmos</code> for clients that read them, and adds the exact <code>joc</code> object count.</p>
<p>Every track carries the same fields as a local track: <code>is_original_lang</code>, <code>name</code>, <code>needs_repack</code>, <code>edition</code>, <code>note</code>, and <code>data</code>. <code>name</code> is the name the service set, or null. <code>note</code> is display text the service set, such as an encoding profile, or null: <code>--list</code> shows it, but the filename and the mux do not use it. <code>track_name</code> is the name <code>--list</code> shows and the mux writes to an audio or subtitle track: <code>name</code> when the service set one, else the name of the language (English, or in the language itself when the server sets <code>muxing.track_names: native</code>, or no name when it sets <code>none</code>), then the server's <code>muxing.original_label</code> on an original-language track, then the SDH, CC, Forced or Descriptive label. <code>bitrate</code> is in kb/s, and <code>bitrate_bps</code> gives the exact bits/s. <code>data</code> holds the part of the service-set <code>track.data</code> that fits in JSON, without the <code>hls</code>, <code>dash</code>, and <code>ism</code> parser keys. Audio keeps <code>is_original</code> and <code>atmos</code> for clients that read them, and adds the exact <code>joc</code> object count. Audio <code>bit_depth</code> and <code>sample_rate</code> (Hz) are integers, or null when the manifest and the service do not give them.</p>
<table>
<thead>
<tr>
@@ -5247,6 +5247,7 @@ A slow answer arrives as a <a href="#slow-responses">slow response</a>.</p>
<h3 id="post-apisessionsession_idtracks"><code>POST /api/session/{session_id}/tracks</code><a class="headerlink" href="#post-apisessionsession_idtracks" title="Permanent link">&para;</a></h3>
<p>Get tracks and chapters for a specific title within the remote session. Body: <code>{ "title_id": "..." }</code> (required). Unlike <code>list-tracks</code>, track objects here <strong>include</strong> download URLs, along with session headers/cookies and manifest data the client needs to download directly. A slow answer arrives as a <a href="#slow-responses">slow response</a>.</p>
<p><code>manifests</code> holds each served DASH/ISM manifest once. For DASH, <code>filtered_period_ids</code> names the periods that the download skips, such as ad periods. A service can build an AdaptationSet of its own that the served manifest does not contain. <code>track_manifests</code> holds a one-track MPD for each such track, and the client re-parses that in place of the whole manifest. That MPD starts at the period of the track and keeps the content periods after it.</p>
<p><code>hls_playlists</code> holds the media playlist text of each HLS track that the service holds as text, with the track URL. A <code>file:</code> URL is never sent: such an entry has <code>url</code> set to <code>null</code>. The client keeps an entry only when it parses as a media playlist whose segment URIs are absolute <code>http</code> or <code>https</code> URLs, and is for the same URL as its track. Otherwise it logs <code>Refusing track &lt;id&gt;: its HLS playlist ...</code> and drops the track.</p>
<div class="tabbed-set tabbed-alternate" data-tabs="25:1"><input checked="checked" id="__tabbed_25_1" name="__tabbed_25" type="radio" /><div class="tabbed-labels"><label for="__tabbed_25_1">Response <code>200</code></label></div>
<div class="tabbed-content">
<div class="tabbed-block">
@@ -5259,11 +5260,12 @@ A slow answer arrives as a <a href="#slow-responses">slow response</a>.</p>
</span><span id="__span-39-7"><a id="__codelineno-39-7" name="__codelineno-39-7" href="#__codelineno-39-7"></a><span class="w"> </span><span class="nt">"attachments"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://..."</span><span class="p">,</span><span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"font.ttf"</span><span class="p">,</span><span class="w"> </span><span class="nt">"mime_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"font/ttf"</span><span class="p">,</span><span class="w"> </span><span class="nt">"description"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">],</span>
</span><span id="__span-39-8"><a id="__codelineno-39-8" name="__codelineno-39-8" href="#__codelineno-39-8"></a><span class="w"> </span><span class="nt">"manifests"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"dash"</span><span class="p">,</span><span class="w"> </span><span class="nt">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://..."</span><span class="p">,</span><span class="w"> </span><span class="nt">"data"</span><span class="p">:</span><span class="w"> </span><span class="s2">"&lt;base64 zlib xml&gt;"</span><span class="p">,</span><span class="w"> </span><span class="nt">"filtered_period_ids"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="s2">"ad-1"</span><span class="w"> </span><span class="p">]</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">],</span>
</span><span id="__span-39-9"><a id="__codelineno-39-9" name="__codelineno-39-9" href="#__codelineno-39-9"></a><span class="w"> </span><span class="nt">"track_manifests"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">"track_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"s-1"</span><span class="p">,</span><span class="w"> </span><span class="nt">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"dash"</span><span class="p">,</span><span class="w"> </span><span class="nt">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://..."</span><span class="p">,</span><span class="w"> </span><span class="nt">"data"</span><span class="p">:</span><span class="w"> </span><span class="s2">"&lt;base64 zlib xml&gt;"</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">],</span>
</span><span id="__span-39-10"><a id="__codelineno-39-10" name="__codelineno-39-10" href="#__codelineno-39-10"></a><span class="w"> </span><span class="nt">"session_headers"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">"User-Agent"</span><span class="p">:</span><span class="w"> </span><span class="s2">"..."</span><span class="w"> </span><span class="p">},</span>
</span><span id="__span-39-11"><a id="__codelineno-39-11" name="__codelineno-39-11" href="#__codelineno-39-11"></a><span class="w"> </span><span class="nt">"session_cookies"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">"sid"</span><span class="p">:</span><span class="w"> </span><span class="s2">"..."</span><span class="w"> </span><span class="p">},</span>
</span><span id="__span-39-12"><a id="__codelineno-39-12" name="__codelineno-39-12" href="#__codelineno-39-12"></a><span class="w"> </span><span class="nt">"session_cookie_jar"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"sid"</span><span class="p">,</span><span class="w"> </span><span class="nt">"value"</span><span class="p">:</span><span class="w"> </span><span class="s2">"..."</span><span class="p">,</span><span class="w"> </span><span class="nt">"domain"</span><span class="p">:</span><span class="w"> </span><span class="s2">".example.com"</span><span class="p">,</span><span class="w"> </span><span class="nt">"path"</span><span class="p">:</span><span class="w"> </span><span class="s2">"/"</span><span class="p">,</span><span class="w"> </span><span class="nt">"secure"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">],</span>
</span><span id="__span-39-13"><a id="__codelineno-39-13" name="__codelineno-39-13" href="#__codelineno-39-13"></a><span class="w"> </span><span class="nt">"server_cdm_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"widevine"</span>
</span><span id="__span-39-14"><a id="__codelineno-39-14" name="__codelineno-39-14" href="#__codelineno-39-14"></a><span class="p">}</span>
</span><span id="__span-39-10"><a id="__codelineno-39-10" name="__codelineno-39-10" href="#__codelineno-39-10"></a><span class="w"> </span><span class="nt">"hls_playlists"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">"track_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v-1"</span><span class="p">,</span><span class="w"> </span><span class="nt">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://..."</span><span class="p">,</span><span class="w"> </span><span class="nt">"data"</span><span class="p">:</span><span class="w"> </span><span class="s2">"&lt;base64 zlib m3u8&gt;"</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">],</span>
</span><span id="__span-39-11"><a id="__codelineno-39-11" name="__codelineno-39-11" href="#__codelineno-39-11"></a><span class="w"> </span><span class="nt">"session_headers"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">"User-Agent"</span><span class="p">:</span><span class="w"> </span><span class="s2">"..."</span><span class="w"> </span><span class="p">},</span>
</span><span id="__span-39-12"><a id="__codelineno-39-12" name="__codelineno-39-12" href="#__codelineno-39-12"></a><span class="w"> </span><span class="nt">"session_cookies"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">"sid"</span><span class="p">:</span><span class="w"> </span><span class="s2">"..."</span><span class="w"> </span><span class="p">},</span>
</span><span id="__span-39-13"><a id="__codelineno-39-13" name="__codelineno-39-13" href="#__codelineno-39-13"></a><span class="w"> </span><span class="nt">"session_cookie_jar"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"sid"</span><span class="p">,</span><span class="w"> </span><span class="nt">"value"</span><span class="p">:</span><span class="w"> </span><span class="s2">"..."</span><span class="p">,</span><span class="w"> </span><span class="nt">"domain"</span><span class="p">:</span><span class="w"> </span><span class="s2">".example.com"</span><span class="p">,</span><span class="w"> </span><span class="nt">"path"</span><span class="p">:</span><span class="w"> </span><span class="s2">"/"</span><span class="p">,</span><span class="w"> </span><span class="nt">"secure"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">],</span>
</span><span id="__span-39-14"><a id="__codelineno-39-14" name="__codelineno-39-14" href="#__codelineno-39-14"></a><span class="w"> </span><span class="nt">"server_cdm_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"widevine"</span>
</span><span id="__span-39-15"><a id="__codelineno-39-15" name="__codelineno-39-15" href="#__codelineno-39-15"></a><span class="p">}</span>
</span></code></pre></div>
</div>
</div>
@@ -5475,7 +5477,7 @@ A slow answer arrives as a <a href="#slow-responses">slow response</a>.</p>
</tr>
<tr>
<td><code>drm_type</code></td>
<td><code>widevine</code> (default) or <code>playready</code>. In server-CDM mode the server's <code>cdm</code> mapping for the service decides the DRM system and the response <code>drm_type</code> names the system that licensed. A mapping with a device for each system takes the system of the device the remote session loaded. With no mapping, the client's value decides when the track carries that system; else a system the track carries decides, PlayReady first. The tracks response <code>server_cdm_type</code> names the system the same order gives for the title's tracks. A track whose DRM is a whole-file cipher takes <code>clearkeyctr</code> with no <code>pssh</code>: the service on the server licenses it.</td>
<td><code>widevine</code> (default) or <code>playready</code>. In server-CDM mode the server's <code>cdm</code> mapping for the service decides the DRM system and the response <code>drm_type</code> names the system that licensed. A mapping with a device for each system takes the system of the device the remote session loaded. With no mapping, the client's value decides when the track carries that system; else a system the track carries decides, PlayReady first. The tracks response <code>server_cdm_type</code> names the system the same order gives for the title's tracks. A track whose DRM is a whole-file cipher takes <code>clearkeyctr</code> with no <code>pssh</code>: the service on the server licenses it. A MonaLisa track takes <code>monalisa</code> with no <code>pssh</code> and <code>mode</code> <code>server_cdm</code>: the server answers in <code>keys</code> with the content key that its service extracted, and only in a session that uses the server CDM.</td>
</tr>
<tr>
<td><code>mode</code></td>
+3 -1
View File
@@ -2695,7 +2695,9 @@ DASH/ISM manifests as compressed XML so the client can re-parse them locally for
downloading. A service can build an AdaptationSet of its own that the served
manifest does not contain. Each such track gets a one-track MPD in
<code>track_manifests</code>, with the content periods after its own, and the client
re-parses that instead. The client skips the same DASH periods as the server. Any
re-parses that instead. An HLS track whose service holds its media playlist as text
gets that text in <code>hls_playlists</code>. The client drops the track when the text is not a
media playlist with absolute <code>http</code> or <code>https</code> segment URIs. The client skips the same DASH periods as the server. Any
<code>session_headers</code> and cookies the server used are merged into the
client's local HTTP session. Each cookie in <code>session_cookie_jar</code> keeps its
domain, path and <code>secure</code> flag, so it goes only to its own hosts. <code>session_cookies</code> carries
+26 -6
View File
@@ -2982,8 +2982,10 @@ for example <code>artists</code> (a list) and <code>replaygain_track_gain</code>
bitrate it offers for a <code>Song</code></strong>. The framework then selects one with its usual audio
options, <code>-a</code>/<code>--acodec</code> and <code>--abitrate</code>, and its usual audio sorting. A movie or an
episode uses the same options. <code>-q</code>/<code>--quality</code> sets the video height only and does not
apply to music. <code>Audio</code> has no <code>bit_depth</code> or <code>sample_rate</code> field. Therefore <code>bitrate</code>
separates a hi-res FLAC from a CD FLAC, and the audio sort already ranks it.</p>
apply to music. The audio sort ranks a hi-res FLAC above a CD FLAC by <code>bitrate</code>. Set
<code>bit_depth</code> and <code>sample_rate</code> (Hz) on each <code>Audio</code> track, and <code>--list</code> shows them as
"24-bit / 96 kHz", so do not write that text into <code>name</code>. The same two keys in
<code>Song.data</code> give the Hi-Res badge in the release listing.</p>
<p>A <code>Song</code> is an ordinary <code>Title</code> on the one generic download path. unshackle has no
music-specific service API and no separate music download loop. The
<code>GROUP_AUDIO_DOWNLOADS</code> flag, <code>get_music_track_options</code> and <code>get_music_collection_label</code>
@@ -3059,6 +3061,12 @@ do not give a <code>name</code>, unshackle derives a human-readable name from th
track that it downloads. Over <code>--remote</code>, the client asks the server for the URL of
each track it downloads, and the server calls the callable then. A track whose callable
fails gets no URL, and its download fails.</p>
<p>When the service has the media playlist of an HLS track as text and no playlist URL, set
<code>track.data["hls"]["playlist_text"]</code> to the text, and set <code>url</code> to a URL that its segment URIs
resolve against. unshackle downloads from the text and does not fetch a playlist. A <code>from_file</code>
playlist works the same way. Over <code>--remote</code> and in an export, the text goes with the track,
but a <code>file:</code> URL does not. The client accepts the text only as a media playlist whose segment
URIs are absolute <code>http</code> or <code>https</code> URLs, and drops the track otherwise.</p>
<h3 id="video"><code>Video</code><a class="headerlink" href="#video" title="Permanent link">&para;</a></h3>
<p><code>Video</code> adds <code>codec</code>, <code>range</code>, <code>bitrate</code>, <code>width</code>, <code>height</code>, <code>fps</code>, <code>scan_type</code>, and
closed-caption descriptors. The relevant enums:</p>
@@ -3074,9 +3082,16 @@ closed-caption descriptors. The relevant enums:</p>
<p>Both <code>Video</code> and <code>Audio</code> store <code>bitrate</code> in <strong>bits per second</strong> (rounded up). The
string form displays kb/s, and <code>--vbitrate</code> and <code>--abitrate</code> compare in kb/s.</p>
</div>
<p>When the file of a track also holds a track of another kind, set <code>track.data["own_stream_only"] = True</code>
on the track. The mux then takes from that file only the track of the same kind: the video of a video
track, or the audio of an audio track. Use it for a video file with in-band audio that the
service also gives as audio tracks, or for an audio version that comes as a whole video file.
The value also goes to a <code>--remote</code> client. A track without it muxes everything in its file.</p>
<h3 id="audio"><code>Audio</code><a class="headerlink" href="#audio" title="Permanent link">&para;</a></h3>
<p><code>Audio</code> adds <code>bitrate</code>, <code>channels</code>, <code>joc</code> (Joint Object Coding, the Atmos indicator),
and <code>descriptive</code>. <code>Audio.Codec</code> covers <code>AAC</code>, <code>AC3</code> (<code>DD</code>), <code>EC3</code> (<code>DD+</code>), <code>AC4</code>,
<code>descriptive</code>, <code>bit_depth</code> and <code>sample_rate</code> (Hz). DASH sets <code>sample_rate</code> from
<code>audioSamplingRate</code>, ISM from <code>SamplingRate</code>, and HLS sets both from the <code>BIT-DEPTH</code> and
<code>SAMPLE-RATE</code> attributes when the playlist has them. A service sets <code>bit_depth</code> itself. <code>Audio.Codec</code> covers <code>AAC</code>, <code>AC3</code> (<code>DD</code>), <code>EC3</code> (<code>DD+</code>), <code>AC4</code>,
<code>OPUS</code>, <code>OGG</code> (Vorbis), <code>DTS</code>, <code>DTSX</code>, <code>DTSHD</code>, <code>MPEGH</code>, <code>AV3A</code> (Audio Vivid), <code>ALAC</code>, <code>FLAC</code>, and <code>MP3</code>. The <code>atmos</code> property is <code>True</code> when
<code>joc</code> is set (or when <code>extra</code> flags it).</p>
<h3 id="subtitle"><code>Subtitle</code><a class="headerlink" href="#subtitle" title="Permanent link">&para;</a></h3>
@@ -3188,6 +3203,9 @@ least one and no track is left.</p>
<li><strong>HLS</strong> re-fetches the media playlist at download time, recovers <code>SUPPLEMENTAL-CODECS</code>
from raw text (python-m3u8 drops it) to detect Dolby Vision composite streams, and uses
the media-sequence-number IV for AES-128 keys that have no explicit IV.</li>
<li><strong>Segments</strong> of each format: unshackle inflates a segment body that is one whole gzip member
before the merge, up to a size limit. A CDN can send such a body with no <code>Content-Encoding</code>
header. Any other body stays as it is, such as AES-128 ciphertext that starts with the gzip magic.</li>
<li><strong>ISM</strong> has no list of segments and no init segments: the parser synthesizes segment URLs
from the <code>&lt;c&gt;</code> fragment timeline, and rebuilds a <code>moov</code>/<code>ftyp</code> init box from <code>CodecPrivateData</code>
(supported for AVC, HEVC, DV-over-HEVC, AAC, EC-3, and TTML). A track id covers the manifest
@@ -3229,7 +3247,7 @@ service to talk to the platform's license server. unshackle recognizes seven DRM
<tr>
<td><code>MonaLisa</code></td>
<td>Proprietary WASM DRM</td>
<td>keys extracted locally; no license server. <code>command_builder</code> sets the command of the decryption backend, and <code>segment_decrypt=False</code> runs it once on the merged file</td>
<td>keys extracted locally; no license server. Without <code>tool_path</code>, core uses <code>bbtsdecrypt</code> per segment, else its built-in decrypter (<code>core/drm/bbts.py</code>) per segment. <code>command_builder</code> sets the command of the decryption backend, and <code>segment_decrypt=False</code> runs it once on the merged file. Over <code>--remote</code> only the KID goes to the client, and the server sends the content key under the server CDM. An export also holds only the KID as its DRM, never the tool or the command. One process extracts the keys of one ticket at a time, because the wasmtime bindings are not thread-safe</td>
</tr>
<tr>
<td><code>BlowfishStripe</code></td>
@@ -3449,14 +3467,16 @@ prepared, all derived from the Click context (<code>ctx</code>) that <code>dl</c
everywhere. (unshackle also ships an rnet-based TLS-fingerprinting HTTP session that the
newer <code>session()</code> factory uses and that the <code>network</code> config key configures.)</li>
<li><strong><code>self.credential</code></strong>: the active <code>Credential</code> (<code>username:password[:extra]</code>), populated
by <code>authenticate</code>. unshackle uses its <code>sha1</code> as the account hash for cache keys.</li>
by <code>authenticate</code>. unshackle uses its <code>sha1</code> as the account hash for cache keys. A login
with cookies only uses a hash of the path of its cookie file.</li>
<li><strong><code>self.cache</code></strong>: a generic <code>Cacher</code>: JSON key/value storage under the service's cache
dir, with CRC32 integrity checks, versioning, and optional expiry (auto-derived from a
JWT <code>exp</code> claim when present). Good for auth tokens and API responses.</li>
<li><strong><code>self.title_cache</code></strong>: a <code>TitleCacher</code> that wraps <code>get_titles</code> results, keyed by title
ID, region, and account hash. It serves fresh data within <code>title_cache_time</code>, falls back
to stale data within <code>title_cache_max_retention</code> when an API call fails, and <code>--no-cache</code>
bypasses it.</li>
bypasses it. If you put the cookies of a different account into the same cookie file, use
<code>--reset-cache</code> once.</li>
<li><strong><code>self.track_request</code></strong>: the <code>TrackRequest</code> describing what the user asked for
(codecs, ranges, best-available), for use inside <code>get_tracks</code>.</li>
</ul>
+5 -1
View File
@@ -3600,6 +3600,10 @@ and keeps the service's numbering unchanged. Pick an order that covers the whole
<p class="admonition-title">Some flags cannot be combined</p>
<p><code>--select-titles</code> and <code>--wanted</code> are mutually exclusive. <code>--vbitrate</code> and <code>--vbitrate-range</code> (and the audio equivalents) are mutually exclusive.</p>
</div>
<div class="admonition info">
<p class="admonition-title">Exit codes</p>
<p><code>dl</code> exits with code 1 when a track download or a mux fails, or when a missing track or language stops the run. A signal gives code 128 plus the signal number: 143 for SIGTERM. A run that ends without a failure, a <code>--list</code> run included, exits with code 0.</p>
</div>
<hr />
<h2 id="search"><code>search</code><a class="headerlink" href="#search" title="Permanent link">&para;</a></h2>
<p>Find titles on a service. Like <code>dl</code>, <code>search</code> is a group whose subcommands are the installed services, and it reuses <code>dl</code>'s authentication, cookie, and proxy machinery.</p>
@@ -3658,7 +3662,7 @@ and keeps the service's numbering unchanged. Pick an order that covers the whole
<p>Reconstruct a download (download → decrypt → mux) from an <code>--export</code> JSON file without re-contacting the service. It uses the DASH or ISM manifest that the export saved, or fetches the manifest again when the export has none. It injects the stored keys and then runs the normal <code>dl</code> pipeline. The service tag is read from the export file, not passed by you.</p>
<div class="language-text highlight"><pre><span></span><code><span id="__span-5-1"><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a>unshackle import EXPORT_FILE [DL_ARGS...]
</span></code></pre></div>
<p>unshackle forwards any <code>dl</code> options after the file verbatim, so you can override quality, range, proxy, and so on.</p>
<p>unshackle forwards any <code>dl</code> options after the file verbatim, so you can override quality, range, proxy, and so on. The import selects tracks with the <code>dl</code> defaults, not with the selection of the export. Give the selection options of the export again, for example <code>-r HYBRID</code> for an export of HDR tracks.</p>
<div class="admonition example">
<p class="admonition-title">Example</p>
<div class="language-shell highlight"><pre><span></span><code><span id="__span-6-1"><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a>unshackle<span class="w"> </span>import<span class="w"> </span>export.json
+2 -1
View File
@@ -3704,7 +3704,8 @@ picks the bitrate. If you set neither, unshackle takes the best track.</p>
<p class="admonition-title">Two FLAC tracks in one release</p>
<p>A service can offer both a CD FLAC and a hi-res FLAC. The two have the same codec, so
the bitrate is what separates them. Use <code>--list</code> to read the bitrates, then give <code>-ab</code>
the one you want.</p>
the one you want. When the service gives them, <code>--list</code> also shows the bit depth and
sample rate, such as "24-bit / 96 kHz".</p>
</div>
<h2 id="languages">Languages<a class="headerlink" href="#languages" title="Permanent link">&para;</a></h2>
<h3 id="video-and-audio-language">Video and audio language<a class="headerlink" href="#video-and-audio-language" title="Permanent link">&para;</a></h3>
+2 -2
View File
@@ -2683,8 +2683,8 @@ license-server handshake. The rest are special cases.</p>
<tr>
<td><strong>MonaLisa</strong> (proprietary, WASM)</td>
<td><code>.mld</code></td>
<td>Ticket from the service API; keys extracted locally via WASM. No license server.</td>
<td>External tool that the service names, per segment or on the whole track</td>
<td>Ticket from the service API; keys extracted locally via WASM. No license server. Over <code>--remote</code> the server extracts the content key and sends it to the client, only when the remote session uses the server CDM.</td>
<td>The tool that the service names, else <code>bbtsdecrypt</code> per segment, else the built-in decrypter per segment, which needs no tool. Over <code>--remote</code> the client decrypts with its own tool or the built-in decrypter. An export holds the KID and the content key, and an import decrypts like a <code>--remote</code> client. After the merge FFmpeg decode-checks the video track; a content key that does not decode stops the track.</td>
</tr>
<tr>
<td><strong>Blowfish stripe</strong></td>
+5
View File
@@ -2745,6 +2745,11 @@
<p><strong>Inspect:</strong> the licence server gave no content key for a key ID of the init segments, or gave a PlayReady or Widevine content key that is not the FairPlay one. unshackle flags a content key that does not decode. The next licence of that key ID clears the flag, so each run licenses and checks the key again. Operate unshackle with <code>-d</code> and read the <code>Key check on</code> debug line for the result of each window. See <a href="../drm-and-cdm/">DRM &amp; CDM</a>.</p>
</div>
<div class="admonition example">
<p class="admonition-title">A MonaLisa track stops after its decryption</p>
<p><strong>Symptom:</strong> the download of a MonaLisa video track stops with <code>The MonaLisa content key of KID &lt;kid&gt; does not decrypt track &lt;id&gt;</code>, and unshackle keeps no output file.</p>
<p><strong>Inspect:</strong> FFmpeg could not decode the decrypted track, so the content key is wrong, or the platform changed its BBTS format and the decrypter no longer fits it. unshackle flags the pair in the local vaults and does not copy it to another vault. Run again with the other decrypter: hide <code>bbtsdecrypt</code> to use the built-in one, or install it. If both fail, the content key is wrong. See <a href="../drm-and-cdm/">DRM &amp; CDM</a>.</p>
</div>
<div class="admonition example">
<p class="admonition-title">A network request fails at the connection or TLS layer</p>
<p><strong>Symptom:</strong> timeouts, connection resets, or handshake errors, and unshackle's own logs do not give the full cause.</p>
<p><strong>Inspect:</strong> set <code>debug_requests: true</code> and operate unshackle with <code>-d</code> to show the underlying <code>urllib3</code> / <code>rnet</code> / <code>httpx</code> logs. In the JSON debug log, filter for <code>http_request</code> operations to see which request failed, with its status, attempt number and failure. If you use a proxy, also read <a href="../proxies-and-vpn/">Proxies &amp; VPN</a>.</p>
+2 -2
View File
@@ -2404,7 +2404,7 @@
</ul>
<p>unshackle pushes keys from every source, not only a local CDM. A run against a remote server that licenses with its own CDM (<code>--remote</code>) writes the keys the server returns, and <code>unshackle import</code> writes the keys it reads from an export file.</p>
<h3 id="wrong-keys-from-a-poisoned-vault">Wrong keys from a poisoned vault<a class="headerlink" href="#wrong-keys-from-a-poisoned-vault" title="Permanent link">&para;</a></h3>
<p>A public vault can return the right KID with a wrong content key. The decrypters accept a wrong content key and write noise. unshackle therefore trusts a content key from a vault only after FFmpeg decodes the decrypted track with strict error detection. For a fragmented MP4, unshackle reads from the encrypted file which fragments each KID encrypts, and FFmpeg decodes up to three windows of each KID: from its first, middle and last fragment on through the next fragments of that KID, for up to 4 seconds. A window never runs into a fragment of another KID or a clear fragment. A clear lead or a lead under another KID therefore cannot hide a wrong content key, and only the KID that fails is flagged. When every KID in the map has a content key, the map is complete, and a KID that is not in it does not encrypt this file. This file does not judge that KID; the file of its own track judges it. A file with no encrypted sample entry and no encrypted fragment, for example a clear audio track, judges no KID, so it neither flags nor copies a content key. A KID that is not in an incomplete map, for example one with an all-zero KID, and every KID of any other file, gets one check of the whole file. FFmpeg decodes the first seconds and the last seconds. A failure there flags each of those KIDs. When a mapped KID fails, the KIDs that are not in the map get no verdict from that pass; the retry with the replaced key judges them. Content keys from a licence skip this check, except those of a FairPlay-only track that the FairPlay bridge licensed. An import also checks these content keys when it reads them from an export file. When one of these fails, unshackle flags the pair, stops the track and keeps no output file. A file this FFmpeg build cannot judge counts as a pass, never as a wrong content key: a codec it has no decoder for, or a header it cannot read. A pass is not proof. A wrong content key for HEVC video can decode without an error for some seconds, most often at a low resolution, and that content key passes the check. Without FFmpeg there is no check at all.</p>
<p>A public vault can return the right KID with a wrong content key. The decrypters accept a wrong content key and write noise. unshackle therefore trusts a content key from a vault only after FFmpeg decodes the decrypted track with strict error detection. For a fragmented MP4, unshackle reads from the encrypted file which fragments each KID encrypts, and FFmpeg decodes up to three windows of each KID: from its first, middle and last fragment on through the next fragments of that KID, for up to 4 seconds. A window never runs into a fragment of another KID or a clear fragment. A clear lead or a lead under another KID therefore cannot hide a wrong content key, and only the KID that fails is flagged. When every KID in the map has a content key, the map is complete, and a KID that is not in it does not encrypt this file. This file does not judge that KID; the file of its own track judges it. A file with no encrypted sample entry and no encrypted fragment, for example a clear audio track, judges no KID, so it neither flags nor copies a content key. A KID that is not in an incomplete map, for example one with an all-zero KID, and every KID of any other file, gets one check of the whole file. FFmpeg decodes the first seconds and the last seconds. A failure there flags each of those KIDs. When a mapped KID fails, the KIDs that are not in the map get no verdict from that pass; the retry with the replaced key judges them. Content keys from a licence skip this check, with two exceptions: a FairPlay-only track that the FairPlay bridge licensed, and a MonaLisa video track. A MonaLisa track is MPEG-TS, so it gets the check of the whole file after the merge of its decrypted segments. This applies to both decrypters. An import also checks these content keys when it reads them from an export file. When one of these fails, unshackle flags the pair, stops the track and keeps no output file. A file this FFmpeg build cannot judge counts as a pass, never as a wrong content key: a codec it has no decoder for, or a header it cannot read. A BBTS decrypter keeps the continuity counter of a TS packet that it empties, so unshackle corrects the counters of a MonaLisa track before the check. A pass is not proof. A wrong content key for HEVC video can decode without an error for some seconds, most often at a low resolution, and that content key passes the check. Damage to a small part of the slice data, such as one corrupt NAL unit, also often decodes without an error. Without FFmpeg there is no check at all.</p>
<p>When the decode fails, unshackle:</p>
<ol>
<li>Flags the KID:KEY in the <code>bad_keys</code> table of every local SQLite vault, with the service and the name of the vault it came from. The pair also goes out of the service table, except in a vault marked <code>no_push</code>, where only the flag is written. A flagged pair cannot go back into a local vault from another vault, a later run, or <code>kv copy</code>. A licence that returns the pair clears the flag and stores it. An <code>API</code> vault that served the pair gets a report only when a different content key for that KID is accepted. When the CDM returns the same content key, that vault gets no report. <code>HTTP</code> and <code>MySQL</code> vaults have no report route. A pair from a local vault goes to no remote vault, even when a remote vault holds the same pair.</li>
@@ -2412,7 +2412,7 @@
<li>Removes the flag when the CDM returns the same content key, because then the decode check was wrong, not the content key. A content key from another vault is checked in its turn, and flagged as well if it also fails.</li>
</ol>
<p>The download stops with an error instead of writing noise when no ciphertext is left to retry with, or when every vault and the CDM are used up. Without a local SQLite vault nothing remembers a flag, so the same vault serves the same pair again and the download stops there.</p>
<p>Per-segment decryption gives up the retry. With <code>decrypt_segments</code> on, and always with a MonaLisa tool that decrypts segments, the plaintext replaces each segment as it arrives, so no ciphertext is left. A failed decode then flags the pair and stops the download. The next run skips the flagged pair.</p>
<p>Per-segment decryption gives up the retry. With <code>decrypt_segments</code> on, and always with a per-segment MonaLisa decrypter, the plaintext replaces each segment as it arrives, so no ciphertext is left. A failed decode then flags the pair and stops the download. The next run skips the flagged pair.</p>
<p>unshackle copies a content key from one vault to the others only after this check passes, so a content key that fails the check does not spread. Without FFmpeg, a content key from a vault is not copied at all. To see or clear the flags, open the SQLite file and read or delete rows in <code>bad_keys</code>.</p>
<div class="admonition tip">
<p class="admonition-title">A good two-vault setup</p>
BIN
View File
Binary file not shown.
+182 -55
View File
@@ -2246,6 +2246,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.kids" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;kids
</span>
</a>
</li>
<li class="md-nav__item">
@@ -2282,10 +2293,10 @@
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.content_keys" class="md-nav__link">
<a href="#unshackle.core.drm.MonaLisa.tool" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;content_keys
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;tool
</span>
</a>
@@ -2373,6 +2384,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.to_dict" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;to_dict
</span>
</a>
</li>
<li class="md-nav__item">
@@ -2682,6 +2704,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.monalisa_drm" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-function"></code>&nbsp;monalisa_drm
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3096,6 +3129,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.kids" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;kids
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3132,10 +3176,10 @@
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.content_keys" class="md-nav__link">
<a href="#unshackle.core.drm.MonaLisa.tool" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;content_keys
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;tool
</span>
</a>
@@ -3223,6 +3267,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.to_dict" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;to_dict
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3532,6 +3587,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.monalisa_drm" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-function"></code>&nbsp;monalisa_drm
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4411,13 +4477,15 @@ A cipher built with <code>key</code> holds its content key from the start.
<a href="#unshackle.core.drm.MonaLisa" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">MonaLisa</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> <span class="n">ticket</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">device_path</span><span class="p">,</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> <span class="n">ticket</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">device_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> <span class="n">tool_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">command_builder</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">segment_decrypt</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a><span class="p">)</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">segment_decrypt</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> <span class="o">*</span><span class="p">,</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a> <span class="n">kid</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-10"><a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
@@ -4448,7 +4516,7 @@ directly, and a WASM module extracts the content keys locally.</p>
<code>ticket</code>
</td>
<td>
<code><span title="str">str</span> | <span title="bytes">bytes</span></code>
<code><span title="str">str</span> | <span title="bytes">bytes</span> | None</code>
</td>
<td>
<div class="doc-md-description">
@@ -4456,7 +4524,7 @@ directly, and a WASM module extracts the content keys locally.</p>
</div>
</td>
<td>
<em>required</em>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
@@ -4464,7 +4532,7 @@ directly, and a WASM module extracts the content keys locally.</p>
<code>device_path</code>
</td>
<td>
<code><span title="pathlib.Path">Path</span></code>
<code><span title="pathlib.Path">Path</span> | None</code>
</td>
<td>
<div class="doc-md-description">
@@ -4472,7 +4540,7 @@ directly, and a WASM module extracts the content keys locally.</p>
</div>
</td>
<td>
<em>required</em>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
@@ -4484,7 +4552,8 @@ directly, and a WASM module extracts the content keys locally.</p>
</td>
<td>
<div class="doc-md-description">
<p>Optional path to an external decryption binary.</p>
<p>Optional path to an external decryption binary; without it, this machine's
tool (<code>local_tool</code>) decrypts, else the built-in BBTS decrypter.</p>
</div>
</td>
<td>
@@ -4496,12 +4565,12 @@ directly, and a WASM module extracts the content keys locally.</p>
<code>command_builder</code>
</td>
<td>
<code><span title="collections.abc.Callable">Callable</span>[[<span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="str">str</span>, <span title="str">str</span>], <span title="collections.abc.Sequence">Sequence</span>[<span title="str">str</span> | <span title="pathlib.Path">Path</span>]] | None</code>
<code><span title="unshackle.core.drm.monalisa.CommandBuilder">CommandBuilder</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Optional callback <code>(tool_path, src, dst, kid_hex, key_hex) -&gt; args</code>
that builds the decryption CLI invocation (default: <code>-i src -o dst -k kid:key</code>).</p>
that builds the decryption CLI invocation (default: <code>bbtsdecrypt_command</code>).</p>
</div>
</td>
<td>
@@ -4513,15 +4582,31 @@ that builds the decryption CLI invocation (default: <code>-i src -o dst -k kid:k
<code>segment_decrypt</code>
</td>
<td>
<code><span title="bool">bool</span></code>
<code><span title="bool">bool</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Whether the external tool supports per-segment decryption.</p>
<p>Whether the decrypter supports per-segment decryption.</p>
</div>
</td>
<td>
<code>True</code>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>kid</code>
</td>
<td>
<code><span title="uuid.UUID">UUID</span> | <span title="str">str</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>The KID of a copy with no ticket, whose content key comes from elsewhere (a remote server).</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
@@ -4559,7 +4644,7 @@ that builds the decryption CLI invocation (default: <code>-i src -o dst -k kid:k
</td>
<td>
<div class="doc-md-description">
<p>If ticket/PSSH is empty.</p>
<p>If ticket/PSSH is empty and the caller gives no kid.</p>
</div>
</td>
</tr>
@@ -4622,6 +4707,30 @@ that builds the decryption CLI invocation (default: <code>-i src -o dst -k kid:k
<h3 id="unshackle.core.drm.MonaLisa.kids" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">kids</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-property"><code>property</code></small>
</span>
<a href="#unshackle.core.drm.MonaLisa.kids" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">kids</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The KID of the track's content key, as a list like the other DRM systems give.</p>
</div>
</div>
<div class="doc doc-object doc-attribute">
<h3 id="unshackle.core.drm.MonaLisa.key" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">key</span>
@@ -4742,44 +4851,21 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<h3 id="unshackle.core.drm.MonaLisa.content_keys" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">content_keys</span>
<h3 id="unshackle.core.drm.MonaLisa.tool" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">tool</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-property"><code>property</code></small>
</span>
<a href="#unshackle.core.drm.MonaLisa.content_keys" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">content_keys</span>
<a href="#unshackle.core.drm.MonaLisa.tool" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">tool</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Get content keys in the same format as Widevine/PlayReady.</p>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="dict">dict</span>[<span title="uuid.UUID">UUID</span>, <span title="str">str</span>]</code>
</td>
<td>
<div class="doc-md-description">
<p>Dictionary mapping KID to the content key hex string.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p>The external decrypter: the service's, else this machine's (<code>local_tool</code>), else None.</p>
</div>
@@ -4803,7 +4889,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<div class="doc doc-contents ">
<p>Whether the configured external tool supports per-segment decryption.</p>
<p>Whether the decrypter supports per-segment decryption; the built-in one does.</p>
</div>
@@ -5015,6 +5101,27 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<div class="doc doc-contents ">
<p>Extract keys from the ticket using the MonaLisa CDM.</p>
<p>One licence at a time per process (<code>CDM_LOCK</code>): concurrent wasmtime sessions corrupt its shared function table.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.drm.MonaLisa.to_dict" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">to_dict</span>
<a href="#unshackle.core.drm.MonaLisa.to_dict" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">to_dict</span><span class="p">()</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>This DRM in the export form; see <code>wire.drm_to_dict</code>.</p>
</div>
@@ -5038,7 +5145,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">device_path</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> <span class="n">tool_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">command_builder</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">segment_decrypt</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">segment_decrypt</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a><span class="p">)</span>
</span></code></pre></div>
@@ -5111,7 +5218,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<code>command_builder</code>
</td>
<td>
<code><span title="collections.abc.Callable">Callable</span>[[<span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="str">str</span>, <span title="str">str</span>], <span title="collections.abc.Sequence">Sequence</span>[<span title="str">str</span> | <span title="pathlib.Path">Path</span>]] | None</code>
<code><span title="unshackle.core.drm.monalisa.CommandBuilder">CommandBuilder</span> | None</code>
</td>
<td>
<div class="doc-md-description">
@@ -5127,7 +5234,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<code>segment_decrypt</code>
</td>
<td>
<code><span title="bool">bool</span></code>
<code><span title="bool">bool</span> | None</code>
</td>
<td>
<div class="doc-md-description">
@@ -5135,7 +5242,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
</div>
</td>
<td>
<code>True</code>
<code>None</code>
</td>
</tr>
</tbody>
@@ -5182,7 +5289,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<div class="doc doc-contents ">
<p>Decrypt an individual segment file using the configured CLI tool via subprocess.</p>
<p>Decrypt an individual segment file with the external tool, else the built-in decrypter.</p>
<p><span class="doc-section-title">Parameters:</span></p>
@@ -5249,7 +5356,7 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<div class="doc doc-contents ">
<p>Decrypt a media file (segment or track) using the configured CLI tool via subprocess.</p>
<p>Decrypt a media file (segment or track) with the external tool, else the built-in decrypter.</p>
<p>A whole-track tool runs once on a service's own merged file, which the service gives an <code>output_path</code>.
The in-place calls of core after it do nothing.</p>
@@ -6050,6 +6157,26 @@ the challenge and the session ID.</p>
<div class="doc doc-object doc-function">
<h2 id="unshackle.core.drm.monalisa_drm" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">monalisa_drm</span>
<a href="#unshackle.core.drm.monalisa_drm" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">monalisa_drm</span><span class="p">(</span><span class="n">track</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The MonaLisa DRM of a track, with or without a content key.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h2 id="unshackle.core.drm.is_null_key" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">is_null_key</span>
+193 -191
View File
@@ -4583,8 +4583,7 @@ option <code>chapter_fallback_name</code>. For example, <code>"Chapter {i:02}"</
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-132">132</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-133">133</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-133">133</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-134">134</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-135">135</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-136">136</a></span>
@@ -4594,18 +4593,21 @@ option <code>chapter_fallback_name</code>. For example, <code>"Chapter {i:02}"</
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-140">140</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-141">141</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-142">142</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-143">143</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.cache_identity--source--__span-0-132"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-132" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-132"></a><span class="k">def</span><span class="w"> </span><span class="nf">cache_identity</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">CacheIdentity</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-133"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-133" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-133"></a><span class="w"> </span><span class="sd">"""The cache, and the title ID, region and account that this source files its cached titles and metadata under.</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-134"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-134" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-134"></a>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-135"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-135" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-135"></a><span class="sd"> A service keeps its title ID in ``title`` or ``title_id``, whichever it sets.</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-136"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-136" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-136"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-137"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-137" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-137"></a> <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"title"</span><span class="p">):</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-138"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-138" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-138"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">title</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-139"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-139" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-139"></a> <span class="k">elif</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"title_id"</span><span class="p">):</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-140"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-140" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-140"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">title_id</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-141"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-141" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-141"></a> <span class="k">else</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-142"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-142" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-142"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="kc">None</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-143"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-143" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-143"></a> <span class="k">return</span> <span class="n">CacheIdentity</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">title_cache</span><span class="p">,</span> <span class="n">title_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">current_region</span><span class="p">,</span> <span class="n">get_account_hash</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">credential</span><span class="p">))</span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-143">143</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-144">144</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.cache_identity--source--__codelineno-0-145">145</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.cache_identity--source--__span-0-133"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-133" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-133"></a><span class="k">def</span><span class="w"> </span><span class="nf">cache_identity</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">CacheIdentity</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-134"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-134" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-134"></a><span class="w"> </span><span class="sd">"""The cache, and the title ID, region and account that this source files its cached titles and metadata under.</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-135"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-135" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-135"></a>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-136"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-136" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-136"></a><span class="sd"> A service keeps its title ID in ``title`` or ``title_id``, whichever it sets.</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-137"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-137" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-137"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-138"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-138" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-138"></a> <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"title"</span><span class="p">):</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-139"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-139" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-139"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">title</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-140"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-140" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-140"></a> <span class="k">elif</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"title_id"</span><span class="p">):</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-141"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-141" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-141"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">title_id</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-142"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-142" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-142"></a> <span class="k">else</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-143"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-143" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-143"></a> <span class="n">title_id</span> <span class="o">=</span> <span class="kc">None</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-144"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-144" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-144"></a> <span class="n">account</span> <span class="o">=</span> <span class="n">get_account_hash</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">credential</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">cookie_file</span><span class="p">)</span>
</span><span id="unshackle.core.service.Service.cache_identity--source--__span-0-145"><a id="unshackle.core.service.Service.cache_identity--source--__codelineno-0-145" name="unshackle.core.service.Service.cache_identity--source--__codelineno-0-145"></a> <span class="k">return</span> <span class="n">CacheIdentity</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">title_cache</span><span class="p">,</span> <span class="n">title_id</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">current_region</span><span class="p">,</span> <span class="n">account</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4639,9 +4641,7 @@ option <code>chapter_fallback_name</code>. For example, <code>"Chapter {i:02}"</
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-149">149</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-150">150</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151">151</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151">151</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152">152</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153">153</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154">154</a></span>
@@ -4652,20 +4652,22 @@ option <code>chapter_fallback_name</code>. For example, <code>"Chapter {i:02}"</
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159">159</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160">160</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161">161</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162">162</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-149"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-149" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-149"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_service_certificate</span><span class="p">(</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-150"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-150" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-150"></a> <span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-151"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-152"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-153"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153"></a><span class="sd"> Get the Widevine Service Certificate used for Privacy Mode.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-154"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154"></a>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-155"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155"></a><span class="sd"> :param challenge: The service challenge, providing this to a License endpoint should return the</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-156"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156"></a><span class="sd"> privacy certificate that the service uses.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-157"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-158"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-159"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-160"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160"></a><span class="sd"> :return: The Service Privacy Certificate as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-161"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-162"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162">162</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-163">163</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-164">164</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-151"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-151"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_service_certificate</span><span class="p">(</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-152"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-152"></a> <span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-153"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-153"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-154"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-154"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-155"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-155"></a><span class="sd"> Get the Widevine Service Certificate used for Privacy Mode.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-156"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-156"></a>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-157"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-157"></a><span class="sd"> :param challenge: The service challenge, providing this to a License endpoint should return the</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-158"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-158"></a><span class="sd"> privacy certificate that the service uses.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-159"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-159"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-160"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-160"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-161"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-161"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-162"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-162"></a><span class="sd"> :return: The Service Privacy Certificate as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-163"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-163" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-163"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_widevine_service_certificate--source--__span-0-164"><a id="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-164" name="unshackle.core.service.Service.get_widevine_service_certificate--source--__codelineno-0-164"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4701,9 +4703,7 @@ The service can then ban, revoke, disable, or downgrade that device.</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-164">164</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-165">165</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166">166</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166">166</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167">167</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168">168</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169">169</a></span>
@@ -4718,24 +4718,26 @@ The service can then ban, revoke, disable, or downgrade that device.</p>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178">178</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179">179</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180">180</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181">181</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-164"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-164" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-164"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-165"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-165" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-165"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-166"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166"></a><span class="sd"> Get a Widevine License message by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-167"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-168"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168"></a><span class="sd"> This License message contains the encrypted content keys and will be</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-169"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169"></a><span class="sd"> read by the Cdm and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-170"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-170" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-170"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-171"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-171" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-171"></a><span class="sd"> This is a very important request to get correct. A bad, unexpected, or missing</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-172"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-172" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-172"></a><span class="sd"> value in the request can cause the service to detect your CDM device.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-173"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-173" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-173"></a><span class="sd"> The service can then ban, revoke, disable, or downgrade that device.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-174"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-175"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175"></a><span class="sd"> :param challenge: The license challenge from the Widevine CDM.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-176"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-177"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-178"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-179"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179"></a><span class="sd"> :return: The License response as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-180"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-181"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181">181</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-182">182</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-183">183</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-166"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-166"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-167"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-167"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-168"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-168"></a><span class="sd"> Get a Widevine License message by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-169"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-169"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-170"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-170" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-170"></a><span class="sd"> This License message contains the encrypted content keys and will be</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-171"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-171" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-171"></a><span class="sd"> read by the Cdm and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-172"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-172" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-172"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-173"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-173" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-173"></a><span class="sd"> This is a very important request to get correct. A bad, unexpected, or missing</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-174"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-174"></a><span class="sd"> value in the request can cause the service to detect your CDM device.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-175"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-175"></a><span class="sd"> The service can then ban, revoke, disable, or downgrade that device.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-176"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-176"></a>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-177"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-177"></a><span class="sd"> :param challenge: The license challenge from the Widevine CDM.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-178"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-178"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-179"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-179"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-180"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-180"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-181"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-181"></a><span class="sd"> :return: The License response as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-182"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-182" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-182"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_widevine_license--source--__span-0-183"><a id="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-183" name="unshackle.core.service.Service.get_widevine_license--source--__codelineno-0-183"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4771,9 +4773,7 @@ The service can then ban, revoke, disable, or downgrade that device.</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-183">183</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-184">184</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185">185</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185">185</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186">186</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187">187</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188">188</a></span>
@@ -4793,29 +4793,31 @@ The service can then ban, revoke, disable, or downgrade that device.</p>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202">202</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203">203</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204">204</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205">205</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-183"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-183" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-183"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_playready_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-184"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-184" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-184"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-185"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185"></a><span class="sd"> Get a PlayReady License message by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-186"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-187"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187"></a><span class="sd"> This License message contains the encrypted content keys and will be</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-188"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188"></a><span class="sd"> read by the CDM and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-189"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-189" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-189"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-190"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-190" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-190"></a><span class="sd"> This is a very important request to get correct. A bad, unexpected, or missing</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-191"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-191" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-191"></a><span class="sd"> value in the request can cause the service to detect your CDM device.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-192"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-192" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-192"></a><span class="sd"> The service can then ban, revoke, disable, or downgrade that device.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-193"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-193" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-193"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-194"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-194" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-194"></a><span class="sd"> :param challenge: The license challenge from the PlayReady CDM.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-195"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-195" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-195"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-196"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-196" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-196"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-197"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-197" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-197"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-198"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198"></a><span class="sd"> :return: The License response as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-199"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-200"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-201"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201"></a> <span class="c1"># A service that implements Widevine licensing only still gets PlayReady, with the</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-202"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202"></a> <span class="c1"># arguments its own signature declares.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-203"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span><span class="p">(</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-204"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204"></a> <span class="o">**</span><span class="n">declared_kwargs</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span><span class="p">,</span> <span class="p">{</span><span class="s2">"challenge"</span><span class="p">:</span> <span class="n">challenge</span><span class="p">,</span> <span class="s2">"title"</span><span class="p">:</span> <span class="n">title</span><span class="p">,</span> <span class="s2">"track"</span><span class="p">:</span> <span class="n">track</span><span class="p">})</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-205"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205"></a> <span class="p">)</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205">205</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-206">206</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_playready_license--source--__codelineno-0-207">207</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-185"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-185"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_playready_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-186"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-186"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-187"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-187"></a><span class="sd"> Get a PlayReady License message by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-188"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-188"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-189"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-189" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-189"></a><span class="sd"> This License message contains the encrypted content keys and will be</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-190"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-190" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-190"></a><span class="sd"> read by the CDM and decrypted.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-191"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-191" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-191"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-192"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-192" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-192"></a><span class="sd"> This is a very important request to get correct. A bad, unexpected, or missing</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-193"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-193" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-193"></a><span class="sd"> value in the request can cause the service to detect your CDM device.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-194"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-194" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-194"></a><span class="sd"> The service can then ban, revoke, disable, or downgrade that device.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-195"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-195" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-195"></a>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-196"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-196" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-196"></a><span class="sd"> :param challenge: The license challenge from the PlayReady CDM.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-197"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-197" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-197"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-198"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-198"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-199"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-199"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-200"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-200"></a><span class="sd"> :return: The License response as Bytes or a Base64 string. Do not Base64 Encode or</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-201"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-201"></a><span class="sd"> Decode the data, return as is to reduce unnecessary computations.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-202"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-202"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-203"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-203"></a> <span class="c1"># A service that implements Widevine licensing only still gets PlayReady, with the</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-204"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-204"></a> <span class="c1"># arguments its own signature declares.</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-205"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-205"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span><span class="p">(</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-206"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-206" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-206"></a> <span class="o">**</span><span class="n">declared_kwargs</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span><span class="p">,</span> <span class="p">{</span><span class="s2">"challenge"</span><span class="p">:</span> <span class="n">challenge</span><span class="p">,</span> <span class="s2">"title"</span><span class="p">:</span> <span class="n">title</span><span class="p">,</span> <span class="s2">"track"</span><span class="p">:</span> <span class="n">track</span><span class="p">})</span>
</span><span id="unshackle.core.service.Service.get_playready_license--source--__span-0-207"><a id="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-207" name="unshackle.core.service.Service.get_playready_license--source--__codelineno-0-207"></a> <span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4851,9 +4853,7 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-207">207</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-208">208</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209">209</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209">209</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210">210</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211">211</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212">212</a></span>
@@ -4868,24 +4868,26 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221">221</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222">222</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223">223</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224">224</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-207"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-207" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-207"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_clearkey_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-208"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-208" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-208"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-209"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209"></a><span class="sd"> Get a W3C ClearKey License (JWK Set) by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-210"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-211"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211"></a><span class="sd"> Used for DASH `org.w3.clearkey` tracks. unshackle uses no CDM here: the challenge is</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-212"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212"></a><span class="sd"> the W3C EME JSON license request, e.g. ``{"kids": ["&lt;base64url&gt;"], "type": "temporary"}``,</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-213"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-213" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-213"></a><span class="sd"> and the license is a JWK Set, e.g. ``{"keys": [{"kty": "oct", "k": "...", "kid": "..."}]}``.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-214"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-214" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-214"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-215"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-215" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-215"></a><span class="sd"> :param challenge: The JSON license request bytes to POST to the license server.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-216"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-216" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-216"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-217"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-218"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-219"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219"></a><span class="sd"> :return: The JWK Set license as a dict, JSON str, or raw bytes. Return None (the default)</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-220"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220"></a><span class="sd"> to let the framework POST the challenge to the manifest-provided Laurl, if any.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-221"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221"></a><span class="sd"> Services with no license server can instead pre-populate the DRM object's</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-222"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222"></a><span class="sd"> `signatures` in get_tracks.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-223"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-224"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224"></a> <span class="k">return</span> <span class="kc">None</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224">224</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-225">225</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-226">226</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-209"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-209"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_clearkey_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span> <span class="o">|</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-210"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-210"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-211"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-211"></a><span class="sd"> Get a W3C ClearKey License (JWK Set) by sending a License Request (challenge).</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-212"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-212"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-213"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-213" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-213"></a><span class="sd"> Used for DASH `org.w3.clearkey` tracks. unshackle uses no CDM here: the challenge is</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-214"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-214" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-214"></a><span class="sd"> the W3C EME JSON license request, e.g. ``{"kids": ["&lt;base64url&gt;"], "type": "temporary"}``,</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-215"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-215" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-215"></a><span class="sd"> and the license is a JWK Set, e.g. ``{"keys": [{"kty": "oct", "k": "...", "kid": "..."}]}``.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-216"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-216" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-216"></a>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-217"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-217"></a><span class="sd"> :param challenge: The JSON license request bytes to POST to the license server.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-218"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-218"></a><span class="sd"> :param title: The current `Title` from get_titles that unshackle processes now. unshackle</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-219"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-219"></a><span class="sd"> gives this in case it holds data you need, for example for an HTTP request.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-220"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-220"></a><span class="sd"> :param track: The current `Track` needing decryption. Provided for same reason as `title`.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-221"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-221"></a><span class="sd"> :return: The JWK Set license as a dict, JSON str, or raw bytes. Return None (the default)</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-222"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-222"></a><span class="sd"> to let the framework POST the challenge to the manifest-provided Laurl, if any.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-223"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-223"></a><span class="sd"> Services with no license server can instead pre-populate the DRM object's</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-224"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-224"></a><span class="sd"> `signatures` in get_tracks.</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-225"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-225" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-225"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_clearkey_license--source--__span-0-226"><a id="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-226" name="unshackle.core.service.Service.get_clearkey_license--source--__codelineno-0-226"></a> <span class="k">return</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4912,19 +4914,19 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-226">226</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-227">227</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228">228</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228">228</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229">229</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230">230</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231">231</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232">232</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-226"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-226" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-226"></a><span class="k">def</span><span class="w"> </span><span class="nf">fairplay_bridge</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span><span class="p">[</span><span class="o">...</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-227"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-227" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-227"></a><span class="w"> </span><span class="sd">"""The service's ``get_fairplay_bridge_license``, or None: only a service with it gets FairPlay-only tracks bridged.</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-228"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228"></a>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-229"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229"></a><span class="sd"> The hook gets a PlayReady or Widevine challenge for the key IDs of the init segments, with ``challenge``,</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-230"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230"></a><span class="sd"> ``title``, ``track``, ``drm_system`` and the extras of that system's licence callback.</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-231"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-232"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232"></a> <span class="k">return</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"get_fairplay_bridge_license"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232">232</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-233">233</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-234">234</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-228"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228"></a><span class="k">def</span><span class="w"> </span><span class="nf">fairplay_bridge</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span><span class="p">[</span><span class="o">...</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-229"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229"></a><span class="w"> </span><span class="sd">"""The service's ``get_fairplay_bridge_license``, or None: only a service with it gets FairPlay-only tracks bridged.</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-230"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230"></a>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-231"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231"></a><span class="sd"> The hook gets a PlayReady or Widevine challenge for the key IDs of the init segments, with ``challenge``,</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-232"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232"></a><span class="sd"> ``title``, ``track``, ``drm_system`` and the extras of that system's licence callback.</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-233"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-233" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-233"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-234"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-234" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-234"></a> <span class="k">return</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"get_fairplay_bridge_license"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4949,9 +4951,9 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-250">250</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-251">251</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-250"><a id="unshackle.core.service.Service.close--source--__codelineno-0-250" name="unshackle.core.service.Service.close--source--__codelineno-0-250"></a><span class="k">def</span><span class="w"> </span><span class="nf">close</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.close--source--__span-0-251"><a id="unshackle.core.service.Service.close--source--__codelineno-0-251" name="unshackle.core.service.Service.close--source--__codelineno-0-251"></a><span class="w"> </span><span class="sd">"""Release what the source holds open once dl has finished every title."""</span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-252">252</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-253">253</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-252"><a id="unshackle.core.service.Service.close--source--__codelineno-0-252" name="unshackle.core.service.Service.close--source--__codelineno-0-252"></a><span class="k">def</span><span class="w"> </span><span class="nf">close</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.close--source--__span-0-253"><a id="unshackle.core.service.Service.close--source--__codelineno-0-253" name="unshackle.core.service.Service.close--source--__codelineno-0-253"></a><span class="w"> </span><span class="sd">"""Release what the source holds open once dl has finished every title."""</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -4976,11 +4978,11 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-255">255</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-256">256</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257">257</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-255"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-255" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-255"></a><span class="k">def</span><span class="w"> </span><span class="nf">decrypts_samples</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-256"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-256" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-256"></a><span class="w"> </span><span class="sd">"""Whether this service decrypts the cbcs file of `track` after the download, through `get_sample_decrypter`."""</span>
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-257"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257"></a> <span class="k">return</span> <span class="kc">False</span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257">257</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-258">258</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-259">259</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-257"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257"></a><span class="k">def</span><span class="w"> </span><span class="nf">decrypts_samples</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-258"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-258" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-258"></a><span class="w"> </span><span class="sd">"""Whether this service decrypts the cbcs file of `track` after the download, through `get_sample_decrypter`."""</span>
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-259"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-259" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-259"></a> <span class="k">return</span> <span class="kc">False</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5007,19 +5009,19 @@ runs it on the server, so a decrypter that needs a local process works for remot
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-259">259</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-260">260</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261">261</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261">261</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262">262</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263">263</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264">264</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265">265</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-259"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-259" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-259"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">entry</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-260"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-260" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-260"></a><span class="w"> </span><span class="sd">"""The content key, or a `cbcs.SampleDecrypter`, for `stsd` entry `entry` (1-based) of `track`.</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-261"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261"></a>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-262"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262"></a><span class="sd"> unshackle calls this only for a track `decrypts_samples` names, before TRACK_DOWNLOADED. A remote session</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-263"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263"></a><span class="sd"> runs it on the server, so a decrypter that needs a local process works for remote clients too.</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-264"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-265"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265"></a> <span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2"> does not decrypt samples"</span><span class="p">)</span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265">265</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-266">266</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-267">267</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-261"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">entry</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-262"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262"></a><span class="w"> </span><span class="sd">"""The content key, or a `cbcs.SampleDecrypter`, for `stsd` entry `entry` (1-based) of `track`.</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-263"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263"></a>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-264"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264"></a><span class="sd"> unshackle calls this only for a track `decrypts_samples` names, before TRACK_DOWNLOADED. A remote session</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-265"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265"></a><span class="sd"> runs it on the server, so a decrypter that needs a local process works for remote clients too.</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-266"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-266" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-266"></a><span class="sd"> """</span>
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-267"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-267" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-267"></a> <span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2"> does not decrypt samples"</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5044,11 +5046,11 @@ runs it on the server, so a decrypter that needs a local process works for remot
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-267">267</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-268">268</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269">269</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-267"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-267" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-267"></a><span class="k">def</span><span class="w"> </span><span class="nf">sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span><span class="p">[[</span><span class="nb">int</span><span class="p">],</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-268"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-268" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-268"></a><span class="w"> </span><span class="sd">"""`get_sample_decrypter` for `track`, when `decrypts_samples` names it."""</span>
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-269"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269"></a> <span class="k">return</span> <span class="n">partial</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_sample_decrypter</span><span class="p">,</span> <span class="n">track</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">decrypts_samples</span><span class="p">(</span><span class="n">track</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269">269</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-270">270</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-271">271</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-269"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269"></a><span class="k">def</span><span class="w"> </span><span class="nf">sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span><span class="p">[[</span><span class="nb">int</span><span class="p">],</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-270"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-270" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-270"></a><span class="w"> </span><span class="sd">"""`get_sample_decrypter` for `track`, when `decrypts_samples` names it."""</span>
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-271"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-271" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-271"></a> <span class="k">return</span> <span class="n">partial</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_sample_decrypter</span><span class="p">,</span> <span class="n">track</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">decrypts_samples</span><span class="p">(</span><span class="n">track</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5120,21 +5122,21 @@ runs it on the server, so a decrypter that needs a local process works for remot
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-273">273</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-274">274</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275">275</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275">275</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276">276</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277">277</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278">278</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279">279</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280">280</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-273"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-273" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-273"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_segment_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">Path</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-274"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-274" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-274"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-275"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275"></a><span class="sd"> Called when one of a Track's Segments has finished downloading.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-276"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276"></a>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-277"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-278"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278"></a><span class="sd"> track: The Track object that had a Segment downloaded.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-279"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279"></a><span class="sd"> segment: The Path to the downloaded Segment.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-280"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280">280</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-281">281</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-282">282</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-275"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_segment_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">Path</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-276"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-277"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277"></a><span class="sd"> Called when one of a Track's Segments has finished downloading.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-278"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278"></a>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-279"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-280"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280"></a><span class="sd"> track: The Track object that had a Segment downloaded.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-281"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-281" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-281"></a><span class="sd"> segment: The Path to the downloaded Segment.</span>
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-282"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-282" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-282"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5191,21 +5193,21 @@ In a licence-only run the track has no file.</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-282">282</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-283">283</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284">284</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284">284</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285">285</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286">286</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287">287</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288">288</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289">289</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-282"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-282" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-282"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-283"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-283" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-283"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-284"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284"></a><span class="sd"> Called once when a Track has finished downloading, after unshackle decrypted it.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-285"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285"></a><span class="sd"> In a licence-only run the track has no file.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-286"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286"></a>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-287"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-288"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288"></a><span class="sd"> track: The downloaded Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-289"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289">289</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-290">290</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-291">291</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-284"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-285"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-286"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286"></a><span class="sd"> Called once when a Track has finished downloading, after unshackle decrypted it.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-287"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287"></a><span class="sd"> In a licence-only run the track has no file.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-288"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288"></a>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-289"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-290"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-290" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-290"></a><span class="sd"> track: The downloaded Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-291"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-291" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-291"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5294,25 +5296,25 @@ for an HLS track that merged during the download (merge_segments).</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291">291</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292">292</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293">293</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293">293</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294">294</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295">295</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296">296</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297">297</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298">298</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299">299</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300">300</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-291"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_decrypted</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">drm</span><span class="p">:</span> <span class="n">DRM_T</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">m3u8</span><span class="o">.</span><span class="n">Segment</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-292"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-293"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293"></a><span class="sd"> Called when a Track has finished decrypting.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-294"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294"></a>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-295"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-296"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296"></a><span class="sd"> track: The decrypted Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-297"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297"></a><span class="sd"> drm: The DRM object it decrypted with. None for a track `get_sample_decrypter` decrypted.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-298"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298"></a><span class="sd"> segment: The decrypted HLS segment information. None for DASH and ISM tracks and</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-299"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299"></a><span class="sd"> for an HLS track that merged during the download (merge_segments).</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-300"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300">300</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-301">301</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-302">302</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-293"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_decrypted</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">drm</span><span class="p">:</span> <span class="n">DRM_T</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">m3u8</span><span class="o">.</span><span class="n">Segment</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-294"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-295"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295"></a><span class="sd"> Called when a Track has finished decrypting.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-296"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296"></a>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-297"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-298"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298"></a><span class="sd"> track: The decrypted Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-299"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299"></a><span class="sd"> drm: The DRM object it decrypted with. None for a track `get_sample_decrypter` decrypted.</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-300"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300"></a><span class="sd"> segment: The decrypted HLS segment information. None for DASH and ISM tracks and</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-301"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-301" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-301"></a><span class="sd"> for an HLS track that merged during the download (merge_segments).</span>
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-302"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-302" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-302"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5368,19 +5370,19 @@ for an HLS track that merged during the download (merge_segments).</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-302">302</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-303">303</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304">304</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304">304</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305">305</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306">306</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307">307</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308">308</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-302"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-302" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-302"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_repacked</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-303"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-303" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-303"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-304"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304"></a><span class="sd"> Called when a Track has finished repacking.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-305"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305"></a>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-306"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-307"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-308"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308">308</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-309">309</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-310">310</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-304"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_repacked</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-305"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-306"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306"></a><span class="sd"> Called when a Track has finished repacking.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-307"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307"></a>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-308"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-309"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-309" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-309"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-310"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-310" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-310"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
@@ -5439,9 +5441,7 @@ MP4 with FFmpeg/mp4box.</p>
<details class="mkdocstrings-source">
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310">310</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311">311</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312">312</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312">312</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313">313</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314">314</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315">315</a></span>
@@ -5449,17 +5449,19 @@ MP4 with FFmpeg/mp4box.</p>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317">317</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318">318</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319">319</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320">320</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-310"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_multiplex</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-311"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-312"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312"></a><span class="sd"> Called immediately before unshackle multiplexes a Track into a Container.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-313"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-314"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314"></a><span class="sd"> Note: Right now unshackle multiplexes only MKV containers. In the future</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-315"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315"></a><span class="sd"> unshackle can also call this when it multiplexes to other containers like</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-316"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-317"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-318"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-319"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-320"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320"></a><span class="sd"> """</span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320">320</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-321">321</a></span>
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-322">322</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-312"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_multiplex</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-313"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313"></a><span class="w"> </span><span class="sd">"""</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-314"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314"></a><span class="sd"> Called immediately before unshackle multiplexes a Track into a Container.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-315"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-316"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316"></a><span class="sd"> Note: Right now unshackle multiplexes only MKV containers. In the future</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-317"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317"></a><span class="sd"> unshackle can also call this when it multiplexes to other containers like</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-318"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-319"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319"></a>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-320"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320"></a><span class="sd"> Parameters:</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-321"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-321" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-321"></a><span class="sd"> track: The repacked Track object.</span>
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-322"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-322" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-322"></a><span class="sd"> """</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
+222 -7
View File
@@ -2009,6 +2009,17 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Audio.resolution_label" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;resolution_label
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3046,6 +3057,28 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Track.held_playlist" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;held_playlist
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Track.playlist_text" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;playlist_text
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3195,6 +3228,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Tracks.drop" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;drop
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3752,6 +3796,17 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Audio.resolution_label" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;resolution_label
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4789,6 +4844,28 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Track.held_playlist" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;held_playlist
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Track.playlist_text" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;playlist_text
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4938,6 +5015,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Tracks.drop" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;drop
</span>
</a>
</li>
<li class="md-nav__item">
@@ -5334,7 +5422,7 @@
If providing a URL, download() fetches the file during the download phase.
You must give either path or url.</p>
<p>If name is not provided it will use the file name (without extension).
If mime_type is not provided, it will try to guess it.</p>
If mime_type is not provided, it comes from the file signature, else from the suffix.</p>
<p><span class="doc-section-title">Parameters:</span></p>
@@ -5511,6 +5599,7 @@ If mime_type is not provided, it will try to guess it.</p>
<div class="doc doc-contents ">
<p>Download a URL-backed attachment to the temp directory with the same retries as a track.</p>
<p>A type equal to the suffix type can be a guess, also one a remote server sent, so the file signature replaces it.</p>
</div>
@@ -5729,8 +5818,10 @@ If mime_type is not provided, it will try to guess it.</p>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">channels</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">joc</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> <span class="n">descriptive</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a><span class="p">)</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a> <span class="n">bit_depth</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a> <span class="n">sample_rate</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-10"><a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
@@ -5837,6 +5928,38 @@ not supported. All numbers and strings will be cast to float.</p>
<code>False</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>bit_depth</code>
</td>
<td>
<code><span title="int">int</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Bits per sample, e.g. 24. A manifest rarely states it, so a service sets it.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>sample_rate</code>
</td>
<td>
<code><span title="int">int</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Samples per second in Hz, e.g. 96000.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p>Note: If codec, bitrate, channels, or joc is not specified some checks may be
@@ -5985,6 +6108,30 @@ recommended.</p>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Audio.resolution_label" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">resolution_label</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
<a href="#unshackle.core.tracks.Audio.resolution_label" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">resolution_label</span><span class="p">(</span><span class="n">bit_depth</span><span class="p">,</span> <span class="n">sample_rate</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The bit depth and sample rate in the form music services show, e.g. "24-bit / 96 kHz"; "" for neither.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Audio.parse_channels" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">parse_channels</span>
@@ -8474,6 +8621,8 @@ nested saving and safer exists-checks.</p>
<li>playlist: m3u8.model.Playlist - The primary track information.</li>
<li>media: m3u8.model.Media - The audio/subtitle track information.</li>
<li>segment_durations: list[int] - A list of each segment's duration.</li>
<li>playlist_text: str - The media playlist, set by a service that has its text and no
playlist URL. Its segment URIs resolve against the track URL.</li>
<li>"dash" used by the DASH class.</li>
<li>manifest: lxml.ElementTree - DASH MPD manifest.</li>
<li>period: lxml.Element - The period of this track.</li>
@@ -8482,6 +8631,11 @@ nested saving and safer exists-checks.</p>
<li>timescale: int - The timescale of the track's segments.</li>
<li>segment_durations: list[int] - A list of each segment's duration.</li>
</ul>
<p>A service can set:</p>
<ul>
<li>"own_stream_only": bool - Mux only the track of the same kind from the file: a video
without the audio its file holds, or an audio track without the video in its file.</li>
</ul>
<p>You should not add, change, or remove any data within reserved keys.
You may use their data, but note that these values can change or be removed
at any point.</p>
@@ -9044,6 +9198,46 @@ of <code>get_init_segment</code> to find the Key ID.</p>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Track.held_playlist" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">held_playlist</span>
<a href="#unshackle.core.tracks.Track.held_playlist" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">held_playlist</span><span class="p">()</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The HLS media playlist text the track holds: <code>data["hls"]["playlist_text"]</code>, else the <code>from_file</code> text.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Track.playlist_text" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">playlist_text</span>
<a href="#unshackle.core.tracks.Track.playlist_text" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">playlist_text</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>The HLS media playlist text the track holds, else the one at its URL; a response that is not ok raises.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Track.load_drm_from_playlist" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">load_drm_from_playlist</span>
@@ -9193,10 +9387,11 @@ is larger than it. Use a value of 20000 (20KB) or higher.</p>
<p>Remux the track with FFmpeg <code>-c copy</code>.</p>
<p>A given <code>bsf_v</code> goes into the same pass as <code>-bsf:v</code>, which normalises video VUI
colour metadata without a second full-file remux. Repackaging is mandatory. The
bitstream filter is best-effort: if the combined pass fails, and it is not the
AAC-retry case, unshackle tries it again once without <code>bsf_v</code> so the remux still
succeeds. Returns True if unshackle applied the requested <code>bsf_v</code> (always False
when <code>bsf_v</code> is None, because the caller requested nothing).</p>
bitstream filter is best-effort: if the combined pass fails, unshackle tries it again
once without <code>bsf_v</code> so the remux still succeeds, and the caller falls back to
<code>normalize_vui</code>. Returns True if unshackle applied
the requested <code>bsf_v</code> (always False when <code>bsf_v</code> is None, because the caller
requested nothing).</p>
</div>
@@ -9482,6 +9677,26 @@ sorts "en-US" and "en-GB".</p>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Tracks.drop" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">drop</span>
<a href="#unshackle.core.tracks.Tracks.drop" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">drop</span><span class="p">(</span><span class="n">ids</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Remove the video, audio and subtitle tracks whose id is in <code>ids</code>.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Tracks.filter" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">filter</span>
File diff suppressed because one or more lines are too long