Make the naming scheme fully user-editable, with the user's preferred format as default
- ExpressionFormat::compile_scriptlet now falls back to treating a {token} as a
literal multi-word binding key when it's neither a valid Rhai identifier nor
valid Rhai script, but still looks like a plain human-typed field name (only
letters/digits/underscores/spaces). This is what lets `{show name}` work
without anyone needing to know Rhai, while real Rhai script (even containing
spaces) still takes priority and genuine syntax errors still surface.
- New default naming scheme app-wide: `{show name} - {season number}x
{episode number} - {episode name}` (previously the terser {n} - {s00e00} -
{t} form). Match/Fetch Data auto-upgrade targets updated to match, and
sample items carry both the short FileBot-style keys and the new
human-readable ones side by side.
- Naming scheme editor UI rewritten: explains the field is fully editable,
lists available fields grouped by when they become available (always /
after Match / after Fetch Data), and clarifies Rhai script is also
supported for anyone who wants it.
- 3 new unit tests for the plain-field-name fallback (multi-word lookup
works, real Rhai still takes priority, genuine syntax errors still error).
This commit is contained in:
@@ -262,6 +262,59 @@
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.format-hint code,
|
||||
.format-editor label code {
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
border-radius: 4px;
|
||||
padding: 1px 5px;
|
||||
font-family: ui-monospace, "SF Mono", monospace;
|
||||
font-size: 10.5px;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.format-hint a {
|
||||
color: var(--aurora-cyan);
|
||||
}
|
||||
|
||||
.format-fields {
|
||||
margin: 10px 0 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.format-fields-group {
|
||||
flex: 1 1 160px;
|
||||
min-width: 140px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
padding: 8px 10px;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--surface-deep);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.format-fields-group-title {
|
||||
flex-basis: 100%;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
color: var(--muted-text);
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.format-fields-group code {
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
border-radius: 4px;
|
||||
padding: 2px 6px;
|
||||
font-family: ui-monospace, "SF Mono", monospace;
|
||||
font-size: 10.5px;
|
||||
color: var(--aurora-green);
|
||||
}
|
||||
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
|
||||
Reference in New Issue
Block a user