From 5cd9bc920a3e81e21b6c82bd7da9e2208a9d7a88 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 25 Oct 2022 10:20:50 -0700 Subject: [PATCH] Print info on file type support --- lib/Command/Index.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Command/Index.php b/lib/Command/Index.php index d391855b..6e5f05c2 100644 --- a/lib/Command/Index.php +++ b/lib/Command/Index.php @@ -115,14 +115,22 @@ class Index extends Command { // Print mime type support information $output->writeln('MIME Type support:'); - foreach (Application::IMAGE_MIMES as $mimeType) { + $mimes = array_merge(Application::IMAGE_MIMES, Application::VIDEO_MIMES); + $someUnsupported = false; + foreach ($mimes as &$mimeType) { if ($this->preview->isMimeSupported($mimeType)) { $output->writeln(" {$mimeType}: supported"); } else { - $output->writeln(" {$mimeType}: not supported by preview generator"); + $output->writeln(" {$mimeType}: not supported"); + $someUnsupported = true; } } + // Print file type support info + if ($someUnsupported) { + $output->writeln("\nSome file types are not supported by your preview provider.\nPlease see https://github.com/pulsejet/memories/wiki/File-Type-Support\n"); + } + // Get options and arguments $refresh = $input->getOption('refresh') ? true : false; $clear = $input->getOption('clear') ? true : false;