mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
display series air time
This commit is contained in:
parent
064af8cfee
commit
6df3825ad5
2 changed files with 33 additions and 1 deletions
|
@ -126,6 +126,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="detailSectionContent" style="padding: 0 1em;">
|
<div class="detailSectionContent" style="padding: 0 1em;">
|
||||||
|
|
||||||
|
<p id="seriesAirTime"></p>
|
||||||
<p class="itemStudios"></p>
|
<p class="itemStudios"></p>
|
||||||
<p class="itemExternalLinks"></p>
|
<p class="itemExternalLinks"></p>
|
||||||
<p class="itemTags"></p>
|
<p class="itemTags"></p>
|
||||||
|
|
|
@ -230,6 +230,35 @@
|
||||||
} else {
|
} else {
|
||||||
$('#detailSection', page).show();
|
$('#detailSection', page).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderSeriesAirTime(page, item, context);
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderSeriesAirTime(page, item, context) {
|
||||||
|
|
||||||
|
if (item.Type != "Series") {
|
||||||
|
$('#seriesAirTime', page).hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var html = item.Status == 'Ended' ? 'Aired' : 'Airs';
|
||||||
|
|
||||||
|
if (item.AirDays.length) {
|
||||||
|
html += ' ' + item.AirDays.map(function(a) {
|
||||||
|
return a + "s";
|
||||||
|
|
||||||
|
}).join(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.Studios.length) {
|
||||||
|
html += ' on <a class="textlink" href="itembynamedetails.html?context=' + context + '&studio=' + ApiClient.encodeName(item.Studios[0].Name) + '">' + item.Studios[0].Name + '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.AirTime) {
|
||||||
|
html += ' at ' + item.AirTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#seriesAirTime', page).show().html(html).trigger('create');
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderTags(page, item) {
|
function renderTags(page, item) {
|
||||||
|
@ -253,10 +282,12 @@
|
||||||
|
|
||||||
function renderChildren(page, item) {
|
function renderChildren(page, item) {
|
||||||
|
|
||||||
|
var sortBy = item.Type == "Boxset" ? "ProductionYear,SortName" : "SortName";
|
||||||
|
|
||||||
ApiClient.getItems(Dashboard.getCurrentUserId(), {
|
ApiClient.getItems(Dashboard.getCurrentUserId(), {
|
||||||
|
|
||||||
ParentId: getParameterByName('id'),
|
ParentId: getParameterByName('id'),
|
||||||
SortBy: "SortName",
|
SortBy: sortBy,
|
||||||
Fields: "PrimaryImageAspectRatio,ItemCounts,DisplayMediaType,DateCreated,UserData,AudioInfo"
|
Fields: "PrimaryImageAspectRatio,ItemCounts,DisplayMediaType,DateCreated,UserData,AudioInfo"
|
||||||
|
|
||||||
}).done(function (result) {
|
}).done(function (result) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue