From a2f2927ef14874da9453aa5a910f984ef248a373 Mon Sep 17 00:00:00 2001 From: Sergio Mendolia Date: Sat, 14 Oct 2023 09:19:32 +0200 Subject: [PATCH] order books --- src/Command/BooksTagCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Command/BooksTagCommand.php b/src/Command/BooksTagCommand.php index b17cb153..02f9fbad 100644 --- a/src/Command/BooksTagCommand.php +++ b/src/Command/BooksTagCommand.php @@ -29,7 +29,7 @@ public function __construct(private BookSuggestions $bookSuggestions, private Bo protected function configure(): void { $this - ->addOption('allow-google', 'f', InputOption::VALUE_NONE, 'Force the extraction of the cover') + ->addOption('allow-google', 'g', InputOption::VALUE_NONE, 'Force the extraction of the cover') ->addArgument('book-id', InputOption::VALUE_REQUIRED, 'Which book to extract the cover from, use "all" for all books') ; } @@ -41,7 +41,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $allowGoogle = $input->getOption('allow-google'); if ($bookId === 'all') { - $books = $this->bookRepository->findAll(); + $books = $this->bookRepository->findBy([], ['updated' => 'ASC']); } else { $books = $this->bookRepository->findBy(['id' => $bookId]); }