1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #4196 from mark5231/master

Show production studio
This commit is contained in:
Bill Thornton 2023-02-07 13:24:39 -05:00 committed by GitHub
commit 44edc3d520
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View file

@ -143,6 +143,11 @@
<div class="writersLabel label"></div>
<div class="writers content focuscontainer-x"></div>
</div>
<div class="detailsGroupItem studiosGroup hide">
<div class="studiosLabel label"></div>
<div class="studios content focuscontainer-x"></div>
</div>
</div>
</div>
</div>

View file

@ -1031,6 +1031,29 @@ function renderDirector(page, item, context) {
}
}
function renderStudio(page, item, context) {
const studios = item.Studios || [];
const html = studios.map(function (studio) {
return '<a style="color:inherit;" class="button-link" is="emby-linkbutton" href="' + appRouter.getRouteUrl({
Name: studio.Name,
Type: 'Studio',
ServerId: item.ServerId,
Id: studio.Id
}, {
context: context
}) + '">' + escapeHtml(studio.Name) + '</a>';
}).join(', ');
const studiosLabel = page.querySelector('.studiosLabel');
studiosLabel.innerText = globalize.translate(studios.length > 1 ? 'Studios' : 'Studio');
const studiosValue = page.querySelector('.studios');
studiosValue.innerHTML = html;
const studiosGroup = page.querySelector('.studiosGroup');
studiosGroup.classList.toggle('hide', !studios.length);
}
function renderMiscInfo(page, item) {
const primaryItemMiscInfo = page.querySelectorAll('.itemMiscInfo-primary');
@ -1079,6 +1102,7 @@ function renderDetails(page, item, apiClient, context, isStatic) {
renderMoreFromSeason(page, item, apiClient);
renderMoreFromArtist(page, item, apiClient);
renderDirector(page, item, context);
renderStudio(page, item, context);
renderWriter(page, item, context);
renderGenres(page, item, context);
renderChannelGuide(page, apiClient, item);