Deployed 09cae2e with MkDocs version: 1.6.1

This commit is contained in:
2026-10-07 17:16:14 +00:00
parent 53e2d835d3
commit fbb818e18b
7 changed files with 414 additions and 358 deletions
+4 -1
View File
@@ -2662,7 +2662,10 @@ returns a value. <code>check</code> returns <code>None</code> while the approval
<p>It raises <code>TimeoutError</code> after <code>timeout</code> seconds. Under <code>serve</code> mode it also stops
when the client deletes the remote session, so the loop does not continue on the
server with no client. The message goes out as a log line, so a remote
session shows it, but a REST download job does not relay it as <code>input_prompt</code>.</p>
session shows it. A REST download job shows it in its <code>notice</code> field until the wait ends.</p>
<p>The wait sees a cancel only between two <code>check</code> calls, so <code>check</code> must return within a few
seconds. A <code>check</code> that reads a socket keeps the socket open across calls and returns <code>None</code>
after each short idle wait.</p>
<div class="admonition warning">
<p class="admonition-title">Make each token cache entry unique</p>
<p>The cache above uses <code>tokens_{device}_{profile}</code> on purpose. A token cache
+35 -4
View File
@@ -1664,6 +1664,17 @@
<nav class="md-nav" aria-label="POST /api/list-titles">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#logins-that-need-the-user" class="md-nav__link">
<span class="md-ellipsis">
Logins that need the user
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#client-cache-on-a-remote-only-server" class="md-nav__link">
<span class="md-ellipsis">
@@ -2557,6 +2568,17 @@
<nav class="md-nav" aria-label="POST /api/list-titles">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#logins-that-need-the-user" class="md-nav__link">
<span class="md-ellipsis">
Logins that need the user
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#client-cache-on-a-remote-only-server" class="md-nav__link">
<span class="md-ellipsis">
@@ -3401,6 +3423,11 @@
</tbody>
</table>
<p>You can also pass service-specific CLI options as additional keys.</p>
<h4 id="logins-that-need-the-user">Logins that need the user<a class="headerlink" href="#logins-that-need-the-user" title="Permanent link">&para;</a></h4>
<p><code>search</code>, <code>list-titles</code> and <code>list-tracks</code> have no channel to the user. A login that asks for
input or waits for an approval on another device fails at once with <code>AUTH_FAILED</code> on these
endpoints. Complete that login in a download job or a remote session, then send the saved
login with the request.</p>
<h4 id="client-cache-on-a-remote-only-server">Client cache on a remote-only server<a class="headerlink" href="#client-cache-on-a-remote-only-server" title="Permanent link">&para;</a></h4>
<p>A <code>--remote-only</code> server keeps nothing that a client sends. When the request
does not use a server account, the server runs <code>search</code>, <code>list-titles</code> and
@@ -4200,10 +4227,11 @@ an HTTP caller would be remote code execution. You configure post-scripts only i
</span><span id="__span-14-18"><a id="__codelineno-14-18" name="__codelineno-14-18" href="#__codelineno-14-18"></a><span class="w"> </span><span class="nt">"segments_total"</span><span class="p">:</span><span class="w"> </span><span class="mi">300</span><span class="p">,</span>
</span><span id="__span-14-19"><a id="__codelineno-14-19" name="__codelineno-14-19" href="#__codelineno-14-19"></a><span class="w"> </span><span class="nt">"speed"</span><span class="p">:</span><span class="w"> </span><span class="s2">"5.2 MB/s"</span><span class="p">,</span>
</span><span id="__span-14-20"><a id="__codelineno-14-20" name="__codelineno-14-20" href="#__codelineno-14-20"></a><span class="w"> </span><span class="nt">"skipped_subtitles"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span>
</span><span id="__span-14-21"><a id="__codelineno-14-21" name="__codelineno-14-21" href="#__codelineno-14-21"></a><span class="w"> </span><span class="nt">"input_prompt"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span>
</span><span id="__span-14-22"><a id="__codelineno-14-22" name="__codelineno-14-22" href="#__codelineno-14-22"></a><span class="w"> </span><span class="p">}</span>
</span><span id="__span-14-23"><a id="__codelineno-14-23" name="__codelineno-14-23" href="#__codelineno-14-23"></a><span class="w"> </span><span class="p">]</span>
</span><span id="__span-14-24"><a id="__codelineno-14-24" name="__codelineno-14-24" href="#__codelineno-14-24"></a><span class="p">}</span>
</span><span id="__span-14-21"><a id="__codelineno-14-21" name="__codelineno-14-21" href="#__codelineno-14-21"></a><span class="w"> </span><span class="nt">"input_prompt"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
</span><span id="__span-14-22"><a id="__codelineno-14-22" name="__codelineno-14-22" href="#__codelineno-14-22"></a><span class="w"> </span><span class="nt">"notice"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span>
</span><span id="__span-14-23"><a id="__codelineno-14-23" name="__codelineno-14-23" href="#__codelineno-14-23"></a><span class="w"> </span><span class="p">}</span>
</span><span id="__span-14-24"><a id="__codelineno-14-24" name="__codelineno-14-24" href="#__codelineno-14-24"></a><span class="w"> </span><span class="p">]</span>
</span><span id="__span-14-25"><a id="__codelineno-14-25" name="__codelineno-14-25" href="#__codelineno-14-25"></a><span class="p">}</span>
</span></code></pre></div>
</div>
</div>
@@ -4501,6 +4529,9 @@ an HTTP caller would be remote code execution. You configure post-scripts only i
example an OTP code, a PIN, or a device-code confirmation. The job then shows the prompt in its
<code>input_prompt</code> field and in its <code>progress</code> events. Show the prompt to the user and send the
answer here.</p>
<p>A job that waits for an approval on another device, such as a pair code login, shows the
message in its <code>notice</code> field instead. A notice needs no answer: show it to the user and keep
polling.</p>
<div class="tabbed-set tabbed-alternate" data-tabs="13:2"><input checked="checked" id="__tabbed_13_1" name="__tabbed_13" type="radio" /><input id="__tabbed_13_2" name="__tabbed_13" type="radio" /><div class="tabbed-labels"><label for="__tabbed_13_1">Request</label><label for="__tabbed_13_2">Response <code>200</code></label></div>
<div class="tabbed-content">
<div class="tabbed-block">
+8 -1
View File
@@ -2689,6 +2689,11 @@ full detail:</p>
<td>string or <code>null</code></td>
<td>The prompt the service waits on. Answer it with <code>POST /api/download/jobs/{job_id}/input</code>.</td>
</tr>
<tr>
<td><code>notice</code></td>
<td>string or <code>null</code></td>
<td>A message the service shows while it waits for an approval on another device, such as a pair code. It needs no answer.</td>
</tr>
</tbody>
</table>
<p>The full detail adds <code>started_time</code>, <code>completed_time</code>, <code>output_files</code>, the redacted
@@ -2893,7 +2898,9 @@ server process. For each job it spawns a separate Python subprocess:</p>
</ul>
<p>The job worker has no terminal. When a service asks the user for input, the job worker writes
the prompt to <code>progress.json</code> as <code>input_prompt</code> and waits. The answer from
<code>POST /api/download/jobs/{job_id}/input</code> goes to the job worker on its stdin.</p>
<code>POST /api/download/jobs/{job_id}/input</code> goes to the job worker on its stdin.
When a service waits for an approval on another device, the job worker writes the message as
<code>notice</code> and sets it back to <code>null</code> when the wait ends.</p>
<p>Running each download out-of-process isolates the server from crashes, memory growth,
and blocking work inside the download engine, and makes hard cancellation (killing the
process) reliable.</p>
+4 -1
View File
@@ -2532,7 +2532,10 @@ server does not have to prompt:</p>
<code>controld://&lt;resolver&gt;@dns.controld.com</code>. The server counts it as a full proxy
URI and runs its own forwarder for it. A bare region skips Control D, because its
proxy is a forwarder on the client. See
<a href="../../../guide/proxies-and-vpn/#control-d">Control D</a></li>
<a href="../../../guide/proxies-and-vpn/#control-d">Control D</a>
The client also downloads playlists and segments through the same proxy,
as a local run does. <code>--no-proxy-download</code> and <code>--proxy-download</code> change
that for downloads only.</li>
<li>Track-selection hints (<code>range_</code>, <code>vcodec</code>, <code>quality</code>, <code>best_available</code>) so
the server fetches the right manifests</li>
<li>Your language and audio codec selection (<code>-l</code>, <code>-vl</code>, <code>-al</code>, <code>-a</code>, <code>-fs</code>)
+2 -1
View File
@@ -2738,7 +2738,8 @@ Two kinds of members matter: <strong>class variables</strong> that give the deta
bridge, the REST download job relay, or the rich console.</li>
<li><strong><code>wait_for_approval(message, check, timeout, interval=3.0)</code></strong>: shows a message, then
calls <code>check</code> until it returns a value. Use it for a login that the user approves on
another device, such as a pair code.</li>
another device, such as a pair code. A remote-dl session shows the message as a log
line, and a REST download job shows it as the job's <code>notice</code>.</li>
<li><strong>Event callbacks</strong>: <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> let a service react to
pipeline events (for example, MonaLisa decrypts each segment in <code>on_segment_downloaded</code>).</li>