mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-22 08:55:07 +00:00
Compare commits
3
Commits
4b15cc5088
...
5e1acb6077
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e1acb6077 | ||
|
|
8bbe667e54 | ||
|
|
1192be2c52 |
@@ -3002,6 +3002,7 @@ current <code>title</code> and <code>track</code>:</p>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>A license callback can also declare optional keyword arguments. <code>get_widevine_license</code> can ask for <code>pssh</code> and <code>session_id</code>. <code>get_playready_license</code> can ask for <code>pssh_b64</code> and <code>session_id</code>. <code>session_id</code> is the open CDM session. A callback gets only the arguments that its signature declares.</p>
|
||||
<div class="language-python highlight"><pre><span></span><code><span id="__span-19-1"><a id="__codelineno-19-1" name="__codelineno-19-1" href="#__codelineno-19-1"></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">track</span><span class="p">):</span>
|
||||
</span><span id="__span-19-2"><a id="__codelineno-19-2" name="__codelineno-19-2" href="#__codelineno-19-2"></a> <span class="n">response</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">post</span><span class="p">(</span>
|
||||
</span><span id="__span-19-3"><a id="__codelineno-19-3" name="__codelineno-19-3" href="#__codelineno-19-3"></a> <span class="bp">self</span><span class="o">.</span><span class="n">license_data</span><span class="p">[</span><span class="s2">"url"</span><span class="p">],</span>
|
||||
|
||||
@@ -2243,8 +2243,9 @@ Every other endpoint refuses the dashboard key, and the dashboard refuses user k
|
||||
routes are available in <code>--remote-only</code> mode too.</p>
|
||||
<p>Run the server headless with <code>--quiet</code>: no banner, no Rich output, one plain log line per
|
||||
event on stderr, and <code>api.*</code> loggers stay at <code>INFO</code> so remote session activity reaches the
|
||||
log ring. Add <code>--debug</code> to raise the level to <code>DEBUG</code> and also write the full log to
|
||||
<code>directories.logs</code> as <code>unshackle_serve_<time>.log</code>. Nothing else the dashboard shows reaches
|
||||
log ring. The log ring and the event stream do not get <code>aiohttp.access</code> request lines.
|
||||
Add <code>--debug</code> to raise the level to <code>DEBUG</code>, send the request lines to the log ring too,
|
||||
and write the full log to <code>directories.logs</code> as <code>unshackle_serve_<time>.log</code>. Nothing else the dashboard shows reaches
|
||||
the disk: stats, the log ring and the event stream live in memory and reset on restart, so a
|
||||
dashboard UI that wants history must keep its own copy.</p>
|
||||
<div class="language-text highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>unshackle serve --remote-only --quiet
|
||||
@@ -2281,7 +2282,7 @@ dashboard UI that wants history must keep its own copy.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>/api/dashboard/logs</code></td>
|
||||
<td><code>{"seq": N, "records": [...]}</code>: the last 1000 log records. <code>?since=<seq></code> returns only newer records; <code>?level=WARNING</code> sets the minimum level; <code>?logger=serve</code> keeps one logger and its children (<code>aiohttp.access</code> is the noisiest). <code>ts</code> is a Unix epoch in seconds.</td>
|
||||
<td><code>{"seq": N, "records": [...]}</code>: the last 1000 log records. <code>?since=<seq></code> returns only newer records; <code>?level=WARNING</code> sets the minimum level; <code>?logger=serve</code> keeps one logger and its children. <code>ts</code> is a Unix epoch in seconds.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>/api/dashboard/cdm-logs</code></td>
|
||||
@@ -2305,7 +2306,7 @@ dashboard UI that wants history must keep its own copy.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>/api/dashboard/events</code></td>
|
||||
<td>Server-Sent Events stream. With <code>?since=<seq></code> it returns <code>{"seq", "stats", "events": [...]}</code> instead: every event after <code>seq</code> (the server keeps the last 20000, log records included, so a poll every few seconds is safe even under a busy access log) as one JSON burst, so a UI that polls every few seconds still sees a remote session that opened and closed in between.</td>
|
||||
<td>Server-Sent Events stream. With <code>?since=<seq></code> it returns <code>{"seq", "stats", "events": [...]}</code> instead: every event after <code>seq</code> (the server keeps the last 20000, log records included, so a poll every few seconds is safe) as one JSON burst, so a UI that polls every few seconds still sees a remote session that opened and closed in between.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -2334,7 +2335,7 @@ those it sends:</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>session</code></td>
|
||||
<td><code>action</code> (<code>create</code>, <code>update</code> on every request the session makes and when titles or tracks load, or <code>delete</code>) plus the full remote session summary, so each event is a complete snapshot. A <code>delete</code> also carries <code>reason</code>: <code>closed</code> (the client ended it), <code>expired</code> (TTL sweep) or <code>evicted</code> (<code>max_sessions</code> reached). A session opened by <code>--skip-dl</code> can live only a few seconds, so a UI that wants history must keep its own record of these events.</td>
|
||||
<td><code>action</code> (<code>create</code>, <code>update</code> on every request the session makes and when titles or tracks load, or <code>delete</code>) plus the remote session summary. The <code>update</code> for a request carries that request as <code>action_entry</code> and has no <code>actions</code>: append it to the log you hold, capped at 500. Every other event is a complete snapshot with <code>actions</code>. A <code>delete</code> also carries <code>reason</code>: <code>closed</code> (the client ended it), <code>expired</code> (TTL sweep) or <code>evicted</code> (<code>max_sessions</code> reached). A session opened by <code>--skip-dl</code> can live only a few seconds, so a UI that wants history must keep its own record of these events.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>job</code></td>
|
||||
|
||||
@@ -2788,7 +2788,8 @@ reports which tools it found:</p>
|
||||
</div>
|
||||
<p>It prints a table grouped by category (Core, DRM, HDR, Subtitle, Player,
|
||||
Network) with a status column: a green check for tools that resolved and a red
|
||||
cross for those it could not find, plus a summary line such as
|
||||
cross for those it could not find. A version column shows the version that each
|
||||
tool reports, or <code>-</code> when it reports none. It ends with a summary line such as
|
||||
<code>All required tools installed ✓</code> or <code>Missing required: <names></code>.</p>
|
||||
<p>If a required tool shows as missing, <code>env check</code> tells you to run
|
||||
<code>unshackle setup</code>. You can also install the tool by hand and put it on your
|
||||
|
||||
@@ -3683,9 +3683,23 @@ through the tunnel. It stops at the first step that fails.</p>
|
||||
<div class="language-text highlight"><pre><span></span><code><span id="__span-12-1"><a id="__codelineno-12-1" name="__codelineno-12-1" href="#__codelineno-12-1"></a>unshackle env COMMAND [ARGS]...
|
||||
</span></code></pre></div>
|
||||
<h3 id="env-check"><code>env check</code><a class="headerlink" href="#env-check" title="Permanent link">¶</a></h3>
|
||||
<div class="language-text highlight"><pre><span></span><code><span id="__span-13-1"><a id="__codelineno-13-1" name="__codelineno-13-1" href="#__codelineno-13-1"></a>unshackle env check
|
||||
<div class="language-text highlight"><pre><span></span><code><span id="__span-13-1"><a id="__codelineno-13-1" name="__codelineno-13-1" href="#__codelineno-13-1"></a>unshackle env check [--verbose]
|
||||
</span></code></pre></div>
|
||||
<p>Prints a dependency table (Category / Tool / Status / Required / Purpose) that shows which external tools unshackle finds on your <code>PATH</code>. It also gives a summary of how many required tools are present. If a required tool is missing, it tells you to run <a href="#setup"><code>unshackle setup</code></a>.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Option</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--verbose</code></td>
|
||||
<td>Adds a Path column with the file that unshackle loads for each tool. Use it to find a tool that you want to replace.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Prints a dependency table (Category / Tool / Status / Version / Required / Purpose) that shows which external tools unshackle finds on your <code>PATH</code> and the version that each one reports. The version is <code>-</code> when a tool does not report one. It also gives a summary of how many required tools are present. If a required tool is missing, it tells you to run <a href="#setup"><code>unshackle setup</code></a>.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user