New: Added Mediainfo Video Dynamic Range column for movies

(cherry picked from commit ae0e23fc8ee450a20b43ca622eeccd0759451a2f)

Closes #7247
pull/9065/head
Mark McDowall 3 years ago committed by Bogdan
parent e4c5fc5c6e
commit c6e3f3c26c

@ -38,6 +38,7 @@
} }
.audioLanguages, .audioLanguages,
.videoDynamicRangeType,
.subtitles { .subtitles {
composes: cell from '~Components/Table/Cells/TableRowCell.css'; composes: cell from '~Components/Table/Cells/TableRowCell.css';

@ -17,6 +17,7 @@ interface CssExports {
'size': string; 'size': string;
'subtitles': string; 'subtitles': string;
'video': string; 'video': string;
'videoDynamicRangeType': string;
} }
export const cssExports: CssExports; export const cssExports: CssExports;
export default cssExports; export default cssExports;

@ -201,8 +201,8 @@ class MovieFileEditorRow extends Component {
className={styles.audio} className={styles.audio}
> >
<MediaInfoConnector <MediaInfoConnector
movieFileId={id}
type={mediaInfoTypes.AUDIO} type={mediaInfoTypes.AUDIO}
movieFileId={id}
/> />
</TableRowCell> </TableRowCell>
); );
@ -243,8 +243,22 @@ class MovieFileEditorRow extends Component {
className={styles.video} className={styles.video}
> >
<MediaInfoConnector <MediaInfoConnector
movieFileId={id}
type={mediaInfoTypes.VIDEO} 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> </TableRowCell>
); );

@ -42,7 +42,8 @@ function MediaInfo(props) {
audioCodec, audioCodec,
audioLanguages, audioLanguages,
subtitles, subtitles,
videoCodec videoCodec,
videoDynamicRangeType
} = props; } = props;
if (type === mediaInfoTypes.AUDIO) { if (type === mediaInfoTypes.AUDIO) {
@ -79,6 +80,14 @@ function MediaInfo(props) {
); );
} }
if (type === mediaInfoTypes.VIDEO_DYNAMIC_RANGE_TYPE) {
return (
<span>
{videoDynamicRangeType}
</span>
);
}
return null; return null;
} }
@ -88,7 +97,8 @@ MediaInfo.propTypes = {
audioCodec: PropTypes.string, audioCodec: PropTypes.string,
audioLanguages: PropTypes.string, audioLanguages: PropTypes.string,
subtitles: PropTypes.string, subtitles: PropTypes.string,
videoCodec: PropTypes.string videoCodec: PropTypes.string,
videoDynamicRangeType: PropTypes.string
}; };
export default MediaInfo; export default MediaInfo;

@ -2,3 +2,4 @@ export const AUDIO = 'audio';
export const AUDIO_LANGUAGES = 'audioLanguages'; export const AUDIO_LANGUAGES = 'audioLanguages';
export const SUBTITLES = 'subtitles'; export const SUBTITLES = 'subtitles';
export const VIDEO = 'video'; export const VIDEO = 'video';
export const VIDEO_DYNAMIC_RANGE_TYPE = 'videoDynamicRangeType';

@ -44,6 +44,11 @@ export const defaultState = {
label: () => translate('VideoCodec'), label: () => translate('VideoCodec'),
isVisible: true isVisible: true
}, },
{
name: 'videoDynamicRangeType',
label: () => translate('VideoDynamicRange'),
isVisible: false
},
{ {
name: 'audioInfo', name: 'audioInfo',
label: () => translate('AudioInfo'), label: () => translate('AudioInfo'),

@ -1247,6 +1247,7 @@
"Version": "Version", "Version": "Version",
"VersionUpdateText": "Version {0} of Radarr has been installed, in order to get the latest changes you'll need to reload Radarr.", "VersionUpdateText": "Version {0} of Radarr has been installed, in order to get the latest changes you'll need to reload Radarr.",
"VideoCodec": "Video Codec", "VideoCodec": "Video Codec",
"VideoDynamicRange": "Video Dynamic Range",
"View": "View", "View": "View",
"VisitGithubCustomFormatsAphrodite": "Visit the wiki for more details: ", "VisitGithubCustomFormatsAphrodite": "Visit the wiki for more details: ",
"Waiting": "Waiting", "Waiting": "Waiting",

@ -15,8 +15,9 @@ namespace Radarr.Api.V3.MovieFiles
public int VideoBitDepth { get; set; } public int VideoBitDepth { get; set; }
public long VideoBitrate { get; set; } public long VideoBitrate { get; set; }
public string VideoCodec { get; set; } public string VideoCodec { get; set; }
public string VideoDynamicRangeType { get; set; }
public decimal VideoFps { get; set; } public decimal VideoFps { get; set; }
public string VideoDynamicRange { get; set; }
public string VideoDynamicRangeType { get; set; }
public string Resolution { get; set; } public string Resolution { get; set; }
public string RunTime { get; set; } public string RunTime { get; set; }
public string ScanType { get; set; } public string ScanType { get; set; }
@ -42,8 +43,9 @@ namespace Radarr.Api.V3.MovieFiles
VideoBitDepth = model.VideoBitDepth, VideoBitDepth = model.VideoBitDepth,
VideoBitrate = model.VideoBitrate, VideoBitrate = model.VideoBitrate,
VideoCodec = MediaInfoFormatter.FormatVideoCodec(model, sceneName), VideoCodec = MediaInfoFormatter.FormatVideoCodec(model, sceneName),
VideoDynamicRangeType = MediaInfoFormatter.FormatVideoDynamicRangeType(model),
VideoFps = Math.Round(model.VideoFps, 3), VideoFps = Math.Round(model.VideoFps, 3),
VideoDynamicRange = MediaInfoFormatter.FormatVideoDynamicRange(model),
VideoDynamicRangeType = MediaInfoFormatter.FormatVideoDynamicRangeType(model),
Resolution = $"{model.Width}x{model.Height}", Resolution = $"{model.Width}x{model.Height}",
RunTime = FormatRuntime(model.RunTime), RunTime = FormatRuntime(model.RunTime),
ScanType = model.ScanType, ScanType = model.ScanType,

Loading…
Cancel
Save