1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-26 22:46:53 -04:00

Fixed: Displaying audio and subtitle languages in UI

(cherry picked from commit 139412284276479921632ee5ef1dabe76c5388b4)

Rename LocalizationLanguageResource to avoid collision with LanguageResource

(cherry picked from commit d2cd3f77169887086980feac3bab1f16301d189e)
This commit is contained in:
Mark McDowall
2023-01-04 21:23:57 -08:00
committed by Bogdan
parent 933d9e074c
commit e50abd276e
7 changed files with 86 additions and 28 deletions
+5 -7
View File
@@ -1,6 +1,7 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import getLanguageName from 'Utilities/String/getLanguageName';
import * as mediaInfoTypes from './mediaInfoTypes';
function formatLanguages(languages) {
@@ -8,7 +9,7 @@ function formatLanguages(languages) {
return null;
}
const splitLanguages = _.uniq(languages.split(' / '));
const splitLanguages = _.uniq(languages.split('/')).map((l) => getLanguageName(l));
if (splitLanguages.length > 3) {
return (
@@ -39,18 +40,15 @@ function MediaInfo(props) {
return (
<span>
{
!!audioCodec &&
audioCodec
audioCodec ? audioCodec : ''
}
{
!!audioCodec && !!audioChannels &&
' - '
audioCodec && audioChannels ? ' - ' : ''
}
{
!!audioChannels &&
audioChannels.toFixed(1)
audioChannels ? audioChannels.toFixed(1) : ''
}
</span>
);