mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 07:22:35 +01:00
New: Added Mediainfo Video Dynamic Range column for episodes
Closes #4963
This commit is contained in:
parent
893a6744ac
commit
ae0e23fc8e
@ -32,7 +32,8 @@ function MediaInfo(props) {
|
||||
audioCodec,
|
||||
audioLanguages,
|
||||
subtitles,
|
||||
videoCodec
|
||||
videoCodec,
|
||||
videoDynamicRangeType
|
||||
} = props;
|
||||
|
||||
if (type === mediaInfoTypes.AUDIO) {
|
||||
@ -72,6 +73,14 @@ function MediaInfo(props) {
|
||||
);
|
||||
}
|
||||
|
||||
if (type === mediaInfoTypes.VIDEO_DYNAMIC_RANGE_TYPE) {
|
||||
return (
|
||||
<span>
|
||||
{videoDynamicRangeType}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -81,7 +90,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';
|
||||
|
@ -38,6 +38,7 @@
|
||||
}
|
||||
|
||||
.audioLanguages,
|
||||
.videoDynamicRangeType,
|
||||
.subtitles {
|
||||
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
||||
|
||||
|
@ -238,6 +238,20 @@ class EpisodeRow extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'videoDynamicRangeType') {
|
||||
return (
|
||||
<TableRowCell
|
||||
key={name}
|
||||
className={styles.videoDynamicRangeType}
|
||||
>
|
||||
<MediaInfoConnector
|
||||
type={mediaInfoTypes.VIDEO_DYNAMIC_RANGE_TYPE}
|
||||
episodeFileId={episodeFileId}
|
||||
/>
|
||||
</TableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'size') {
|
||||
return (
|
||||
<TableRowCell
|
||||
|
@ -74,6 +74,11 @@ export const defaultState = {
|
||||
label: 'Video Codec',
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'videoDynamicRangeType',
|
||||
label: 'Video Dynamic Range',
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'audioLanguages',
|
||||
label: 'Audio Languages',
|
||||
|
@ -16,6 +16,8 @@ namespace Sonarr.Api.V3.EpisodeFiles
|
||||
public int VideoBitrate { get; set; }
|
||||
public string VideoCodec { 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,6 +44,8 @@ namespace Sonarr.Api.V3.EpisodeFiles
|
||||
VideoBitrate = model.VideoBitrate,
|
||||
VideoCodec = MediaInfoFormatter.FormatVideoCodec(model, sceneName),
|
||||
VideoFps = model.VideoFps,
|
||||
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