mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add playback of in-progress recordings
This commit is contained in:
parent
ca36b18094
commit
2077019d9a
20 changed files with 88 additions and 395 deletions
|
@ -11,8 +11,6 @@
|
|||
$('#chkBlastAliveMessages', page).checked(config.BlastAliveMessages);
|
||||
$('#txtBlastInterval', page).val(config.BlastAliveMessageIntervalSeconds);
|
||||
|
||||
$('#chkEnableMovieFolders', page).checked(config.EnableMovieFolders);
|
||||
|
||||
var usersHtml = users.map(function (u) {
|
||||
return '<option value="' + u.Id + '">' + u.Name + '</option>';
|
||||
}).join('');
|
||||
|
@ -40,8 +38,6 @@
|
|||
config.BlastAliveMessageIntervalSeconds = $('#txtBlastInterval', form).val();
|
||||
config.DefaultUserId = $('#selectUser', form).val();
|
||||
|
||||
config.EnableMovieFolders = $('#chkEnableMovieFolders', form).checked();
|
||||
|
||||
ApiClient.updateNamedConfiguration("dlna", config).then(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
|
|
|
@ -239,9 +239,9 @@
|
|||
}
|
||||
|
||||
var itemBirthLocation = page.querySelector('#itemBirthLocation');
|
||||
if (item.Type == "Person" && item.PlaceOfBirth) {
|
||||
if (item.Type == "Person" && item.ProductionLocations && item.ProductionLocations.length) {
|
||||
|
||||
var gmap = '<a class="textlink" target="_blank" href="https://maps.google.com/maps?q=' + item.PlaceOfBirth + '">' + item.PlaceOfBirth + '</a>';
|
||||
var gmap = '<a class="textlink" target="_blank" href="https://maps.google.com/maps?q=' + item.ProductionLocations[0] + '">' + item.ProductionLocations[0] + '</a>';
|
||||
|
||||
itemBirthLocation.classList.remove('hide');
|
||||
itemBirthLocation.innerHTML = Globalize.translate('BirthPlaceValue').replace('{0}', gmap);
|
||||
|
@ -899,7 +899,7 @@
|
|||
|
||||
var options = {
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
limit: 8,
|
||||
limit: item.Type == "MusicAlbum" || item.Type == "MusicArtist" ? 8 : 10,
|
||||
fields: "PrimaryImageAspectRatio,UserData,CanDelete"
|
||||
};
|
||||
|
||||
|
@ -942,7 +942,7 @@
|
|||
});
|
||||
html += '</div>';
|
||||
|
||||
var similarContent = page.querySelector('#similarContent');
|
||||
var similarContent = similarCollapsible.querySelector('.similarContent');
|
||||
similarContent.innerHTML = html;
|
||||
ImageLoader.lazyChildren(similarContent);
|
||||
});
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
showAirTime: true,
|
||||
showAirEndTime: true,
|
||||
showChannelName: true,
|
||||
lazy: true,
|
||||
cardLayout: true,
|
||||
vibrant: true,
|
||||
action: 'edit',
|
||||
|
|
|
@ -93,6 +93,10 @@
|
|||
ImageLoader.lazyChildren(recordingItems);
|
||||
}
|
||||
|
||||
function getBackdropShape() {
|
||||
return enableScrollX() ? 'overflowBackdrop' : 'backdrop';
|
||||
}
|
||||
|
||||
function renderActiveRecordings(context, promise) {
|
||||
|
||||
promise.then(function (result) {
|
||||
|
@ -102,8 +106,18 @@
|
|||
result.Items = [];
|
||||
}
|
||||
|
||||
renderTimers(context.querySelector('#activeRecordings'), result.Items, {
|
||||
indexByDate: false
|
||||
renderRecordings(context.querySelector('#activeRecordings'), result.Items, {
|
||||
shape: getBackdropShape(),
|
||||
showParentTitle: false,
|
||||
showTitle: true,
|
||||
showAirTime: true,
|
||||
showAirEndTime: true,
|
||||
showChannelName: true,
|
||||
cardLayout: true,
|
||||
vibrant: true,
|
||||
preferThumb: true,
|
||||
coverImage: true,
|
||||
overlayText: false
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -162,29 +176,11 @@
|
|||
});
|
||||
}
|
||||
|
||||
function renderTimers(context, timers, options) {
|
||||
|
||||
LiveTvHelpers.getTimersHtml(timers, options).then(function (html) {
|
||||
|
||||
var elem = context;
|
||||
|
||||
if (html) {
|
||||
elem.classList.remove('hide');
|
||||
} else {
|
||||
elem.classList.add('hide');
|
||||
}
|
||||
|
||||
elem.querySelector('.recordingItems').innerHTML = html;
|
||||
|
||||
ImageLoader.lazyChildren(elem);
|
||||
});
|
||||
}
|
||||
|
||||
function onMoreClick(e) {
|
||||
|
||||
var type = this.getAttribute('data-type');
|
||||
|
||||
switch(type) {
|
||||
switch (type) {
|
||||
case 'latest':
|
||||
Dashboard.navigate('livetvitems.html?type=Recordings');
|
||||
break;
|
||||
|
@ -230,8 +226,14 @@
|
|||
});
|
||||
|
||||
self.preRender = function () {
|
||||
activeRecordingsPromise = ApiClient.getLiveTvTimers({
|
||||
IsActive: true
|
||||
|
||||
activeRecordingsPromise = ApiClient.getLiveTvRecordings({
|
||||
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
IsInProgress: true,
|
||||
Fields: 'CanDelete,PrimaryImageAspectRatio,BasicSyncInfo',
|
||||
EnableTotalRecordCount: false,
|
||||
EnableImageTypes: "Primary,Thumb,Backdrop"
|
||||
});
|
||||
|
||||
latestPromise = ApiClient.getLiveTvRecordings({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['datetime', 'cardBuilder', 'paper-icon-button-light', 'emby-button'], function (datetime, cardBuilder) {
|
||||
define(['datetime', 'cardBuilder', 'imageLoader', 'paper-icon-button-light', 'emby-button'], function (datetime, cardBuilder, imageLoader) {
|
||||
|
||||
var query = {
|
||||
|
||||
|
@ -6,26 +6,6 @@
|
|||
SortOrder: "Ascending"
|
||||
};
|
||||
|
||||
function deleteSeriesTimer(context, id) {
|
||||
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
confirm(Globalize.translate('MessageConfirmSeriesCancellation'), Globalize.translate('HeaderConfirmSeriesCancellation')).then(function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.cancelLiveTvSeriesTimer(id).then(function () {
|
||||
|
||||
require(['toast'], function (toast) {
|
||||
toast(Globalize.translate('MessageSeriesCancelled'));
|
||||
});
|
||||
|
||||
reload(context);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function renderTimers(context, timers) {
|
||||
|
||||
var html = '';
|
||||
|
@ -43,92 +23,14 @@
|
|||
showSeriesTimerChannel: true
|
||||
});
|
||||
|
||||
//if (timers.length) {
|
||||
// html += '<div class="paperList">';
|
||||
//}
|
||||
|
||||
//for (var i = 0, length = timers.length; i < length; i++) {
|
||||
|
||||
// var timer = timers[i];
|
||||
|
||||
// html += '<div class="listItem">';
|
||||
|
||||
// html += '<i class="md-icon listItemIcon">live_tv</i>';
|
||||
|
||||
// html += '<div class="listItemBody three-line">';
|
||||
// html += '<a class="clearLink" href="livetvseriestimer.html?id=' + timer.Id + '">';
|
||||
// html += '<h3 class="listItemBodyText">';
|
||||
// html += timer.Name;
|
||||
// html += '</h3>';
|
||||
|
||||
// html += '<div class="secondary">';
|
||||
// if (timer.DayPattern) {
|
||||
// html += timer.DayPattern;
|
||||
// }
|
||||
// else {
|
||||
// var days = timer.Days || [];
|
||||
|
||||
// html += days.join(', ');
|
||||
// }
|
||||
|
||||
// if (timer.RecordAnyTime) {
|
||||
|
||||
// html += ' - ' + Globalize.translate('LabelAnytime');
|
||||
// } else {
|
||||
// html += ' - ' + datetime.getDisplayTime(timer.StartDate);
|
||||
// }
|
||||
// html += '</div>';
|
||||
|
||||
// html += '<div class="secondary">';
|
||||
// if (timer.RecordAnyChannel) {
|
||||
// html += Globalize.translate('LabelAllChannels');
|
||||
// }
|
||||
// else if (timer.ChannelId) {
|
||||
// html += timer.ChannelName;
|
||||
// }
|
||||
// html += '</div>';
|
||||
|
||||
// html += '</a>';
|
||||
// html += '</div>';
|
||||
|
||||
// html += '<button type="button" is="paper-icon-button-light" data-seriestimerid="' + timer.Id + '" title="' + Globalize.translate('ButtonCancelSeries') + '" class="btnCancelSeries autoSize"><i class="md-icon">cancel</i></button>';
|
||||
|
||||
// html += '</div>';
|
||||
//}
|
||||
|
||||
//if (timers.length) {
|
||||
// html += '</div>';
|
||||
//}
|
||||
|
||||
var elem = context.querySelector('#items');
|
||||
elem.innerHTML = html;
|
||||
|
||||
//if (timers.length) {
|
||||
// elem.querySelector('.paperList').addEventListener('click', function (e) {
|
||||
|
||||
// var btnCancelSeries = parentWithClass(e.target, 'btnCancelSeries');
|
||||
// if (btnCancelSeries) {
|
||||
// deleteSeriesTimer(context, btnCancelSeries.getAttribute('data-seriestimerid'));
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
imageLoader.lazyChildren(elem);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function parentWithClass(elem, className) {
|
||||
|
||||
while (!elem.classList || !elem.classList.contains(className)) {
|
||||
elem = elem.parentNode;
|
||||
|
||||
if (!elem) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return elem;
|
||||
}
|
||||
|
||||
function reload(context, promise) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue