New: Display original language on series details and search results page

Closes #6984
This commit is contained in:
Bogdan 2024-07-25 07:31:29 +03:00 committed by GitHub
parent 2a26c6722a
commit fbda2d54c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 62 additions and 11 deletions

View File

@ -69,6 +69,11 @@
height: 55px; height: 55px;
} }
.originalLanguageName,
.network {
margin-left: 8px;
}
.tvdbLink { .tvdbLink {
composes: link from '~Components/Link/Link.css'; composes: link from '~Components/Link/Link.css';

View File

@ -4,6 +4,8 @@ interface CssExports {
'alreadyExistsIcon': string; 'alreadyExistsIcon': string;
'content': string; 'content': string;
'icons': string; 'icons': string;
'network': string;
'originalLanguageName': string;
'overlay': string; 'overlay': string;
'overview': string; 'overview': string;
'poster': string; 'poster': string;

View File

@ -55,6 +55,7 @@ class AddNewSeriesSearchResult extends Component {
titleSlug, titleSlug,
year, year,
network, network,
originalLanguage,
status, status,
overview, overview,
statistics, statistics,
@ -150,10 +151,32 @@ class AddNewSeriesSearchResult extends Component {
/> />
</Label> </Label>
{
originalLanguage?.name ?
<Label size={sizes.LARGE}>
<Icon
name={icons.LANGUAGE}
size={13}
/>
<span className={styles.originalLanguageName}>
{originalLanguage.name}
</span>
</Label> :
null
}
{ {
network ? network ?
<Label size={sizes.LARGE}> <Label size={sizes.LARGE}>
<Icon
name={icons.NETWORK}
size={13}
/>
<span className={styles.network}>
{network} {network}
</span>
</Label> : </Label> :
null null
} }
@ -219,6 +242,7 @@ AddNewSeriesSearchResult.propTypes = {
titleSlug: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired,
year: PropTypes.number.isRequired, year: PropTypes.number.isRequired,
network: PropTypes.string, network: PropTypes.string,
originalLanguage: PropTypes.object,
status: PropTypes.string.isRequired, status: PropTypes.string.isRequired,
overview: PropTypes.string, overview: PropTypes.string,
statistics: PropTypes.object.isRequired, statistics: PropTypes.object.isRequired,

View File

@ -69,6 +69,7 @@ import {
faHistory as fasHistory, faHistory as fasHistory,
faHome as fasHome, faHome as fasHome,
faInfoCircle as fasInfoCircle, faInfoCircle as fasInfoCircle,
faLanguage as fasLanguage,
faLaptop as fasLaptop, faLaptop as fasLaptop,
faLevelUpAlt as fasLevelUpAlt, faLevelUpAlt as fasLevelUpAlt,
faListCheck as fasListCheck, faListCheck as fasListCheck,
@ -168,6 +169,7 @@ export const IGNORE = fasTimesCircle;
export const INFO = fasInfoCircle; export const INFO = fasInfoCircle;
export const INTERACTIVE = fasUser; export const INTERACTIVE = fasUser;
export const KEYBOARD = farKeyboard; export const KEYBOARD = farKeyboard;
export const LANGUAGE = fasLanguage;
export const LOGOUT = fasSignOutAlt; export const LOGOUT = fasSignOutAlt;
export const MANAGE = fasListCheck; export const MANAGE = fasListCheck;
export const MEDIA_INFO = farFileInvoice; export const MEDIA_INFO = farFileInvoice;

View File

@ -129,6 +129,7 @@
.path, .path,
.sizeOnDisk, .sizeOnDisk,
.qualityProfileName, .qualityProfileName,
.originalLanguageName,
.network, .network,
.links, .links,
.tags { .tags {

View File

@ -15,6 +15,7 @@ interface CssExports {
'links': string; 'links': string;
'monitorToggleButton': string; 'monitorToggleButton': string;
'network': string; 'network': string;
'originalLanguageName': string;
'overview': string; 'overview': string;
'path': string; 'path': string;
'poster': string; 'poster': string;

View File

@ -185,6 +185,7 @@ class SeriesDetails extends Component {
monitored, monitored,
status, status,
network, network,
originalLanguage,
overview, overview,
images, images,
seasons, seasons,
@ -431,7 +432,6 @@ class SeriesDetails extends Component {
className={styles.detailsLabel} className={styles.detailsLabel}
size={sizes.LARGE} size={sizes.LARGE}
> >
<div> <div>
<Icon <Icon
name={icons.FOLDER} name={icons.FOLDER}
@ -449,7 +449,6 @@ class SeriesDetails extends Component {
className={styles.detailsLabel} className={styles.detailsLabel}
size={sizes.LARGE} size={sizes.LARGE}
> >
<div> <div>
<Icon <Icon
name={icons.DRIVE} name={icons.DRIVE}
@ -477,7 +476,6 @@ class SeriesDetails extends Component {
title={translate('QualityProfile')} title={translate('QualityProfile')}
size={sizes.LARGE} size={sizes.LARGE}
> >
<div> <div>
<Icon <Icon
name={icons.PROFILE} name={icons.PROFILE}
@ -497,7 +495,6 @@ class SeriesDetails extends Component {
className={styles.detailsLabel} className={styles.detailsLabel}
size={sizes.LARGE} size={sizes.LARGE}
> >
<div> <div>
<Icon <Icon
name={monitored ? icons.MONITORED : icons.UNMONITORED} name={monitored ? icons.MONITORED : icons.UNMONITORED}
@ -514,7 +511,6 @@ class SeriesDetails extends Component {
title={statusDetails.message} title={statusDetails.message}
size={sizes.LARGE} size={sizes.LARGE}
> >
<div> <div>
<Icon <Icon
name={statusDetails.icon} name={statusDetails.icon}
@ -527,23 +523,43 @@ class SeriesDetails extends Component {
</Label> </Label>
{ {
!!network && originalLanguage?.name ?
<Label
className={styles.detailsLabel}
title={translate('OriginalLanguage')}
size={sizes.LARGE}
>
<div>
<Icon
name={icons.LANGUAGE}
size={17}
/>
<span className={styles.originalLanguageName}>
{originalLanguage.name}
</span>
</div>
</Label> :
null
}
{
network ?
<Label <Label
className={styles.detailsLabel} className={styles.detailsLabel}
title={translate('Network')} title={translate('Network')}
size={sizes.LARGE} size={sizes.LARGE}
> >
<div> <div>
<Icon <Icon
name={icons.NETWORK} name={icons.NETWORK}
size={17} size={17}
/> />
<span className={styles.qualityProfileName}> <span className={styles.network}>
{network} {network}
</span> </span>
</div> </div>
</Label> </Label> :
null
} }
<Tooltip <Tooltip
@ -552,7 +568,6 @@ class SeriesDetails extends Component {
className={styles.detailsLabel} className={styles.detailsLabel}
size={sizes.LARGE} size={sizes.LARGE}
> >
<div> <div>
<Icon <Icon
name={icons.EXTERNAL_LINK} name={icons.EXTERNAL_LINK}
@ -734,6 +749,7 @@ SeriesDetails.propTypes = {
monitor: PropTypes.string, monitor: PropTypes.string,
status: PropTypes.string.isRequired, status: PropTypes.string.isRequired,
network: PropTypes.string, network: PropTypes.string,
originalLanguage: PropTypes.object,
overview: PropTypes.string.isRequired, overview: PropTypes.string.isRequired,
images: PropTypes.arrayOf(PropTypes.object).isRequired, images: PropTypes.arrayOf(PropTypes.object).isRequired,
seasons: PropTypes.arrayOf(PropTypes.object).isRequired, seasons: PropTypes.arrayOf(PropTypes.object).isRequired,