diff --git a/lib/Controller/AdminController.php b/lib/Controller/AdminController.php index d8a1d997..2dbb589a 100644 --- a/lib/Controller/AdminController.php +++ b/lib/Controller/AdminController.php @@ -115,6 +115,9 @@ class AdminController extends GenericApiController // Check supported preview mimes $status['mimes'] = $index->getPreviewMimes($index->getAllMimes()); + // Check for PHP Imagick + $status['imagick'] = class_exists('\Imagick') ? \Imagick::getVersion()['versionString'] : false; + // Check for bad encryption module $status['bad_encryption'] = \OCA\Memories\Util::isEncryptionEnabled(); @@ -128,7 +131,14 @@ class AdminController extends GenericApiController $status['gis_type'] = $e->getMessage(); } - // Check ffmpeg and ffprobe binaries + // Check for FFmpeg for preview generation + $status['ffmpeg_preview'] = $this->getExecutableStatus( + Util::getSystemConfig('preview_ffmpeg_path', null, true) + ?: trim(shell_exec('which ffmpeg') ?: ''), + fn ($p) => BinExt::testFFmpeg($p, 'ffmpeg'), + ); + + // Check ffmpeg and ffprobe binaries for transcoding $status['ffmpeg'] = $this->getExecutableStatus( Util::getSystemConfig('memories.vod.ffmpeg'), fn ($p) => BinExt::testFFmpeg($p, 'ffmpeg'), diff --git a/src/components/admin/AdminMixin.ts b/src/components/admin/AdminMixin.ts index 358776da..e02aacca 100644 --- a/src/components/admin/AdminMixin.ts +++ b/src/components/admin/AdminMixin.ts @@ -83,8 +83,8 @@ export default defineComponent({ } }, - binaryStatusType(status: IBinaryStatus, critical = true): string { - if (status === 'ok' || status.startsWith('test_ok')) { + binaryStatusType(status: IBinaryStatus, critical = true): 'success' | 'warning' | 'error' { + if (this.binaryStatusOk(status)) { return 'success'; } else if (status === 'not_found' || status === 'not_executable' || status.startsWith('test_fail')) { return critical ? 'error' : 'warning'; @@ -92,6 +92,10 @@ export default defineComponent({ return 'warning'; } }, + + binaryStatusOk(status: IBinaryStatus): boolean { + return status === 'ok' || status.startsWith('test_ok'); + }, }, computed: { diff --git a/src/components/admin/AdminTypes.ts b/src/components/admin/AdminTypes.ts index 43ae58ad..5e21d530 100644 --- a/src/components/admin/AdminTypes.ts +++ b/src/components/admin/AdminTypes.ts @@ -43,10 +43,12 @@ export type ISystemStatus = { bad_encryption: boolean; indexed_count: number; mimes: string[]; + imagick: string | false; gis_type: number; gis_count?: number; exiftool: IBinaryStatus; perl: IBinaryStatus; + ffmpeg_preview: IBinaryStatus; ffmpeg: IBinaryStatus; ffprobe: IBinaryStatus; govod: IBinaryStatus; diff --git a/src/components/admin/sections/FileSupport.vue b/src/components/admin/sections/FileSupport.vue index e7b7c58a..c0fcf364 100644 --- a/src/components/admin/sections/FileSupport.vue +++ b/src/components/admin/sections/FileSupport.vue @@ -10,6 +10,26 @@
+ +