Updated novels.yaml and loader.ts

This commit is contained in:
qwsdcvghyu89
2026-06-17 08:18:34 +10:00
parent 0dde717ed6
commit e190a5411f
2 changed files with 2 additions and 10 deletions
+2 -2
View File
@@ -29,8 +29,8 @@ export function loadNovelsConfig(): NovelsConfig {
if (novel.type !== 'epub' && novel.type !== 'web-scraped') {
throw new Error(`Novel "${novel.slug}" has unknown type "${novel.type}"`);
}
if (!novel.source?.url && !novel.source?.urls?.length) {
throw new Error(`Novel "${novel.slug}" missing source.url or source.urls`);
if (!novel.source?.url && !novel.source?.urls?.length && !novel.source?.urlTemplate) {
throw new Error(`Novel "${novel.slug}" missing source: provide url (TOC strategy), urls (epub), or urlTemplate (increment strategy)`);
}
}