mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-05 15:47:20 +02:00
New: Added Mediainfo Video Dynamic Range column for movies
(cherry picked from commit ae0e23fc8ee450a20b43ca622eeccd0759451a2f) Closes #7247
This commit is contained in:
parent
e4c5fc5c6e
commit
c6e3f3c26c
@ -38,6 +38,7 @@
|
||||
}
|
||||
|
||||
.audioLanguages,
|
||||
.videoDynamicRangeType,
|
||||
.subtitles {
|
||||
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
||||
|
||||
|
@ -17,6 +17,7 @@ interface CssExports {
|
||||
'size': string;
|
||||
'subtitles': string;
|
||||
'video': string;
|
||||
'videoDynamicRangeType': string;
|
||||
}
|
||||
export const cssExports: CssExports;
|
||||
export default cssExports;
|
||||
|
@ -201,8 +201,8 @@ class MovieFileEditorRow extends Component {
|
||||
className={styles.audio}
|
||||
>
|
||||
<MediaInfoConnector
|
||||
movieFileId={id}
|
||||
type={mediaInfoTypes.AUDIO}
|
||||
movieFileId={id}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
@ -243,8 +243,22 @@ class MovieFileEditorRow extends Component {
|
||||
className={styles.video}
|
||||
>
|
||||
<MediaInfoConnector
|
||||
movieFileId={id}
|
||||
type={mediaInfoTypes.VIDEO}
|
||||
movieFileId={id}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'videoDynamicRangeType') {
|
||||
return (
|
||||
<TableRowCell
|
||||
key={name}
|
||||
className={styles.videoDynamicRangeType}
|
||||
>
|
||||
<MediaInfoConnector
|
||||
type={mediaInfoTypes.VIDEO_DYNAMIC_RANGE_TYPE}
|
||||
movieFileId={id}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
|
@ -42,7 +42,8 @@ function MediaInfo(props) {
|
||||
audioCodec,
|
||||
audioLanguages,
|
||||
subtitles,
|
||||
videoCodec
|
||||
videoCodec,
|
||||
videoDynamicRangeType
|
||||
} = props;
|
||||
|
||||
if (type === mediaInfoTypes.AUDIO) {
|
||||
@ -79,6 +80,14 @@ function MediaInfo(props) {
|
||||
);
|
||||
}
|
||||
|
||||
if (type === mediaInfoTypes.VIDEO_DYNAMIC_RANGE_TYPE) {
|
||||
return (
|
||||
<span>
|
||||
{videoDynamicRangeType}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -88,7 +97,8 @@ MediaInfo.propTypes = {
|
||||
audioCodec: PropTypes.string,
|
||||
audioLanguages: PropTypes.string,
|
||||
subtitles: PropTypes.string,
|
||||
videoCodec: PropTypes.string
|
||||
videoCodec: PropTypes.string,
|
||||
videoDynamicRangeType: PropTypes.string
|
||||
};
|
||||
|
||||
export default MediaInfo;
|
||||
|
@ -2,3 +2,4 @@ export const AUDIO = 'audio';
|
||||
export const AUDIO_LANGUAGES = 'audioLanguages';
|
||||
export const SUBTITLES = 'subtitles';
|
||||
export const VIDEO = 'video';
|
||||
export const VIDEO_DYNAMIC_RANGE_TYPE = 'videoDynamicRangeType';
|
||||
|
@ -44,6 +44,11 @@ export const defaultState = {
|
||||
label: () => translate('VideoCodec'),
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'videoDynamicRangeType',
|
||||
label: () => translate('VideoDynamicRange'),
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'audioInfo',
|
||||
label: () => translate('AudioInfo'),
|
||||
|
@ -1247,6 +1247,7 @@
|
||||
"Version": "Version",
|
||||
"VersionUpdateText": "Version {0} of Radarr has been installed, in order to get the latest changes you'll need to reload Radarr.",
|
||||
"VideoCodec": "Video Codec",
|
||||
"VideoDynamicRange": "Video Dynamic Range",
|
||||
"View": "View",
|
||||
"VisitGithubCustomFormatsAphrodite": "Visit the wiki for more details: ",
|
||||
"Waiting": "Waiting",
|
||||
|
@ -15,8 +15,9 @@ public class MediaInfoResource : RestResource
|
||||
public int VideoBitDepth { get; set; }
|
||||
public long VideoBitrate { get; set; }
|
||||
public string VideoCodec { get; set; }
|
||||
public string VideoDynamicRangeType { get; set; }
|
||||
public decimal VideoFps { get; set; }
|
||||
public string VideoDynamicRange { get; set; }
|
||||
public string VideoDynamicRangeType { get; set; }
|
||||
public string Resolution { get; set; }
|
||||
public string RunTime { get; set; }
|
||||
public string ScanType { get; set; }
|
||||
@ -42,8 +43,9 @@ public static MediaInfoResource ToResource(this MediaInfoModel model, string sce
|
||||
VideoBitDepth = model.VideoBitDepth,
|
||||
VideoBitrate = model.VideoBitrate,
|
||||
VideoCodec = MediaInfoFormatter.FormatVideoCodec(model, sceneName),
|
||||
VideoDynamicRangeType = MediaInfoFormatter.FormatVideoDynamicRangeType(model),
|
||||
VideoFps = Math.Round(model.VideoFps, 3),
|
||||
VideoDynamicRange = MediaInfoFormatter.FormatVideoDynamicRange(model),
|
||||
VideoDynamicRangeType = MediaInfoFormatter.FormatVideoDynamicRangeType(model),
|
||||
Resolution = $"{model.Width}x{model.Height}",
|
||||
RunTime = FormatRuntime(model.RunTime),
|
||||
ScanType = model.ScanType,
|
||||
|
Loading…
Reference in New Issue
Block a user