fix(manga): conserver le padding du numéro de chapitre après scraping

This commit is contained in:
Jérémy Guillot
2026-04-09 15:11:23 +02:00
parent 1f1efd1b16
commit e214e1ea46

View File

@@ -103,7 +103,9 @@ readonly class GetMangaChaptersHandler
$min = min($numbers); $min = min($numbers);
$max = max($numbers); $max = max($numbers);
$fmt = fn (float $n) => $n == (int) $n ? (string) (int) $n : (string) $n; $fmt = fn (float $n) => $n == (int) $n
? str_pad((string) (int) $n, 2, '0', STR_PAD_LEFT)
: (string) $n;
$range = count($group) > 1 ? $fmt($min).'-'.$fmt($max) : $fmt($min); $range = count($group) > 1 ? $fmt($min).'-'.$fmt($max) : $fmt($min);
return new ChapterResponse( return new ChapterResponse(