mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-14 21:15:06 +00:00
Deployed 8b10b79 with MkDocs version: 1.6.1
This commit is contained in:
@@ -2072,7 +2072,7 @@ dropped.</p>
|
||||
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a><span class="w"> </span><span class="nt">movies</span><span class="p">:</span><span class="w"> </span><span class="s">"{title}</span><span class="nv"> </span><span class="s">({year})"</span>
|
||||
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a><span class="w"> </span><span class="nt">series</span><span class="p">:</span><span class="w"> </span><span class="s">"{title}</span><span class="nv"> </span><span class="s">({year})"</span>
|
||||
</span></code></pre></div>
|
||||
<p><strong>The nested <code>folder</code> sub-key</strong> controls output subfolders and is popped out of
|
||||
<p><strong>The nested <code>folder</code> sub-key</strong> controls output subfolders, and unshackle pops it out of
|
||||
<code>output_template</code>:</p>
|
||||
<ul>
|
||||
<li>A <strong>dict</strong> sets per-kind folder templates (kinds: <code>movies</code>, <code>series</code>, <code>songs</code>, <code>albums</code>).</li>
|
||||
@@ -2104,7 +2104,7 @@ folders do not carry the part.</p>
|
||||
<div class="admonition tip">
|
||||
<p class="admonition-title"><code>{absolute}</code> counts episodes across seasons</p>
|
||||
<p><code>absolute</code> holds the absolute episode number, zero-padded to 3 digits (<code>007</code>), and is
|
||||
empty on titles that have none. It is added to the name and never replaces <code>{season}</code>
|
||||
empty on titles that have none. You add it to the name yourself, and it never replaces <code>{season}</code>
|
||||
or <code>{episode}</code>. Any series with a TVDB absolute order can use it, anime most often.
|
||||
Services can supply it, and
|
||||
<a href="../../../guide/downloading/#metadata-and-tagging"><code>--enrich</code></a> fills it in from TVDB.
|
||||
@@ -2143,7 +2143,7 @@ Use <code>{absolute?}</code> so the name stays clean when it is unknown.</p>
|
||||
<td><code>chapter_fallback_name</code></td>
|
||||
<td>str</td>
|
||||
<td><code>""</code></td>
|
||||
<td>Fallback chapter-name template, e.g. <code>"Chapter {i:02}"</code>.</td>
|
||||
<td>Fallback template for chapter names, e.g. <code>"Chapter {i:02}"</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>unicode_filenames</code></td>
|
||||
@@ -2158,8 +2158,8 @@ Use <code>{absolute?}</code> so the name stays clean when it is unknown.</p>
|
||||
<li><strong>Type:</strong> <code>list</code> · <strong>Default:</strong> <code>[]</code></li>
|
||||
</ul>
|
||||
<p>Conditionally replaces <a href="#tagging-naming-keys"><code>tag</code></a> for a given download. Each rule pairs a <code>when</code>
|
||||
dict of conditions with the <code>tag</code> to use when they hold. Rules are evaluated in order and the
|
||||
first match wins; if no rule matches, the global <code>tag</code> is kept.</p>
|
||||
dict of conditions with the <code>tag</code> to use when they hold. unshackle evaluates the rules in
|
||||
order and the first match wins. If no rule matches, the global <code>tag</code> stays.</p>
|
||||
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="nt">tag_rules</span><span class="p">:</span>
|
||||
</span><span id="__span-1-2"><a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> title_type</span><span class="p">:</span><span class="w"> </span><span class="nv">movie</span><span class="p p-Indicator">,</span><span class="nt"> lang_tag</span><span class="p">:</span><span class="w"> </span><span class="nv">SUBBED</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
</span><span id="__span-1-3"><a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">SUBMOVIES</span>
|
||||
@@ -2169,29 +2169,30 @@ first match wins; if no rule matches, the global <code>tag</code> is kept.</p>
|
||||
<p>Rule semantics:</p>
|
||||
<ul>
|
||||
<li>Every condition in <code>when</code> must hold (they are AND-ed).</li>
|
||||
<li>A value may be a scalar or a list; a list matches if <strong>any</strong> entry matches.</li>
|
||||
<li>A value can be a scalar or a list. A list matches if <strong>any</strong> entry matches.</li>
|
||||
<li>Comparison is case-insensitive string equality.</li>
|
||||
<li>The keys of <code>when</code> are the filename template variables that describe the release itself:
|
||||
<li>The keys of <code>when</code> are the filename template variables for the release itself:
|
||||
<code>title_type</code>, <code>quality</code>, <code>resolution</code>, <code>source</code>, <code>video</code>, <code>hdr</code>, <code>hfr</code>, <code>audio</code>,
|
||||
<code>audio_channels</code>, <code>audio_full</code>, <code>atmos</code>, <code>dual</code>, <code>multi</code>, <code>dubbed</code>, <code>edition</code>, <code>repack</code>,
|
||||
and <code>lang_tag</code>. Only these are available. The title's own fields (<code>title</code>, <code>year</code>, <code>season</code>,
|
||||
<code>episode</code>, and so on) are added after the rules run and cannot be matched.</li>
|
||||
<li>An unknown key in <code>when</code> is a mistake: unshackle logs a warning that names the key and skips
|
||||
that rule. A rule without conditions or without a <code>tag</code> is also warned about and skipped.</li>
|
||||
and <code>lang_tag</code>. Only these are available. unshackle adds the title's own fields (<code>title</code>,
|
||||
<code>year</code>, <code>season</code>, <code>episode</code>, and so on) after it evaluates the rules, so a condition cannot
|
||||
use them.</li>
|
||||
<li>An unknown key in <code>when</code> is a mistake: unshackle logs a warning that names the key
|
||||
and skips that rule. unshackle also warns about a rule without conditions or without a <code>tag</code>, and skips it.</li>
|
||||
</ul>
|
||||
<p>Put the more specific rules first, because the first match ends the search.</p>
|
||||
<p>Put the more specific rules first, because unshackle stops at the first match.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Match <code>hdr</code> on the exact value</p>
|
||||
<p>Matching is exact, and <code>hdr</code> is a composite label for Dolby Vision titles: a DV title with
|
||||
an HDR10 base layer gives <code>DV.HDR</code>, and with an HDR10+ base layer <code>DV.HDR10P</code>. Plain <code>DV</code>
|
||||
does <strong>not</strong> match those. List every variant you want, as the example above does. Note
|
||||
does <strong>not</strong> match those. Name every variant you want, as the example above does. Note
|
||||
also that HDR10 gives <code>HDR</code>, not <code>HDR10</code>. The full set of values is <code>HDR</code>, <code>HDR10P</code>, <code>DV</code>,
|
||||
<code>DV.HDR</code>, <code>DV.HDR10P</code>, and <code>HLG</code>, as listed in the
|
||||
<a href="../../../guide/output-and-naming/#template-variables">variable table</a>.</p>
|
||||
</div>
|
||||
<h3 id="operators">Operators<a class="headerlink" href="#operators" title="Permanent link">¶</a></h3>
|
||||
<p>A condition value may start with a comparison operator, which is applied to the rest of the
|
||||
value:</p>
|
||||
<p>A condition value can start with a comparison operator, which unshackle applies to the rest of
|
||||
the value:</p>
|
||||
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-2-1"><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="nt">tag_rules</span><span class="p">:</span>
|
||||
</span><span id="__span-2-2"><a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> resolution</span><span class="p">:</span><span class="w"> </span><span class="s">"<1080"</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
</span><span id="__span-2-3"><a id="__codelineno-2-3" name="__codelineno-2-3" href="#__codelineno-2-3"></a><span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">SDGROUP</span>
|
||||
|
||||
Reference in New Issue
Block a user