mirror of https://github.com/stashapp/stash.git
Fix scene bitrate unit (#1650)
This commit is contained in:
parent
0d4ab7f6f3
commit
ac72d4db2b
|
@ -1,5 +1,5 @@
|
|||
import React from "react";
|
||||
import { FormattedNumber } from "react-intl";
|
||||
import { FormattedMessage, FormattedNumber, useIntl } from "react-intl";
|
||||
import * as GQL from "src/core/generated-graphql";
|
||||
import { TextUtils } from "src/utils";
|
||||
import { TextField, URLField } from "src/utils/field";
|
||||
|
@ -11,6 +11,8 @@ interface ISceneFileInfoPanelProps {
|
|||
export const SceneFileInfoPanel: React.FC<ISceneFileInfoPanelProps> = (
|
||||
props: ISceneFileInfoPanelProps
|
||||
) => {
|
||||
const intl = useIntl();
|
||||
|
||||
function renderFileSize() {
|
||||
if (props.scene.file.size === undefined) {
|
||||
return;
|
||||
|
@ -123,15 +125,21 @@ export const SceneFileInfoPanel: React.FC<ISceneFileInfoPanelProps> = (
|
|||
truncate
|
||||
/>
|
||||
<TextField id="framerate">
|
||||
<FormattedNumber value={props.scene.file.framerate ?? 0} /> frames per
|
||||
second
|
||||
<FormattedMessage
|
||||
id="frames_per_second"
|
||||
values={{ value: intl.formatNumber(props.scene.file.framerate ?? 0) }}
|
||||
/>
|
||||
</TextField>
|
||||
<TextField id="bitrate">
|
||||
<FormattedNumber
|
||||
value={(props.scene.file.bitrate ?? 0) / 1000000}
|
||||
maximumFractionDigits={2}
|
||||
/>{" "}
|
||||
frames per second
|
||||
<FormattedMessage
|
||||
id="megabits_per_second"
|
||||
values={{
|
||||
value: intl.formatNumber(
|
||||
(props.scene.file.bitrate ?? 0) / 1000000,
|
||||
{ maximumFractionDigits: 2 }
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</TextField>
|
||||
<TextField
|
||||
id="media_info.video_codec"
|
||||
|
|
|
@ -505,6 +505,7 @@
|
|||
"filter_name": "Filter name",
|
||||
"filters": "Filters",
|
||||
"framerate": "Frame Rate",
|
||||
"frames_per_second": "{value} frames per second",
|
||||
"galleries": "Galleries",
|
||||
"gallery": "Gallery",
|
||||
"gallery_count": "Gallery Count",
|
||||
|
@ -541,6 +542,7 @@
|
|||
"stream": "Stream",
|
||||
"video_codec": "Video Codec"
|
||||
},
|
||||
"megabits_per_second": "{value} megabits per second",
|
||||
"metadata": "Metadata",
|
||||
"movie": "Movie",
|
||||
"movie_scene_number": "Movie Scene Number",
|
||||
|
|
Loading…
Reference in New Issue