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

added IHasImages and IHasUserData

This commit is contained in:
Luke Pulverenti 2013-12-19 16:51:32 -05:00
parent b0d84e5046
commit 736a8233a3
23 changed files with 121 additions and 89 deletions

View file

@ -1724,6 +1724,20 @@
type: "Primary"
});
}
else if (item.Type == "Recording") {
url = ApiClient.getUrl("LiveTV/Recordings/" + item.Id + "/Images/Primary", {
maxheight: imageHeight,
tag: imageTags.Primary,
type: "Primary"
});
}
else if (item.Type == "Program") {
url = ApiClient.getUrl("LiveTV/Programs/" + item.Id + "/Images/Primary", {
maxheight: imageHeight,
tag: imageTags.Primary,
type: "Primary"
});
}
else if (item.Type == "Person") {
url = ApiClient.getPersonImageUrl(item.Name, {
maxheight: imageHeight,

View file

@ -32,8 +32,8 @@
$('#chkAllChannels', page).checked(defaultTimer.RecordAnyChannel).checkboxradio('refresh');
$('#chkAnyTime', page).checked(defaultTimer.RecordAnyTime).checkboxradio('refresh');
$('#txtPrePaddingSeconds', page).val(defaultTimer.PrePaddingSeconds);
$('#txtPostPaddingSeconds', page).val(defaultTimer.PostPaddingSeconds);
$('#txtPrePaddingSeconds', page).val(defaultTimer.PrePaddingSeconds / 60);
$('#txtPostPaddingSeconds', page).val(defaultTimer.PostPaddingSeconds / 60);
$('#chkPrePaddingRequired', page).checked(defaultTimer.IsPrePaddingRequired).checkboxradio('refresh');
$('#chkPostPaddingRequired', page).checked(defaultTimer.IsPostPaddingRequired).checkboxradio('refresh');
@ -105,10 +105,12 @@
var form = this;
apiClient.getNewLiveTvTimerDefaults({ programId: currentProgram.Id }).done(function (item) {
var programId = getParameterByName('programid');
item.PrePaddingSeconds = $('#txtPrePaddingSeconds', form).val();
item.PostPaddingSeconds = $('#txtPostPaddingSeconds', form).val();
apiClient.getNewLiveTvTimerDefaults({ programId: programId }).done(function (item) {
item.PrePaddingSeconds = $('#txtPrePaddingSeconds', form).val() * 60;
item.PostPaddingSeconds = $('#txtPostPaddingSeconds', form).val() * 60;
item.IsPrePaddingRequired = $('#chkPrePaddingRequired', form).checked();
item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked();
@ -142,15 +144,11 @@
return false;
}
function liveTvNewRecordingPage() {
window.LiveTvNewRecordingPage = {
onSubmit: onSubmit
var self = this;
self.onSubmit = onSubmit;
}
window.LiveTvNewRecordingPage = new liveTvNewRecordingPage();
};
$(document).on('pageinit', "#liveTvNewRecordingPage", function () {
@ -165,7 +163,7 @@
}
});
$('#btnCancel', page).on('click', function () {
Dashboard.navigate('livetvchannel.html?id=' + currentProgram.ChannelId);

View file

@ -35,7 +35,7 @@
html += '<td>';
html += '<a href="livetvrecording.html?id=' + recording.Id + '">';
html += recording.Name;
html += recording.Name || '(blank)';
html += '</a>';
html += '</td>';

View file

@ -4,7 +4,7 @@
function deleteTimer(page, id) {
Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Timer Cancellation", function (result) {
Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Cancellation", function (result) {
if (result) {
@ -12,7 +12,7 @@
ApiClient.cancelLiveTvSeriesTimer(id).done(function () {
Dashboard.alert('Timer cancelled.');
Dashboard.alert('Series cancelled.');
reload(page);
});
@ -28,8 +28,8 @@
$('.itemName', page).html(item.Name);
$('.overview', page).html(item.Overview || '');
$('#txtPrePaddingSeconds', page).val(item.PrePaddingSeconds);
$('#txtPostPaddingSeconds', page).val(item.PostPaddingSeconds);
$('#txtPrePaddingSeconds', page).val(item.PrePaddingSeconds / 60);
$('#txtPostPaddingSeconds', page).val(item.PostPaddingSeconds / 60);
$('#chkPrePaddingRequired', page).checked(item.IsPrePaddingRequired).checkboxradio('refresh');
$('#chkPostPaddingRequired', page).checked(item.IsPostPaddingRequired).checkboxradio('refresh');
@ -97,8 +97,8 @@
apiClient.getLiveTvSeriesTimer(currentItem.Id).done(function (item) {
item.PrePaddingSeconds = $('#txtPrePaddingSeconds', form).val();
item.PostPaddingSeconds = $('#txtPostPaddingSeconds', form).val();
item.PrePaddingSeconds = $('#txtPrePaddingSeconds', form).val() * 60;
item.PostPaddingSeconds = $('#txtPostPaddingSeconds', form).val() * 60;
item.IsPrePaddingRequired = $('#chkPrePaddingRequired', form).checked();
item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked();

View file

@ -2,7 +2,7 @@
function deleteTimer(page, id) {
Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Timer Cancellation", function (result) {
Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Cancellation", function (result) {
if (result) {
@ -10,7 +10,7 @@
ApiClient.cancelLiveTvSeriesTimer(id).done(function () {
Dashboard.alert('Series Timer deleted');
Dashboard.alert('Series cancelled.');
reload(page);
});

View file

@ -4,7 +4,7 @@
function deleteTimer(page, id) {
Dashboard.confirm("Are you sure you wish to cancel this timer?", "Confirm Timer Cancellation", function (result) {
Dashboard.confirm("Are you sure you wish to cancel this recording?", "Confirm Recording Cancellation", function (result) {
if (result) {
@ -12,7 +12,7 @@
ApiClient.cancelLiveTvTimer(id).done(function () {
Dashboard.alert('Timer cancelled.');
Dashboard.alert('Recording cancelled.');
reload(page);
});
@ -23,18 +23,34 @@
function renderTimer(page, item) {
var context = 'livetv';
currentItem = item;
$('.program', page).html(item.Name);
$('.channel', page).html('<a href="livetvchannel.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create');
$('.overview', page).html(item.Overview || '');
$('.itemName', page).html(item.Name);
$('.itemChannelNumber', page).html('Channel:&nbsp;&nbsp;&nbsp;<a href="livetvchannel.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create');
$('#txtPrePaddingSeconds', page).val(item.PrePaddingSeconds);
$('#txtPostPaddingSeconds', page).val(item.PostPaddingSeconds);
if (item.EpisodeTitle) {
$('.itemEpisodeName', page).html('Episode:&nbsp;&nbsp;&nbsp;' + item.EpisodeTitle);
} else {
$('.itemEpisodeName', page).html('');
}
if (item.CommunityRating) {
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item)).show();
} else {
$('.itemCommunityRating', page).hide();
}
LibraryBrowser.renderGenres($('.itemGenres', page), item, context);
LibraryBrowser.renderOverview($('.itemOverview', page), item);
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
$('#txtPrePaddingSeconds', page).val(item.PrePaddingSeconds / 60);
$('#txtPostPaddingSeconds', page).val(item.PostPaddingSeconds / 60);
$('#chkPrePaddingRequired', page).checked(item.IsPrePaddingRequired).checkboxradio('refresh');
$('#chkPostPaddingRequired', page).checked(item.IsPostPaddingRequired).checkboxradio('refresh');
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
$('.status', page).html('Status:&nbsp;&nbsp;&nbsp;' + item.Status);
if (item.SeriesTimerId) {
@ -56,8 +72,8 @@
apiClient.getLiveTvTimer(currentItem.Id).done(function (item) {
item.PrePaddingSeconds = $('#txtPrePaddingSeconds', form).val();
item.PostPaddingSeconds = $('#txtPostPaddingSeconds', form).val();
item.PrePaddingSeconds = $('#txtPrePaddingSeconds', form).val() * 60;
item.PostPaddingSeconds = $('#txtPostPaddingSeconds', form).val() * 60;
item.IsPrePaddingRequired = $('#chkPrePaddingRequired', form).checked();
item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked();

View file

@ -2,7 +2,7 @@
function deleteTimer(page, id) {
Dashboard.confirm("Are you sure you wish to cancel this timer?", "Confirm Timer Cancellation", function (result) {
Dashboard.confirm("Are you sure you wish to cancel this recording?", "Confirm Recording Cancellation", function (result) {
if (result) {
@ -10,7 +10,7 @@
ApiClient.cancelLiveTvTimer(id).done(function () {
Dashboard.alert('Timer deleted');
Dashboard.alert('Recording cancelled.');
reload(page);
});

View file

@ -35,16 +35,16 @@
var options = PluginUpdatesPage.getHtmlOptions(["Off", "On"], (plugin.EnableAutoUpdate ? "On" : "Off"));
html += "<td>";
html += "<select data-id='" + plugin.Id + "' onchange='PluginUpdatesPage.setAutoUpdate(this);' data-role='slider' id='" + fieldId + "' name='" + fieldId + "'>" + options + "</select>";
html += "<td style='vertical-align:middle;text-align:left;'>";
html += "<select data-mini='true' data-id='" + plugin.Id + "' onchange='PluginUpdatesPage.setAutoUpdate(this);' data-role='slider' id='" + fieldId + "' name='" + fieldId + "'>" + options + "</select>";
html += "</td>";
fieldId = "liPluginUpdateFieldb" + fieldIndex;
options = PluginUpdatesPage.getHtmlOptions(["Release", "Beta", "Dev"], plugin.UpdateClass);
html += "<td>";
html += "<select data-id='" + plugin.Id + "' onchange='PluginUpdatesPage.setUpdateClass(this);' data-inline='true' id='" + fieldId + "' name='" + fieldId + "'>" + options + "</select>";
html += "<td style='vertical-align:middle;text-align:left;'>";
html += "<select data-mini='true' data-id='" + plugin.Id + "' onchange='PluginUpdatesPage.setUpdateClass(this);' data-inline='true' id='" + fieldId + "' name='" + fieldId + "'>" + options + "</select>";
html += "</td>";
html += "</tr>";