From 2b4bbdf25ebf43049d2f2739dc5c6ebe6385be5f Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Thu, 3 Nov 2022 00:56:28 +0800 Subject: [PATCH] web support api /v1/get_file_ffprobe_info --- web/src/component/FileInfo.js | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/web/src/component/FileInfo.js b/web/src/component/FileInfo.js index 7cdb13f..3ec3a1a 100644 --- a/web/src/component/FileInfo.js +++ b/web/src/component/FileInfo.js @@ -1,6 +1,6 @@ -import { useNavigate, useParams } from "react-router"; -import { useContext, useEffect, useState } from "react"; -import { Tr, tr, langCodeContext } from "../translate"; +import {useNavigate, useParams} from "react-router"; +import {useContext, useEffect, useState} from "react"; +import {Tr, tr, langCodeContext} from "../translate"; function FileInfo(props) { let navigate = useNavigate(); @@ -15,7 +15,8 @@ function FileInfo(props) { const [tags, setTags] = useState([]); const [tagsOnFile, setTagsOnFile] = useState([]); const [selectedTagID, setSelectedTagID] = useState(""); - const { langCode } = useContext(langCodeContext); + const {langCode} = useContext(langCodeContext); + const [ffprobeInfo, setFfprobeInfo] = useState(""); function refresh() { fetch(`/api/v1/get_file_info`, { @@ -301,6 +302,27 @@ function FileInfo(props) { + + + + {ffprobeInfo && } + ); }