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

Closes #10206
pull/9499/merge
Bogdan 4 months ago
parent a3b3fee06b
commit df35e78e1f

@ -85,6 +85,7 @@
margin-top: 20px; margin-top: 20px;
} }
.originalLanguage,
.studio, .studio,
.genres { .genres {
margin-left: 5px; margin-left: 5px;

@ -8,6 +8,7 @@ interface CssExports {
'genres': string; 'genres': string;
'icons': string; 'icons': string;
'links': string; 'links': string;
'originalLanguage': string;
'overlay': string; 'overlay': string;
'overview': string; 'overview': string;
'poster': string; 'poster': string;

@ -62,6 +62,7 @@ class AddNewMovieSearchResult extends Component {
titleSlug, titleSlug,
year, year,
studio, studio,
originalLanguage,
genres, genres,
status, status,
overview, overview,
@ -213,17 +214,31 @@ class AddNewMovieSearchResult extends Component {
} }
{ {
!!studio && originalLanguage?.name ?
<Label size={sizes.LARGE}> <Label size={sizes.LARGE}>
<Icon <Icon
name={icons.STUDIO} name={icons.LANGUAGE}
size={13} size={13}
/> />
<span className={styles.originalLanguage}>
{originalLanguage.name}
</span>
</Label> :
null
}
{
studio ?
<Label size={sizes.LARGE}>
<Icon
name={icons.STUDIO}
size={13}
/>
<span className={styles.studio}> <span className={styles.studio}>
{studio} {studio}
</span> </span>
</Label> </Label> :
null
} }
{ {
@ -233,7 +248,6 @@ class AddNewMovieSearchResult extends Component {
name={icons.GENRE} name={icons.GENRE}
size={13} size={13}
/> />
<span className={styles.genres}> <span className={styles.genres}>
{genres.slice(0, 3).join(', ')} {genres.slice(0, 3).join(', ')}
</span> </span>
@ -311,6 +325,7 @@ AddNewMovieSearchResult.propTypes = {
titleSlug: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired,
year: PropTypes.number.isRequired, year: PropTypes.number.isRequired,
studio: PropTypes.string, studio: PropTypes.string,
originalLanguage: PropTypes.object,
genres: PropTypes.arrayOf(PropTypes.string), genres: PropTypes.arrayOf(PropTypes.string),
status: PropTypes.string.isRequired, status: PropTypes.string.isRequired,
overview: PropTypes.string, overview: PropTypes.string,

@ -179,6 +179,7 @@ export const IN_CINEMAS = fasTicketAlt;
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;

@ -151,6 +151,7 @@
.sizeOnDisk, .sizeOnDisk,
.qualityProfileName, .qualityProfileName,
.statusName, .statusName,
.originalLanguage,
.studio, .studio,
.collection, .collection,
.genres { .genres {

@ -21,6 +21,7 @@ interface CssExports {
'monitorToggleButton': string; 'monitorToggleButton': string;
'movieNavigationButton': string; 'movieNavigationButton': string;
'movieNavigationButtons': string; 'movieNavigationButtons': string;
'originalLanguage': string;
'overview': string; 'overview': string;
'path': string; 'path': string;
'poster': string; 'poster': string;

@ -242,6 +242,7 @@ class MovieDetails extends Component {
qualityProfileId, qualityProfileId,
monitored, monitored,
studio, studio,
originalLanguage,
genres, genres,
collection, collection,
overview, overview,
@ -574,7 +575,7 @@ class MovieDetails extends Component {
</InfoLabel> </InfoLabel>
{ {
!!collection && collection ?
<InfoLabel <InfoLabel
className={styles.detailsInfoLabel} className={styles.detailsInfoLabel}
title={translate('Collection')} title={translate('Collection')}
@ -585,11 +586,26 @@ class MovieDetails extends Component {
tmdbId={collection.tmdbId} tmdbId={collection.tmdbId}
/> />
</div> </div>
</InfoLabel> </InfoLabel> :
null
} }
{ {
!!studio && !isSmallScreen && originalLanguage?.name && !isSmallScreen ?
<InfoLabel
className={styles.detailsInfoLabel}
title={translate('OriginalLanguage')}
size={sizes.LARGE}
>
<span className={styles.originalLanguage}>
{originalLanguage.name}
</span>
</InfoLabel> :
null
}
{
studio && !isSmallScreen ?
<InfoLabel <InfoLabel
className={styles.detailsInfoLabel} className={styles.detailsInfoLabel}
title={translate('Studio')} title={translate('Studio')}
@ -598,11 +614,12 @@ class MovieDetails extends Component {
<span className={styles.studio}> <span className={styles.studio}>
{studio} {studio}
</span> </span>
</InfoLabel> </InfoLabel> :
null
} }
{ {
!!genres.length && !isSmallScreen && genres.length && !isSmallScreen ?
<InfoLabel <InfoLabel
className={styles.detailsInfoLabel} className={styles.detailsInfoLabel}
title={translate('Genres')} title={translate('Genres')}
@ -611,7 +628,8 @@ class MovieDetails extends Component {
<span className={styles.genres}> <span className={styles.genres}>
{genres.join(', ')} {genres.join(', ')}
</span> </span>
</InfoLabel> </InfoLabel> :
null
} }
</div> </div>
@ -745,6 +763,7 @@ MovieDetails.propTypes = {
monitored: PropTypes.bool.isRequired, monitored: PropTypes.bool.isRequired,
status: PropTypes.string.isRequired, status: PropTypes.string.isRequired,
studio: PropTypes.string, studio: PropTypes.string,
originalLanguage: PropTypes.object,
genres: PropTypes.arrayOf(PropTypes.string).isRequired, genres: PropTypes.arrayOf(PropTypes.string).isRequired,
collection: PropTypes.object, collection: PropTypes.object,
youTubeTrailerId: PropTypes.string, youTubeTrailerId: PropTypes.string,

Loading…
Cancel
Save