fix(parsers): corriger la génération de thumbnails CBR/CBZ/PDF

- CBR: contourner le bug XADRegexException de unar en appelant unar
  avec un symlink à nom neutre (archive.cbr) au lieu du chemin réel,
  qui peut contenir des caractères regex spéciaux comme [ ] ( )
- CBR/CBZ: remplacer le tri lexicographique par natord (tri naturel)
  pour que page2.jpg soit trié avant page10.jpg
- PDF: brancher pdftoppm -scale-to sur config.width.max(config.height)
  au lieu d'une valeur hardcodée (800px → 400px par défaut)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 16:17:20 +01:00
parent 1c106a4ff2
commit f2d9bedcc7
5 changed files with 47 additions and 22 deletions

View File

@@ -247,8 +247,9 @@ pub async fn analyze_library_books(
// Run blocking archive I/O on a thread pool
let book_id = task.book_id;
let path_owned = path.to_path_buf();
let pdf_scale = config.width.max(config.height);
let analyze_result = tokio::task::spawn_blocking(move || {
analyze_book(&path_owned, format)
analyze_book(&path_owned, format, pdf_scale)
})
.await;