mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
redesign series timer edit screen
This commit is contained in:
parent
67bfc785cb
commit
5e5ac0e975
8 changed files with 273 additions and 235 deletions
|
@ -138,7 +138,23 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', '
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.StartDate && item.Type !== 'Program') {
|
if (item.Type === 'SeriesTimer') {
|
||||||
|
if (item.RecordAnyTime) {
|
||||||
|
|
||||||
|
miscInfo.push(globalize.translate('sharedcomponents#Anytime'));
|
||||||
|
} else {
|
||||||
|
miscInfo.push(datetime.getDisplayTime(item.StartDate));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.RecordAnyChannel) {
|
||||||
|
miscInfo.push(globalize.translate('sharedcomponents#AllChannels'));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
miscInfo.push(item.ChannelName || globalize.translate('sharedcomponents#OneChannel'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.StartDate && item.Type !== 'Program' && item.Type !== 'SeriesTimer') {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
date = datetime.parseISO8601Date(item.StartDate);
|
date = datetime.parseISO8601Date(item.StartDate);
|
||||||
|
|
|
@ -98,15 +98,24 @@
|
||||||
|
|
||||||
function reload(context, id) {
|
function reload(context, id) {
|
||||||
|
|
||||||
loading.show();
|
|
||||||
currentItemId = id;
|
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(currentServerId);
|
var apiClient = connectionManager.getApiClient(currentServerId);
|
||||||
apiClient.getLiveTvSeriesTimer(id).then(function (result) {
|
|
||||||
|
|
||||||
renderTimer(context, result, apiClient);
|
loading.show();
|
||||||
|
if (typeof id === 'string') {
|
||||||
|
currentItemId = id;
|
||||||
|
|
||||||
|
apiClient.getLiveTvSeriesTimer(id).then(function (result) {
|
||||||
|
|
||||||
|
renderTimer(context, result, apiClient);
|
||||||
|
loading.hide();
|
||||||
|
});
|
||||||
|
} else if (id) {
|
||||||
|
|
||||||
|
currentItemId = id.Id;
|
||||||
|
|
||||||
|
renderTimer(context, id, apiClient);
|
||||||
loading.hide();
|
loading.hide();
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillKeepUpTo(context) {
|
function fillKeepUpTo(context) {
|
||||||
|
@ -130,6 +139,10 @@
|
||||||
|
|
||||||
context.querySelector('.selectKeepUpTo').innerHTML = html;
|
context.querySelector('.selectKeepUpTo').innerHTML = html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onFieldChange(e) {
|
||||||
|
this.querySelector('.btnSubmit').click();
|
||||||
|
}
|
||||||
|
|
||||||
function embed(itemId, serverId, options) {
|
function embed(itemId, serverId, options) {
|
||||||
|
|
||||||
|
@ -163,9 +176,8 @@
|
||||||
dlg.querySelector('.dialogContentInner').className = '';
|
dlg.querySelector('.dialogContentInner').className = '';
|
||||||
dlg.classList.remove('hide');
|
dlg.classList.remove('hide');
|
||||||
|
|
||||||
dlg.addEventListener('change', function () {
|
dlg.removeEventListener('change', onFieldChange);
|
||||||
dlg.querySelector('.btnSubmit').click();
|
dlg.addEventListener('change', onFieldChange);
|
||||||
});
|
|
||||||
|
|
||||||
currentDialog = dlg;
|
currentDialog = dlg;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="formDialogContent smoothScrollY">
|
<div class="formDialogContent smoothScrollY">
|
||||||
<div class="dialogContentInner dialog-content-centered" style="padding-top:2em;">
|
<div class="dialogContentInner dialog-content-centered" style="padding-top:2em;">
|
||||||
|
|
||||||
<form>
|
<form style="max-width: none;">
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
<select is="emby-select" class="selectShowType" label="${LabelRecord}">
|
<select is="emby-select" class="selectShowType" label="${LabelRecord}">
|
||||||
<option value="new">${NewEpisodesOnly}</option>
|
<option value="new">${NewEpisodesOnly}</option>
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" is="emby-checkbox" class="chkSkipEpisodesInLibrary"/>
|
<input type="checkbox" is="emby-checkbox" class="chkSkipEpisodesInLibrary" />
|
||||||
<span>${SkipEpisodesAlreadyInMyLibrary}</span>
|
<span>${SkipEpisodesAlreadyInMyLibrary}</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="fieldDescription checkboxFieldDescription">${SkipEpisodesAlreadyInMyLibraryHelp}</div>
|
<div class="fieldDescription checkboxFieldDescription">${SkipEpisodesAlreadyInMyLibraryHelp}</div>
|
||||||
|
@ -39,8 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
<select is="emby-select" class="selectKeepUpTo" label="${LabelKeepUpTo}">
|
<select is="emby-select" class="selectKeepUpTo" label="${LabelKeepUpTo}"></select>
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
|
|
|
@ -26,17 +26,15 @@
|
||||||
|
|
||||||
<div class="detailSection" style="margin-bottom: 0;">
|
<div class="detailSection" style="margin-bottom: 0;">
|
||||||
|
|
||||||
<div>
|
<h1 class="parentName" style="margin: .25em 0;"></h1>
|
||||||
<h1 class="parentName" style="margin: .25em 0;"></h1>
|
<h1 class="itemName" style="margin: .5em 0;"></h1>
|
||||||
<h1 class="itemName" style="margin: .5em 0;"></h1>
|
|
||||||
|
|
||||||
<div class="itemMiscInfo itemMiscInfo-primary" style="margin: 1em 0;">
|
<div class="itemMiscInfo itemMiscInfo-primary" style="margin: 1em 0;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="itemMiscInfo itemMiscInfo-secondary" style="margin: 1em 0;">
|
<div class="itemMiscInfo itemMiscInfo-secondary" style="margin: 1em 0;">
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mainDetailButtons">
|
<div class="mainDetailButtons">
|
||||||
|
@ -48,6 +46,10 @@
|
||||||
<i class="md-icon">videocam</i>
|
<i class="md-icon">videocam</i>
|
||||||
<span>${ButtonTrailer}</span>
|
<span>${ButtonTrailer}</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button is="emby-button" type="button" class="raised subdued btnCancelSeriesTimer hide">
|
||||||
|
<i class="md-icon">cancel</i>
|
||||||
|
<span>${ButtonCancelSeries}</span>
|
||||||
|
</button>
|
||||||
<button is="emby-button" type="button" class="raised subdued btnMoreCommands hide notext">
|
<button is="emby-button" type="button" class="raised subdued btnMoreCommands hide notext">
|
||||||
|
|
||||||
<i class="md-icon">more_vert</i>
|
<i class="md-icon">more_vert</i>
|
||||||
|
@ -60,7 +62,7 @@
|
||||||
<div class="syncLocalContainer hide" style="margin: 1em 0;">
|
<div class="syncLocalContainer hide" style="margin: 1em 0;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="recordingFields hide" style="margin: .5em 0 1.5em;">
|
<div class="recordingFields hide" style="margin: .5em 0 1.5em;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -79,123 +81,132 @@
|
||||||
<p class="itemExternalLinks"></p>
|
<p class="itemExternalLinks"></p>
|
||||||
<p class="itemStudios"></p>
|
<p class="itemStudios"></p>
|
||||||
<p class="itemTags"></p>
|
<p class="itemTags"></p>
|
||||||
|
|
||||||
|
<div class="seriesRecordingEditor">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="seriesTimerScheduleSection detailSection hide" style="margin-top:-3em;">
|
||||||
<div class="collectionItems"></div>
|
<h1>
|
||||||
<div class="nextUpSection detailSection hide">
|
${HeaderSchedule}
|
||||||
<h1>
|
</h1>
|
||||||
${HeaderNextUp}
|
<div class="seriesTimerSchedule">
|
||||||
</h1>
|
|
||||||
<div is="emby-itemscontainer" class="nextUpItems vertical-wrap"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="childrenCollapsible" class="hide detailSection">
|
</div>
|
||||||
<h1 class="childrenSectionHeader">
|
<div class="collectionItems"></div>
|
||||||
<span id="childrenTitle"></span>
|
<div class="nextUpSection detailSection hide">
|
||||||
</h1>
|
<h1>
|
||||||
<div id="childrenContent">
|
${HeaderNextUp}
|
||||||
<div is="emby-itemscontainer" class="childrenItemsContainer itemsContainer" style="text-align: left;"></div>
|
</h1>
|
||||||
</div>
|
<div is="emby-itemscontainer" class="nextUpItems vertical-wrap"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="additionalPartsCollapsible" class="detailSection hide">
|
<div id="childrenCollapsible" class="hide detailSection">
|
||||||
<h1>
|
<h1 class="childrenSectionHeader">
|
||||||
${HeaderAdditionalParts}
|
<span id="childrenTitle"></span>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="additionalPartsContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap"></div>
|
<div id="childrenContent">
|
||||||
</div>
|
<div is="emby-itemscontainer" class="childrenItemsContainer itemsContainer" style="text-align: left;"></div>
|
||||||
<div id="castCollapsible" class="detailSection hide">
|
|
||||||
<h1 id="peopleHeader">
|
|
||||||
${HeaderCastCrew}
|
|
||||||
</h1>
|
|
||||||
<div id="castContent" is="emby-itemscontainer" class="itemsContainer"></div>
|
|
||||||
<button is="emby-button" type="button" class="raised more morePeople hide">${ButtonMore}</button>
|
|
||||||
</div>
|
|
||||||
<div id="seriesScheduleSection" class="detailSection hide">
|
|
||||||
<h1>
|
|
||||||
${HeaderUpcomingOnTV}
|
|
||||||
</h1>
|
|
||||||
<div id="seriesScheduleList" is="emby-itemscontainer" class="itemsContainer vertical-list"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="additionalPartsCollapsible" class="detailSection hide">
|
||||||
|
<h1>
|
||||||
|
${HeaderAdditionalParts}
|
||||||
|
</h1>
|
||||||
|
<div id="additionalPartsContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap"></div>
|
||||||
|
</div>
|
||||||
|
<div id="castCollapsible" class="detailSection hide">
|
||||||
|
<h1 id="peopleHeader">
|
||||||
|
${HeaderCastCrew}
|
||||||
|
</h1>
|
||||||
|
<div id="castContent" is="emby-itemscontainer" class="itemsContainer"></div>
|
||||||
|
<button is="emby-button" type="button" class="raised more morePeople hide">${ButtonMore}</button>
|
||||||
|
</div>
|
||||||
|
<div id="seriesScheduleSection" class="detailSection hide">
|
||||||
|
<h1>
|
||||||
|
${HeaderUpcomingOnTV}
|
||||||
|
</h1>
|
||||||
|
<div id="seriesScheduleList" is="emby-itemscontainer" class="itemsContainer vertical-list"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="detailSection photoInfo hide">
|
<div class="detailSection photoInfo hide">
|
||||||
<h1>
|
<h1>
|
||||||
${HeaderPhotoInfo}
|
${HeaderPhotoInfo}
|
||||||
</h1>
|
</h1>
|
||||||
<div>
|
<div>
|
||||||
<div class="photoInfoContent"></div>
|
<div class="photoInfoContent"></div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="specialsCollapsible" class="detailSection hide">
|
<div id="specialsCollapsible" class="detailSection hide">
|
||||||
<h1>
|
<h1>
|
||||||
${HeaderSpecialFeatures}
|
${HeaderSpecialFeatures}
|
||||||
</h1>
|
</h1>
|
||||||
<div id="specialsContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap"></div>
|
<div id="specialsContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="musicVideosCollapsible" class="detailSection hide">
|
<div id="musicVideosCollapsible" class="detailSection hide">
|
||||||
<h1>
|
<h1>
|
||||||
${HeaderMusicVideos}
|
${HeaderMusicVideos}
|
||||||
</h1>
|
</h1>
|
||||||
<div id="musicVideosContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap"></div>
|
<div id="musicVideosContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="moreFromSection" class="detailSection hide">
|
<div id="moreFromSection" class="detailSection hide">
|
||||||
<h1 class="moreFromHeader"></h1>
|
<h1 class="moreFromHeader"></h1>
|
||||||
<div id="moreFromItems"></div>
|
<div id="moreFromItems"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="similarCollapsible" class="detailSection hide">
|
<div id="similarCollapsible" class="detailSection hide">
|
||||||
<h1>${HeaderMoreLikeThis}</h1>
|
<h1>${HeaderMoreLikeThis}</h1>
|
||||||
<div class="similarContent"></div>
|
<div class="similarContent"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="criticReviewsCollapsible" class="detailSection hide">
|
<div id="criticReviewsCollapsible" class="detailSection hide">
|
||||||
<h1>
|
<h1>
|
||||||
${HeaderAwardsAndReviews}
|
${HeaderAwardsAndReviews}
|
||||||
</h1>
|
</h1>
|
||||||
<div>
|
<div>
|
||||||
<p id="awardSummary"></p>
|
<p id="awardSummary"></p>
|
||||||
<div class="paperList" id="criticRatingSummary">
|
<div class="paperList" id="criticRatingSummary">
|
||||||
<div class="listItem">
|
<div class="listItem">
|
||||||
<button is="emby-button" type="button" class="mini fab" style="flex-shrink: 0; width: 40px; height: 40px; background-color: transparent; background-repeat: no-repeat; background-position: center center; background-size: cover; background-image: url(css/images/fresh.png);"></button>
|
<button is="emby-button" type="button" class="mini fab" style="flex-shrink: 0; width: 40px; height: 40px; background-color: transparent; background-repeat: no-repeat; background-position: center center; background-size: cover; background-image: url(css/images/fresh.png);"></button>
|
||||||
<div class="listItemBody three-line">
|
<div class="listItemBody three-line">
|
||||||
<h3 class="listItemBodyText">TOMATOMETER®</h3>
|
<h3 class="listItemBodyText">TOMATOMETER®</h3>
|
||||||
<div class="listItemBodyText criticRatingScore"></div>
|
<div class="listItemBodyText criticRatingScore"></div>
|
||||||
<div class="listItemBodyText criticRatingSummaryText secondary" style="white-space: normal;"></div>
|
<div class="listItemBodyText criticRatingSummaryText secondary" style="white-space: normal;"></div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="criticReviewsContent"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div id="criticReviewsContent"></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="scenesCollapsible" class="detailSection hide">
|
<div id="scenesCollapsible" class="detailSection hide">
|
||||||
<h1>
|
<h1>
|
||||||
${HeaderScenes}
|
${HeaderScenes}
|
||||||
</h1>
|
</h1>
|
||||||
<div is="emby-itemscontainer" id="scenesContent" class="itemsContainer"></div>
|
<div is="emby-itemscontainer" id="scenesContent" class="itemsContainer"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="themeSongsCollapsible" class="detailSection hide">
|
<div id="themeSongsCollapsible" class="detailSection hide">
|
||||||
<h1>
|
<h1>
|
||||||
${HeaderThemeSongs}
|
${HeaderThemeSongs}
|
||||||
</h1>
|
</h1>
|
||||||
<div id="themeSongsContent" is="emby-itemscontainer"></div>
|
<div id="themeSongsContent" is="emby-itemscontainer"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="themeVideosCollapsible" class="detailSection hide">
|
<div id="themeVideosCollapsible" class="detailSection hide">
|
||||||
<h1>
|
<h1>
|
||||||
${HeaderThemeVideos}
|
${HeaderThemeVideos}
|
||||||
</h1>
|
</h1>
|
||||||
<div id="themeVideosContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap"></div>
|
<div id="themeVideosContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detailSection audioVideoMediaInfo hide">
|
<div class="detailSection audioVideoMediaInfo hide">
|
||||||
<h1>${HeaderMediaInfo}</h1>
|
<h1>${HeaderMediaInfo}</h1>
|
||||||
<div>
|
<div>
|
||||||
<div class="splitVersionContainer" style="border-bottom: 1px solid #444; padding: 1em 0;">
|
<div class="splitVersionContainer" style="border-bottom: 1px solid #444; padding: 1em 0;">
|
||||||
<button is="emby-button" type="button" class="raised btnSplitVersions subdued">${ButtonSplitVersionsApart}</button>
|
<button is="emby-button" type="button" class="raised btnSplitVersions subdued">${ButtonSplitVersionsApart}</button>
|
||||||
</div>
|
|
||||||
<div id="mediaInfoContent" class="mediaInfoContent"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div id="mediaInfoContent" class="mediaInfoContent"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
<div id="liveTvSeriesTimerPage" data-role="page" class="page libraryPage liveTvPage noSecondaryNavPage" data-title="${HeaderLiveTv}" data-backbutton="true">
|
|
||||||
|
|
||||||
<style>
|
|
||||||
@media all and (min-width: 800px) {
|
|
||||||
|
|
||||||
.seriesTimerSchedule .backdropCard {
|
|
||||||
width: 33.333333333333333333333333333333%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<div data-role="content">
|
|
||||||
|
|
||||||
<div style="margin:auto; max-width: 700px;">
|
|
||||||
<div>
|
|
||||||
<h1 class="itemName"></h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="recordingEditor">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h1 style="margin-top:0;">${HeaderSchedule}</h1>
|
|
||||||
<div class="scheduleTab seriesTimerSchedule">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
|
@ -9,6 +9,10 @@
|
||||||
return ApiClient.getItem(Dashboard.getCurrentUserId(), id);
|
return ApiClient.getItem(Dashboard.getCurrentUserId(), id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params.seriesTimerId) {
|
||||||
|
return ApiClient.getLiveTvSeriesTimer(params.seriesTimerId);
|
||||||
|
}
|
||||||
|
|
||||||
var name = params.genre;
|
var name = params.genre;
|
||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
|
@ -108,6 +112,79 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getProgramScheduleHtml(items, options) {
|
||||||
|
|
||||||
|
options = options || {};
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
html += '<div is="emby-itemscontainer" class="itemsContainer vertical-list" data-contextmenu="false">';
|
||||||
|
html += listView.getListViewHtml({
|
||||||
|
items: items,
|
||||||
|
enableUserDataButtons: false,
|
||||||
|
image: false,
|
||||||
|
showProgramDateTime: true,
|
||||||
|
mediaInfo: false,
|
||||||
|
action: 'none',
|
||||||
|
moreButton: false,
|
||||||
|
recordButton: false
|
||||||
|
});
|
||||||
|
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderSeriesTimerSchedule(page, seriesTimerId) {
|
||||||
|
|
||||||
|
ApiClient.getLiveTvTimers({
|
||||||
|
UserId: ApiClient.getCurrentUserId(),
|
||||||
|
ImageTypeLimit: 1,
|
||||||
|
EnableImageTypes: "Primary,Backdrop,Thumb",
|
||||||
|
SortBy: "StartDate",
|
||||||
|
EnableTotalRecordCount: false,
|
||||||
|
EnableUserData: false,
|
||||||
|
SeriesTimerId: seriesTimerId,
|
||||||
|
Fields: "ChannelInfo"
|
||||||
|
|
||||||
|
}).then(function (result) {
|
||||||
|
|
||||||
|
if (result.Items.length && result.Items[0].SeriesTimerId != seriesTimerId) {
|
||||||
|
result.Items = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
var html = getProgramScheduleHtml(result.Items);
|
||||||
|
|
||||||
|
var scheduleTab = page.querySelector('.seriesTimerSchedule');
|
||||||
|
scheduleTab.innerHTML = html;
|
||||||
|
|
||||||
|
imageLoader.lazyChildren(scheduleTab);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderSeriesTimerEditor(page, item, user) {
|
||||||
|
|
||||||
|
if (item.Type !== 'SeriesTimer') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!user.Policy.EnableLiveTvManagement) {
|
||||||
|
page.querySelector('.seriesTimerScheduleSection').classList.add('hide');
|
||||||
|
page.querySelector('.btnCancelSeriesTimer').classList.add('hide');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
require(['seriesRecordingEditor'], function (seriesRecordingEditor) {
|
||||||
|
seriesRecordingEditor.embed(item, ApiClient.serverId(), {
|
||||||
|
context: page.querySelector('.seriesRecordingEditor')
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
page.querySelector('.seriesTimerScheduleSection').classList.remove('hide');
|
||||||
|
page.querySelector('.btnCancelSeriesTimer').classList.remove('hide');
|
||||||
|
|
||||||
|
renderSeriesTimerSchedule(page, item.Id);
|
||||||
|
}
|
||||||
|
|
||||||
function reloadFromItem(page, params, item) {
|
function reloadFromItem(page, params, item) {
|
||||||
|
|
||||||
currentItem = item;
|
currentItem = item;
|
||||||
|
@ -122,6 +199,8 @@
|
||||||
|
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
|
|
||||||
|
renderSeriesTimerEditor(page, item, user);
|
||||||
|
|
||||||
renderImage(page, item, user);
|
renderImage(page, item, user);
|
||||||
renderLogo(page, item, ApiClient);
|
renderLogo(page, item, ApiClient);
|
||||||
|
|
||||||
|
@ -1582,7 +1661,7 @@
|
||||||
|
|
||||||
for (var i = 0, length = userDataIcons.length; i < length; i++) {
|
for (var i = 0, length = userDataIcons.length; i < length; i++) {
|
||||||
|
|
||||||
if (item.Type == 'Program') {
|
if (item.Type == 'Program' || item.Type == 'SeriesTimer') {
|
||||||
userDataIcons[i].classList.add('hide');
|
userDataIcons[i].classList.add('hide');
|
||||||
} else {
|
} else {
|
||||||
userDataIcons[i].classList.remove('hide');
|
userDataIcons[i].classList.remove('hide');
|
||||||
|
@ -1699,6 +1778,10 @@
|
||||||
|
|
||||||
function renderThemeMedia(page, item) {
|
function renderThemeMedia(page, item) {
|
||||||
|
|
||||||
|
if (item.Type === 'SeriesTimer' || item.Type === 'Timer' || item.Type === 'Genre' || item.Type === 'MusicGenre' || item.Type === 'GameGenre' || item.Type === 'Studio' || item.Type === 'Person') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ApiClient.getThemeMedia(Dashboard.getCurrentUserId(), item.Id, true).then(function (result) {
|
ApiClient.getThemeMedia(Dashboard.getCurrentUserId(), item.Id, true).then(function (result) {
|
||||||
|
|
||||||
var themeSongs = result.ThemeSongsResult.OwnerId == item.Id ?
|
var themeSongs = result.ThemeSongsResult.OwnerId == item.Id ?
|
||||||
|
@ -2177,6 +2260,16 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onCancelSeriesTimerClick() {
|
||||||
|
|
||||||
|
require(['recordingHelper'], function (recordingHelper) {
|
||||||
|
|
||||||
|
recordingHelper.cancelSeriesTimerWithConfirmation(currentItem.Id, currentItem.ServerId).then(function () {
|
||||||
|
Dashboard.navigate('livetv.html');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return function (view, params) {
|
return function (view, params) {
|
||||||
|
|
||||||
function onPlayTrailerClick() {
|
function onPlayTrailerClick() {
|
||||||
|
@ -2208,6 +2301,11 @@
|
||||||
elems[i].addEventListener('click', onPlayTrailerClick);
|
elems[i].addEventListener('click', onPlayTrailerClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
elems = view.querySelectorAll('.btnCancelSeriesTimer');
|
||||||
|
for (i = 0, length = elems.length; i < length; i++) {
|
||||||
|
elems[i].addEventListener('click', onCancelSeriesTimerClick);
|
||||||
|
}
|
||||||
|
|
||||||
elems = view.querySelectorAll('.btnDeleteItem');
|
elems = view.querySelectorAll('.btnDeleteItem');
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
for (i = 0, length = elems.length; i < length; i++) {
|
||||||
elems[i].addEventListener('click', onDeleteClick);
|
elems[i].addEventListener('click', onDeleteClick);
|
||||||
|
|
|
@ -252,7 +252,8 @@
|
||||||
var id = item.Id || item.ItemId;
|
var id = item.Id || item.ItemId;
|
||||||
|
|
||||||
if (item.Type == "SeriesTimer") {
|
if (item.Type == "SeriesTimer") {
|
||||||
return "livetvseriestimer.html?id=" + id;
|
//return "livetvseriestimer.html?id=" + id;
|
||||||
|
return "itemdetails.html?seriesTimerId=" + id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.CollectionType == 'livetv') {
|
if (item.CollectionType == 'livetv') {
|
||||||
|
@ -733,6 +734,10 @@
|
||||||
|
|
||||||
renderDetailImage: function (elem, item, editable, preferThumb, imageLoader, indicators) {
|
renderDetailImage: function (elem, item, editable, preferThumb, imageLoader, indicators) {
|
||||||
|
|
||||||
|
if (item.Type === 'SeriesTimer') {
|
||||||
|
editable = false;
|
||||||
|
}
|
||||||
|
|
||||||
var imageTags = item.ImageTags || {};
|
var imageTags = item.ImageTags || {};
|
||||||
|
|
||||||
if (item.PrimaryImageTag) {
|
if (item.PrimaryImageTag) {
|
||||||
|
@ -809,6 +814,14 @@
|
||||||
tag: item.SeriesPrimaryImageTag
|
tag: item.SeriesPrimaryImageTag
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else if (item.ParentPrimaryImageItemId && item.ParentPrimaryImageTag) {
|
||||||
|
|
||||||
|
url = ApiClient.getScaledImageUrl(item.ParentPrimaryImageItemId, {
|
||||||
|
type: "Primary",
|
||||||
|
maxHeight: imageHeight,
|
||||||
|
tag: item.ParentPrimaryImageTag
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
html += '<div style="position:relative;">';
|
html += '<div style="position:relative;">';
|
||||||
|
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
define(['datetime', 'dom', 'seriesRecordingEditor', 'listView', 'imageLoader', 'emby-itemscontainer'], function (datetime, dom, seriesRecordingEditor, listView, imageLoader) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
return function (view, params) {
|
|
||||||
|
|
||||||
function renderTimer(page, item) {
|
|
||||||
|
|
||||||
page.querySelector('.itemName').innerHTML = item.Name;
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
}
|
|
||||||
|
|
||||||
function getProgramScheduleHtml(items, options) {
|
|
||||||
|
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
var html = '';
|
|
||||||
html += '<div is="emby-itemscontainer" class="itemsContainer vertical-list" data-contextmenu="false">';
|
|
||||||
html += listView.getListViewHtml({
|
|
||||||
items: items,
|
|
||||||
enableUserDataButtons: false,
|
|
||||||
image: false,
|
|
||||||
showProgramDateTime: true,
|
|
||||||
mediaInfo: false,
|
|
||||||
action: 'none',
|
|
||||||
moreButton: false,
|
|
||||||
recordButton: false
|
|
||||||
});
|
|
||||||
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderSchedule(page) {
|
|
||||||
|
|
||||||
ApiClient.getLiveTvTimers({
|
|
||||||
UserId: ApiClient.getCurrentUserId(),
|
|
||||||
ImageTypeLimit: 1,
|
|
||||||
EnableImageTypes: "Primary,Backdrop,Thumb",
|
|
||||||
SortBy: "StartDate",
|
|
||||||
EnableTotalRecordCount: false,
|
|
||||||
EnableUserData: false,
|
|
||||||
SeriesTimerId: params.id,
|
|
||||||
Fields: "ChannelInfo"
|
|
||||||
|
|
||||||
}).then(function (result) {
|
|
||||||
|
|
||||||
if (result.Items.length && result.Items[0].SeriesTimerId != params.id) {
|
|
||||||
result.Items = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
var html = getProgramScheduleHtml(result.Items);
|
|
||||||
|
|
||||||
var scheduleTab = page.querySelector('.scheduleTab');
|
|
||||||
scheduleTab.innerHTML = html;
|
|
||||||
|
|
||||||
imageLoader.lazyChildren(scheduleTab);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function reload() {
|
|
||||||
|
|
||||||
var id = params.id;
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
ApiClient.getLiveTvSeriesTimer(id).then(function (result) {
|
|
||||||
|
|
||||||
renderTimer(view, result);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
renderSchedule(view);
|
|
||||||
}
|
|
||||||
|
|
||||||
seriesRecordingEditor.embed(params.id, ApiClient.serverId(), {
|
|
||||||
context: view.querySelector('.recordingEditor')
|
|
||||||
});
|
|
||||||
|
|
||||||
view.querySelector('.scheduleTab').addEventListener('timercancelled', reload);
|
|
||||||
view.addEventListener('viewbeforeshow', reload);
|
|
||||||
};
|
|
||||||
});
|
|
Loading…
Add table
Add a link
Reference in a new issue