mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update recordings
This commit is contained in:
parent
28271a0867
commit
bc693bbdc6
36 changed files with 243 additions and 256 deletions
|
@ -55,7 +55,7 @@ $.fn.checked = function (value) {
|
|||
});
|
||||
} else {
|
||||
// Return check state
|
||||
return $(this).is(':checked');
|
||||
return this.length && this[0].checked;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1192,6 +1192,10 @@
|
|||
atts.push('data-albumid="' + item.AlbumId + '"');
|
||||
}
|
||||
|
||||
if (item.ChannelId) {
|
||||
atts.push('data-channelid="' + item.ChannelId + '"');
|
||||
}
|
||||
|
||||
if (item.ArtistItems && item.ArtistItems.length) {
|
||||
atts.push('data-artistid="' + item.ArtistItems[0].Id + '"');
|
||||
}
|
||||
|
@ -3114,6 +3118,17 @@
|
|||
miscInfo.push(item.Width + "x" + item.Height);
|
||||
}
|
||||
|
||||
if (item.SeriesTimerId) {
|
||||
var html = '';
|
||||
html += '<a href="livetvseriestimer.html?id=' + item.SeriesTimerId + '" title="' + Globalize.translate('ButtonViewSeriesRecording') + '">';
|
||||
html += '<div class="timerCircle seriesTimerCircle"></div>';
|
||||
html += '<div class="timerCircle seriesTimerCircle"></div>';
|
||||
html += '<div class="timerCircle seriesTimerCircle"></div>';
|
||||
html += '</a>';
|
||||
miscInfo.push(html);
|
||||
require(['livetvcss']);
|
||||
}
|
||||
|
||||
return miscInfo.join(' ');
|
||||
},
|
||||
|
||||
|
|
|
@ -498,6 +498,10 @@
|
|||
isFolder = true;
|
||||
}
|
||||
|
||||
if (type == 'Program') {
|
||||
id = card.getAttribute('data-channelid');
|
||||
}
|
||||
|
||||
LibraryBrowser.showPlayMenu(playButton, id, type, isFolder, mediaType, resumePosition);
|
||||
|
||||
e.preventDefault();
|
||||
|
|
|
@ -23,17 +23,19 @@
|
|||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function renderChannels(page, result) {
|
||||
function renderChannels(page, viewPanel, result) {
|
||||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getQueryPagingHtml({
|
||||
startIndex: query.StartIndex,
|
||||
limit: query.Limit,
|
||||
totalRecordCount: result.TotalRecordCount,
|
||||
viewButton: true,
|
||||
showLimit: false
|
||||
showLimit: false,
|
||||
viewPanelClass: 'channelViewPanel'
|
||||
|
||||
})).trigger('create');
|
||||
|
||||
updateFilterControls(this);
|
||||
updateFilterControls(viewPanel);
|
||||
|
||||
var html = getChannelsHtml(result.Items);
|
||||
|
||||
|
@ -44,24 +46,24 @@
|
|||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
LibraryBrowser.saveQueryValues('movies', query);
|
||||
}
|
||||
|
||||
function reloadItems(page) {
|
||||
function reloadItems(page, viewPanel) {
|
||||
|
||||
showLoadingMessage(page);
|
||||
|
||||
ApiClient.getLiveTvChannels(query).done(function (result) {
|
||||
|
||||
renderChannels(page, result);
|
||||
renderChannels(page, viewPanel, result);
|
||||
|
||||
hideLoadingMessage(page);
|
||||
|
||||
|
@ -80,36 +82,37 @@
|
|||
$(document).on('pageinitdepends', "#liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this.querySelector('.channelsTabContent');
|
||||
var viewPanel = this.querySelector('.channelViewPanel');
|
||||
|
||||
$('#chkFavorite', page).on('change', function () {
|
||||
$('#chkFavorite', viewPanel).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.IsFavorite = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
|
||||
$('#chkLikes', page).on('change', function () {
|
||||
$('#chkLikes', viewPanel).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.IsLiked = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
$('#chkDislikes', page).on('change', function () {
|
||||
$('#chkDislikes', viewPanel).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.IsDisliked = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
$('#selectPageSize', page).on('change', function () {
|
||||
$('#selectPageSize', viewPanel).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -122,13 +125,14 @@
|
|||
|
||||
if (parseInt(this.selected) == 2) {
|
||||
var tabContent = page.querySelector('.channelsTabContent');
|
||||
var viewPanel = page.querySelector('.channelViewPanel');
|
||||
|
||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
||||
query.UserId = Dashboard.getCurrentUserId();
|
||||
LibraryBrowser.loadSavedQueryValues('movies', query);
|
||||
query.Limit = query.Limit || LibraryBrowser.getDefaultPageSize();
|
||||
reloadItems(tabContent);
|
||||
updateFilterControls(this);
|
||||
reloadItems(tabContent, viewPanel);
|
||||
updateFilterControls(viewPanel);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
|
||||
LiveTvHelpers.renderMiscProgramInfo($('.miscTvProgramInfo', page), program);
|
||||
|
||||
$('#chkNewOnly', page).checked(defaultTimer.RecordNewOnly).checkboxradio('refresh');
|
||||
$('#chkAllChannels', page).checked(defaultTimer.RecordAnyChannel).checkboxradio('refresh');
|
||||
$('#chkAnyTime', page).checked(defaultTimer.RecordAnyTime).checkboxradio('refresh');
|
||||
$('#chkNewOnly', page).checked(defaultTimer.RecordNewOnly);
|
||||
$('#chkAllChannels', page).checked(defaultTimer.RecordAnyChannel);
|
||||
$('#chkAnyTime', page).checked(defaultTimer.RecordAnyTime);
|
||||
|
||||
$('#txtPrePaddingMinutes', page).val(defaultTimer.PrePaddingSeconds / 60);
|
||||
$('#txtPostPaddingMinutes', page).val(defaultTimer.PostPaddingSeconds / 60);
|
||||
$('#chkPrePaddingRequired', page).checked(defaultTimer.IsPrePaddingRequired).checkboxradio('refresh');
|
||||
$('#chkPostPaddingRequired', page).checked(defaultTimer.IsPostPaddingRequired).checkboxradio('refresh');
|
||||
$('#chkPrePaddingRequired', page).checked(defaultTimer.IsPrePaddingRequired);
|
||||
$('#chkPostPaddingRequired', page).checked(defaultTimer.IsPostPaddingRequired);
|
||||
|
||||
if (program.IsSeries) {
|
||||
$('#eligibleForSeriesFields', page).show();
|
||||
|
@ -67,7 +67,7 @@
|
|||
|
||||
var day = daysOfWeek[i];
|
||||
|
||||
$('#chk' + day, page).checked(days.indexOf(day) != -1).checkboxradio('refresh');
|
||||
$('#chk' + day, page).checked(days.indexOf(day) != -1);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -29,12 +29,12 @@
|
|||
|
||||
$('#txtPrePaddingMinutes', page).val(item.PrePaddingSeconds / 60);
|
||||
$('#txtPostPaddingMinutes', page).val(item.PostPaddingSeconds / 60);
|
||||
$('#chkPrePaddingRequired', page).checked(item.IsPrePaddingRequired).checkboxradio('refresh');
|
||||
$('#chkPostPaddingRequired', page).checked(item.IsPostPaddingRequired).checkboxradio('refresh');
|
||||
$('#chkPrePaddingRequired', page).checked(item.IsPrePaddingRequired);
|
||||
$('#chkPostPaddingRequired', page).checked(item.IsPostPaddingRequired);
|
||||
|
||||
$('#chkNewOnly', page).checked(item.RecordNewOnly).checkboxradio('refresh');
|
||||
$('#chkAllChannels', page).checked(item.RecordAnyChannel).checkboxradio('refresh');
|
||||
$('#chkAnyTime', page).checked(item.RecordAnyTime).checkboxradio('refresh');
|
||||
$('#chkNewOnly', page).checked(item.RecordNewOnly);
|
||||
$('#chkAllChannels', page).checked(item.RecordAnyChannel);
|
||||
$('#chkAnyTime', page).checked(item.RecordAnyTime);
|
||||
|
||||
var channelHtml = '';
|
||||
if (item.RecordAnyChannel) {
|
||||
|
@ -75,7 +75,7 @@
|
|||
|
||||
var day = daysOfWeek[i];
|
||||
|
||||
$('#chk' + day, page).checked(days.indexOf(day) != -1).checkboxradio('refresh');
|
||||
$('#chk' + day, page).checked(days.indexOf(day) != -1);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -29,19 +29,26 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
|
||||
if (timers.length) {
|
||||
html += '<div class="paperList">';
|
||||
}
|
||||
|
||||
for (var i = 0, length = timers.length; i < length; i++) {
|
||||
|
||||
var timer = timers[i];
|
||||
|
||||
html += '<li><a href="livetvseriestimer.html?id=' + timer.Id + '">';
|
||||
html += '<paper-icon-item>';
|
||||
|
||||
html += '<h3>';
|
||||
html += '<paper-fab class="listAvatar" icon="live-tv" item-icon></paper-fab>';
|
||||
|
||||
html += '<paper-item-body two-line>';
|
||||
html += '<a class="clearLink" href="livetvseriestimer.html?id=' + timer.Id + '">';
|
||||
|
||||
html += '<div>';
|
||||
html += timer.Name;
|
||||
html += '</h3>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<p>';
|
||||
html += '<div secondary>';
|
||||
if (timer.DayPattern) {
|
||||
html += timer.DayPattern;
|
||||
}
|
||||
|
@ -57,24 +64,28 @@
|
|||
} else {
|
||||
html += ' - ' + LibraryBrowser.getDisplayTime(timer.StartDate);
|
||||
}
|
||||
html += '</p>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<p>';
|
||||
html += '<div secondary>';
|
||||
if (timer.RecordAnyChannel) {
|
||||
html += Globalize.translate('LabelAllChannels');
|
||||
}
|
||||
else if (timer.ChannelId) {
|
||||
html += timer.ChannelName;
|
||||
}
|
||||
html += '</p>';
|
||||
html += '</div>';
|
||||
html += '</a>';
|
||||
|
||||
html += '<a data-seriestimerid="' + timer.Id + '" href="#" title="' + Globalize.translate('ButtonCancelSeries') + '" class="btnCancelSeries">' + Globalize.translate('ButtonCancelSeries') + '</a>';
|
||||
html += '</paper-item-body>';
|
||||
|
||||
html += '</li>';
|
||||
html += '<paper-icon-button icon="delete" data-seriestimerid="' + timer.Id + '" title="' + Globalize.translate('ButtonCancelSeries') + '" class="btnCancelSeries"></paper-icon-button>';
|
||||
|
||||
html += '</paper-icon-item>';
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
if (timers.length) {
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
var elem = $('#items', page).html(html).trigger('create');
|
||||
|
||||
|
|
|
@ -59,10 +59,14 @@
|
|||
|
||||
$('#txtPrePaddingMinutes', page).val(item.PrePaddingSeconds / 60);
|
||||
$('#txtPostPaddingMinutes', page).val(item.PostPaddingSeconds / 60);
|
||||
$('#chkPrePaddingRequired', page).checked(item.IsPrePaddingRequired).checkboxradio('refresh');
|
||||
$('#chkPostPaddingRequired', page).checked(item.IsPostPaddingRequired).checkboxradio('refresh');
|
||||
$('#chkPrePaddingRequired', page).checked(item.IsPrePaddingRequired);
|
||||
$('#chkPostPaddingRequired', page).checked(item.IsPostPaddingRequired);
|
||||
|
||||
$('.timerStatus', page).html('Status: ' + item.Status);
|
||||
if (item.Status == 'New') {
|
||||
$('.timerStatus', page).hide();
|
||||
} else {
|
||||
$('.timerStatus', page).show().html('Status: ' + item.Status);
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
@ -81,6 +85,7 @@
|
|||
item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked();
|
||||
|
||||
ApiClient.updateLiveTvTimer(item).done(function () {
|
||||
Dashboard.hideLoadingMsg();
|
||||
Dashboard.alert(Globalize.translate('MessageRecordingSaved'));
|
||||
});
|
||||
});
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
|
||||
var index = '';
|
||||
|
||||
for (var i = 0, length = timers.length; i < length; i++) {
|
||||
|
@ -62,8 +61,21 @@
|
|||
|
||||
if (imgUrl) {
|
||||
html += '<paper-fab class="listAvatar blue" style="background-image:url(\'' + imgUrl + '\');background-repeat:no-repeat;background-position:center center;background-size: cover;" item-icon></paper-fab>';
|
||||
} else {
|
||||
html += '<paper-fab class="listAvatar blue" icon="tv" item-icon></paper-fab>';
|
||||
}
|
||||
else if (program.IsKids) {
|
||||
html += '<paper-fab class="listAvatar" style="background:#2196F3;" icon="person" item-icon></paper-fab>';
|
||||
}
|
||||
else if (program.IsSports) {
|
||||
html += '<paper-fab class="listAvatar" style="background:#8BC34A;" icon="person" item-icon></paper-fab>';
|
||||
}
|
||||
else if (program.IsMovie) {
|
||||
html += '<paper-fab class="listAvatar" icon="movie" item-icon></paper-fab>';
|
||||
}
|
||||
else if (program.IsNews) {
|
||||
html += '<paper-fab class="listAvatar" style="background:#673AB7;" icon="new-releases" item-icon></paper-fab>';
|
||||
}
|
||||
else {
|
||||
html += '<paper-fab class="listAvatar blue" icon="live-tv" item-icon></paper-fab>';
|
||||
}
|
||||
|
||||
html += '<paper-item-body two-line>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue