From 9c858b7af0dc97ea7ed5851f175947febd14b293 Mon Sep 17 00:00:00 2001 From: Sergio Mendolia Date: Sun, 21 Jan 2024 16:50:09 +0100 Subject: [PATCH] fix grouping --- src/Repository/BookRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Repository/BookRepository.php b/src/Repository/BookRepository.php index 3fde2194..4daab842 100644 --- a/src/Repository/BookRepository.php +++ b/src/Repository/BookRepository.php @@ -55,7 +55,7 @@ public function getReadBooks(?string $year, string $type): QueryBuilder public static function extensionToType(string $extension): string { - return match ($extension) { + return match (strtolower($extension)) { 'pdf' => 'pdf', 'epub', 'mobi' => 'book', 'cbr', 'cba', 'cbz', 'cbt', 'cb7' => 'comic', @@ -69,7 +69,7 @@ public static function extensionsFromType(string $type): array return ['pdf', 'epub', 'mobi', 'cbr', 'cba', 'cbz', 'cbt', 'cb7']; } - return match ($type) { + return match (strtolower($type)) { 'pdf' => ['pdf'], 'book' => ['epub', 'mobi'], 'comic' => ['cbr', 'cba', 'cbz', 'cbt', 'cb7'],