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

update series recording editor

This commit is contained in:
Luke Pulverenti 2016-09-30 14:43:59 -04:00
parent faeb1c6d22
commit 711b0541fa
50 changed files with 285 additions and 213 deletions

View file

@ -784,24 +784,21 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
}
}
if (options.showChannelName) {
lines.push(item.ChannelName || '');
}
if (options.showAirTime) {
var airTimeText;
var airTimeText = '';
if (item.StartDate) {
try {
var date = datetime.parseISO8601Date(item.StartDate);
airTimeText = datetime.toLocaleDateString(date, { weekday: 'short', month: 'short', day: 'numeric' });
if (options.showAirDateTime) {
airTimeText += datetime.toLocaleDateString(date, { weekday: 'short', month: 'short', day: 'numeric' }) + ' ';
}
airTimeText += ' ' + datetime.getDisplayTime(date);
airTimeText += datetime.getDisplayTime(date);
if (item.EndDate) {
if (item.EndDate && options.showAirEndTime) {
date = datetime.parseISO8601Date(item.EndDate);
airTimeText += ' - ' + datetime.getDisplayTime(date);
}
@ -814,38 +811,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
lines.push(airTimeText || '');
}
if (options.showCurrentProgram && item.Type == 'TvChannel') {
if (item.CurrentProgram) {
lines.push(item.CurrentProgram.Name);
} else {
lines.push('');
}
}
if (options.showSeriesYear) {
if (item.Status == "Continuing") {
lines.push(globalize.translate('sharedcomponents#SeriesYearToPresent', item.ProductionYear || ''));
} else {
lines.push(item.ProductionYear || '');
}
}
if (options.showProgramAirInfo) {
var text;
if (item.StartDate) {
var startDate = datetime.parseISO8601Date(item.StartDate, true);
text = datetime.toLocaleDateString(startDate, { weekday: 'short', month: 'short', day: 'numeric' }) + ' ' + datetime.getDisplayTime(startDate);
} else {
text = '';
}
lines.push(text || ' ');
if (options.showChannelName) {
if (item.ChannelId) {
@ -875,6 +841,27 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
lines.push(item.ChannelName || ' ');
}
}
if (options.showCurrentProgram && item.Type == 'TvChannel') {
if (item.CurrentProgram) {
lines.push(item.CurrentProgram.Name);
} else {
lines.push('');
}
}
if (options.showSeriesYear) {
if (item.Status == "Continuing") {
lines.push(globalize.translate('sharedcomponents#SeriesYearToPresent', item.ProductionYear || ''));
} else {
lines.push(item.ProductionYear || '');
}
}
}
if ((showTitle || !imgUrl) && forceName && overlayText && lines.length == 1) {
@ -1048,7 +1035,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
if (options.coverImage || imgInfo.coverImage) {
cardImageContainerClass += ' coveredImage';
if (item.MediaType == 'Photo' || item.Type == 'PhotoAlbum' || item.Type == 'Folder' || item.Type == 'Program') {
if (item.MediaType == 'Photo' || item.Type == 'PhotoAlbum' || item.Type == 'Folder' || item.ProgramInfo || item.Type == 'Program') {
cardImageContainerClass += ' coveredImage-noScale';
}
}
@ -1422,7 +1409,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
}
function onTimerCreated(programId, newTimerId, itemsContainer) {
var cells = itemsContainer.querySelectorAll('.card[data-id="' + programId + '"]');
for (var i = 0, length = cells.length; i < length; i++) {