1
0
Fork 0
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:
Luke Pulverenti 2013-05-15 09:57:13 -04:00
parent 064af8cfee
commit 6df3825ad5
2 changed files with 33 additions and 1 deletions

View file

@ -230,6 +230,35 @@
} else {
$('#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) {
@ -253,10 +282,12 @@
function renderChildren(page, item) {
var sortBy = item.Type == "Boxset" ? "ProductionYear,SortName" : "SortName";
ApiClient.getItems(Dashboard.getCurrentUserId(), {
ParentId: getParameterByName('id'),
SortBy: "SortName",
SortBy: sortBy,
Fields: "PrimaryImageAspectRatio,ItemCounts,DisplayMediaType,DateCreated,UserData,AudioInfo"
}).done(function (result) {