Change path default for audiobooks + description fixes (#933)

This commit is contained in:
Alex
2026-04-30 18:20:05 +01:00
committed by GitHub
parent 9dd445f2af
commit 3554d01c81
9 changed files with 155 additions and 37 deletions
@@ -106,7 +106,6 @@ export const NamingTemplateField = ({
disabled={fieldDisabled}
className="w-full rounded-lg border border-(--border-muted) bg-(--bg-soft) px-3 py-2 text-sm transition-colors focus:border-sky-500 focus:ring-2 focus:ring-sky-500/50 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-60"
/>
{boundField.description && <p className="text-xs opacity-60">{boundField.description}</p>}
</div>
{(hasPathSeparatorInFilename || preview.unknownTokens.length > 0) && (
@@ -2,11 +2,18 @@ import { describe, expect, it } from 'vitest';
import {
buildNamingTemplatePreview,
NAMING_TEMPLATE_TOKENS,
renderNamingTemplate,
SAMPLE_NAMING_METADATA,
} from '../utils/namingTemplatePreview';
describe('namingTemplatePreview', () => {
it('groups primary title with universal variables', () => {
expect(NAMING_TEMPLATE_TOKENS.find((token) => token.token === 'PrimaryTitle')?.group).toBe(
'Universal',
);
});
it('renders primary title in path previews', () => {
const preview = buildNamingTemplatePreview(
'{Author}/{Series/}{SeriesPosition - }{PrimaryTitle} ({Year})',
@@ -39,7 +39,7 @@ export const NAMING_TEMPLATE_TOKENS: NamingTemplateToken[] = [
label: 'Primary title',
description: 'Title without the subtitle suffix',
value: 'The Hound of the Baskervilles',
group: 'Core',
group: 'Universal',
},
{
token: 'Year',