diff --git a/frontend/src/Album/Details/TrackRow.css b/frontend/src/Album/Details/TrackRow.css index f75ae6381..ec71ded11 100644 --- a/frontend/src/Album/Details/TrackRow.css +++ b/frontend/src/Album/Details/TrackRow.css @@ -19,7 +19,7 @@ .audio { composes: cell from '~Components/Table/Cells/TableRowCell.css'; - width: 200px; + width: 250px; } .language, diff --git a/frontend/src/TrackFile/MediaInfo.js b/frontend/src/TrackFile/MediaInfo.js index b8f186b8c..3f50fb70e 100644 --- a/frontend/src/TrackFile/MediaInfo.js +++ b/frontend/src/TrackFile/MediaInfo.js @@ -8,7 +8,8 @@ function MediaInfo(props) { audioChannels, audioCodec, audioBitRate, - videoCodec + audioBits, + audioSampleRate } = props; if (type === mediaInfoTypes.AUDIO) { @@ -38,14 +39,26 @@ function MediaInfo(props) { !!audioBitRate && audioBitRate } - - ); - } - if (type === mediaInfoTypes.VIDEO) { - return ( - - {videoCodec} + { + ((!!audioCodec && !!audioSampleRate) || (!!audioChannels && !!audioSampleRate) || (!!audioBitRate && !!audioSampleRate)) && + ' - ' + } + + { + !!audioSampleRate && + audioSampleRate + } + + { + ((!!audioCodec && !!audioBits) || (!!audioChannels && !!audioBits) || (!!audioBitRate && !!audioBits) || (!!audioSampleRate && !!audioBits)) && + ' - ' + } + + { + !!audioBits && + audioBits + } ); } @@ -58,7 +71,8 @@ MediaInfo.propTypes = { audioChannels: PropTypes.number, audioCodec: PropTypes.string, audioBitRate: PropTypes.string, - videoCodec: PropTypes.string + audioBits: PropTypes.string, + audioSampleRate: PropTypes.string }; export default MediaInfo; diff --git a/src/Lidarr.Api.V1/TrackFiles/MediaInfoResource.cs b/src/Lidarr.Api.V1/TrackFiles/MediaInfoResource.cs index 540a00a65..5ce4d42e3 100644 --- a/src/Lidarr.Api.V1/TrackFiles/MediaInfoResource.cs +++ b/src/Lidarr.Api.V1/TrackFiles/MediaInfoResource.cs @@ -9,6 +9,8 @@ namespace Lidarr.Api.V1.TrackFiles public decimal AudioChannels { get; set; } public string AudioBitRate { get; set; } public string AudioCodec { get; set; } + public string AudioBits { get; set; } + public string AudioSampleRate { get; set; } } public static class MediaInfoResourceMapper @@ -24,7 +26,9 @@ namespace Lidarr.Api.V1.TrackFiles { AudioChannels = MediaInfoFormatter.FormatAudioChannels(model), AudioCodec = MediaInfoFormatter.FormatAudioCodec(model), - AudioBitRate = MediaInfoFormatter.FormatAudioBitrate(model) + AudioBitRate = MediaInfoFormatter.FormatAudioBitrate(model), + AudioBits = MediaInfoFormatter.FormatAudioBitsPerSample(model), + AudioSampleRate = MediaInfoFormatter.FormatAudioSampleRate(model) }; } }