admin: add exiftool

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/563/head
Varun Patil 2023-04-09 23:42:23 -07:00
parent b80fa55dd3
commit 203cb146c8
2 changed files with 262 additions and 229 deletions

View File

@ -298,6 +298,13 @@ class Util
public static function systemConfigDefaults(): array public static function systemConfigDefaults(): array
{ {
return [ return [
// Path to exiftool binary
'memories.exiftool' => '',
// Do not use packaged binaries of exiftool
// This requires perl to be available
'memories.exiftool_no_local' => false,
// Places database type identifier // Places database type identifier
'memories.gis_type' => -1, 'memories.gis_type' => -1,

View File

@ -1,6 +1,25 @@
<template> <template>
<div class="outer" v-if="loaded"> <div class="outer" v-if="loaded">
<div> <h2>{{ t("memories", "EXIF Extraction") }}</h2>
<NcTextField
:label="t('memories', 'Path to packaged exiftool binary')"
:label-visible="true"
:value="exiftoolPath"
@change="update('exiftoolPath', $event.target.value)"
disabled
/>
<NcCheckboxRadioSwitch
:checked.sync="exiftoolPerl"
@update:checked="update('exiftoolPerl')"
type="switch"
>
{{
t("memories", "Use system perl (only if packaged binary does not work)")
}}
</NcCheckboxRadioSwitch>
<h2>{{ t("memories", "Video Streaming") }}</h2> <h2>{{ t("memories", "Video Streaming") }}</h2>
<p> <p>
@ -238,11 +257,10 @@
type="radio" type="radio"
class="m-radio" class="m-radio"
@update:checked="update('nvencScaler')" @update:checked="update('nvencScaler')"
>{{ t("memories", "CUDA scaler") }}</NcCheckboxRadioSwitch >{{ t("memories", "CUDA scaler") }}
> </NcCheckboxRadioSwitch>
</p> </p>
</div> </div>
</div>
</template> </template>
<script lang="ts"> <script lang="ts">
@ -259,6 +277,9 @@ const NcTextField = () => import("@nextcloud/vue/dist/Components/NcTextField");
/** Map from UI to backend settings */ /** Map from UI to backend settings */
const settings = { const settings = {
exiftoolPath: "memories.exiftool",
exiftoolPerl: "memories.exiftool_no_local",
enableTranscoding: "memories.vod.disable", enableTranscoding: "memories.vod.disable",
ffmpegPath: "memories.vod.ffmpeg", ffmpegPath: "memories.vod.ffmpeg",
ffprobePath: "memories.vod.ffprobe", ffprobePath: "memories.vod.ffprobe",
@ -290,6 +311,9 @@ export default defineComponent({
data: () => ({ data: () => ({
loaded: false, loaded: false,
exiftoolPath: "",
exiftoolPerl: false,
enableTranscoding: false, enableTranscoding: false,
ffmpegPath: "", ffmpegPath: "",
ffprobePath: "", ffprobePath: "",
@ -357,6 +381,7 @@ export default defineComponent({
<style lang="scss" scoped> <style lang="scss" scoped>
.outer { .outer {
padding: 20px; padding: 20px;
padding-top: 0px;
.checkbox-radio-switch { .checkbox-radio-switch {
margin: 2px 8px; margin: 2px 8px;
@ -369,6 +394,7 @@ export default defineComponent({
h2 { h2 {
font-size: 1.5em; font-size: 1.5em;
font-weight: bold; font-weight: bold;
margin-top: 25px;
} }
h3 { h3 {