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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user