feat(frontend): add studio/networks to movie/tv details

closes #370
pull/371/head
sct 4 years ago
parent 992a23222a
commit 4b6ad8a387

@ -65,6 +65,7 @@ const messages = defineMessages({
'This will remove all media data including all requests for this item. This action is irreversible. If this item exists in your Plex library, the media information will be recreated next sync.', 'This will remove all media data including all requests for this item. This action is irreversible. If this item exists in your Plex library, the media information will be recreated next sync.',
approve: 'Approve', approve: 'Approve',
decline: 'Decline', decline: 'Decline',
studio: 'Studio',
}); });
interface MovieDetailsProps { interface MovieDetailsProps {
@ -484,14 +485,32 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
</span> </span>
</div> </div>
)} )}
{data.spokenLanguages.some(
(lng) => lng.iso_639_1 === data.originalLanguage
) && (
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0"> <div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0">
<span className="text-sm"> <span className="text-sm">
<FormattedMessage {...messages.originallanguage} /> <FormattedMessage {...messages.originallanguage} />
</span> </span>
<span className="flex-1 text-right text-gray-400 text-sm"> <span className="flex-1 text-right text-gray-400 text-sm">
{data.originalLanguage} {
data.spokenLanguages.find(
(lng) => lng.iso_639_1 === data.originalLanguage
)?.name
}
</span>
</div>
)}
{data.productionCompanies[0] && (
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0">
<span className="text-sm">
<FormattedMessage {...messages.studio} />
</span>
<span className="flex-1 text-right text-gray-400 text-sm">
{data.productionCompanies[0]?.name}
</span> </span>
</div> </div>
)}
</div> </div>
</div> </div>
</div> </div>

@ -59,6 +59,7 @@ const messages = defineMessages({
decline: 'Decline', decline: 'Decline',
showtype: 'Show Type', showtype: 'Show Type',
anime: 'Anime', anime: 'Anime',
network: 'Network',
}); });
interface TvDetailsProps { interface TvDetailsProps {
@ -454,14 +455,32 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
{data.status} {data.status}
</span> </span>
</div> </div>
{data.spokenLanguages.some(
(lng) => lng.iso_639_1 === data.originalLanguage
) && (
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0"> <div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0">
<span className="text-sm"> <span className="text-sm">
<FormattedMessage {...messages.originallanguage} /> <FormattedMessage {...messages.originallanguage} />
</span> </span>
<span className="flex-1 text-right text-gray-400 text-sm"> <span className="flex-1 text-right text-gray-400 text-sm">
{data.originalLanguage} {
data.spokenLanguages.find(
(lng) => lng.iso_639_1 === data.originalLanguage
)?.name
}
</span> </span>
</div> </div>
)}
{data.networks.length > 0 && (
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0">
<span className="text-sm">
<FormattedMessage {...messages.network} />
</span>
<span className="flex-1 text-right text-gray-400 text-sm">
{data.networks.map((n) => n.name).join(', ')}
</span>
</div>
)}
</div> </div>
</div> </div>
</div> </div>

@ -43,6 +43,7 @@
"components.MovieDetails.similar": "Similar Titles", "components.MovieDetails.similar": "Similar Titles",
"components.MovieDetails.similarsubtext": "Other movies similar to {title}", "components.MovieDetails.similarsubtext": "Other movies similar to {title}",
"components.MovieDetails.status": "Status", "components.MovieDetails.status": "Status",
"components.MovieDetails.studio": "Studio",
"components.MovieDetails.unavailable": "Unavailable", "components.MovieDetails.unavailable": "Unavailable",
"components.MovieDetails.userrating": "User Rating", "components.MovieDetails.userrating": "User Rating",
"components.MovieDetails.viewrequest": "View Request", "components.MovieDetails.viewrequest": "View Request",
@ -270,6 +271,7 @@
"components.TvDetails.manageModalNoRequests": "No Requests", "components.TvDetails.manageModalNoRequests": "No Requests",
"components.TvDetails.manageModalRequests": "Requests", "components.TvDetails.manageModalRequests": "Requests",
"components.TvDetails.manageModalTitle": "Manage Series", "components.TvDetails.manageModalTitle": "Manage Series",
"components.TvDetails.network": "Network",
"components.TvDetails.originallanguage": "Original Language", "components.TvDetails.originallanguage": "Original Language",
"components.TvDetails.overview": "Overview", "components.TvDetails.overview": "Overview",
"components.TvDetails.overviewunavailable": "Overview unavailable", "components.TvDetails.overviewunavailable": "Overview unavailable",

Loading…
Cancel
Save