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

live tv + nuget updates

This commit is contained in:
Luke Pulverenti 2013-12-15 09:19:24 -05:00
parent b2b7584352
commit f0a64f2f2e
4 changed files with 112 additions and 46 deletions

View file

@ -14,31 +14,55 @@
</div> </div>
<div data-role="content"> <div data-role="content">
<form id="liveTvSeriesTimerForm" style="margin: 0 auto;"> <form id="liveTvSeriesTimerForm" style="margin: 0 auto;">
<p><span class="itemName inlineItemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p> <p><span class="itemName inlineItemName"></span></p>
<p class="channel"></p> <p>
<p class="overview"></p>
<p style="margin-top: 2em;">
<a id="btnCancelTimer" href="#">Cancel Series</a> <a id="btnCancelTimer" href="#">Cancel Series</a>
</p> </p>
<br /> <p class="channel" style="margin-top: 2em;"></p>
<p class="time"></p>
<p class="overview"></p>
<br /> <br />
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li> <li>
<label for="selectPriority">Priority: </label> <label for="selectSeriesType">Series type: </label>
<select id="selectPriority" required="required" data-mini="true"> <select id="selectSeriesType" required="required" data-mini="true" disabled="disabled">
<option value="0">Highest</option> <option value="Manual">Manual</option>
<option value="1">Higher</option> <option value="NewProgramEventsOneChannel">New episodes, one channel</option>
<option value="2">High</option> <option value="NewProgramEventsAllChannels">New episodes, all channels</option>
<option value="3">Medium</option> <option value="AllProgramEventsOneChannel">All episodes, one channel</option>
<option value="4">Low</option> <option value="AllProgramEventsAllChannels">All episodes, all channels</option>
<option value="5">Lower</option>
<option value="6">Lowest</option>
</select> </select>
</li> </li>
<li id="fldDays" style="display: none;">
<h3>Days</h3>
<div data-role="controlgroup">
<input type="checkbox" data-mini="true" id="chkSunday" />
<label for="chkSunday">Sunday</label>
<input type="checkbox" data-mini="true" id="chkMonday" />
<label for="chkMonday">Monday</label>
<input type="checkbox" data-mini="true" id="chkTuesday" />
<label for="chkTuesday">Tuesday</label>
<input type="checkbox" data-mini="true" id="chkWednesday" />
<label for="chkWednesday">Wednesday</label>
<input type="checkbox" data-mini="true" id="chkThursday" />
<label for="chkThursday">Thursday</label>
<input type="checkbox" data-mini="true" id="chkFriday" />
<label for="chkFriday">Friday</label>
<input type="checkbox" data-mini="true" id="chkSaturday" />
<label for="chkSaturday">Saturday</label>
</div>
</li>
<li> <li>
<label for="txtRequestedPrePaddingSeconds">Requested pre-padding seconds: </label> <label for="txtRequestedPrePaddingSeconds">Requested pre-padding seconds: </label>
<input type="number" id="txtRequestedPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" /> <input type="number" id="txtRequestedPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" />

View file

@ -75,7 +75,7 @@
header: "Select Server Cache Path", header: "Select Server Cache Path",
instruction: "Browse or enter the path to use for Media Browser Server cache. The folder must be writeable." instruction: "Browse or enter the path to use for Media Browser Server cache. The folder must be writeable. The location of this folder will directly impact server performance and should ideally be placed on a solid state drive."
}); });
}); });

View file

@ -26,20 +26,67 @@
currentItem = item; currentItem = item;
$('.itemName', page).html(item.Name); $('.itemName', page).html(item.Name);
$('.channel', page).html('<a href="livetvchannel.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create');
$('.overview', page).html(item.Overview || ''); $('.overview', page).html(item.Overview || '');
$('#txtRequestedPrePaddingSeconds', page).val(item.RequestedPrePaddingSeconds); $('#txtRequestedPrePaddingSeconds', page).val(item.RequestedPrePaddingSeconds);
$('#txtRequestedPostPaddingSeconds', page).val(item.RequestedPostPaddingSeconds); $('#txtRequestedPostPaddingSeconds', page).val(item.RequestedPostPaddingSeconds);
$('#txtRequiredPrePaddingSeconds', page).val(item.RequiredPrePaddingSeconds); $('#txtRequiredPrePaddingSeconds', page).val(item.RequiredPrePaddingSeconds);
$('#txtRequiredPostPaddingSeconds', page).val(item.RequiredPostPaddingSeconds); $('#txtRequiredPostPaddingSeconds', page).val(item.RequiredPostPaddingSeconds);
$('#selectPriority', page).val(item.Priority);
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item)); var channelHtml = '';
if (item.RecurrenceType == 'NewProgramEventsAllChannels' || item.RecurrenceType == 'AllProgramEventsAllChannels') {
channelHtml += 'All Channels';
}
else if (item.ChannelId) {
channelHtml += '<a href="livetvchannel.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>';
}
$('.channel', page).html('Channel:&nbsp;&nbsp;&nbsp;' + channelHtml).trigger('create');
$('#selectSeriesType', page).val(item.RecurrenceType).selectmenu('refresh').trigger('change');
selectDays(page, item.Days);
$('.time', page).html('Time:&nbsp;&nbsp;&nbsp;' + LiveTvHelpers.getDisplayTime(item.StartDate));
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
} }
function selectDays(page, days) {
var daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
for (var i = 0, length = daysOfWeek.length; i < length; i++) {
var day = daysOfWeek[i];
$('#chk' + day, page).checked(days.indexOf(day) != -1).checkboxradio('refresh');
}
}
function getDays(page) {
var daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
var days = [];
for (var i = 0, length = daysOfWeek.length; i < length; i++) {
var day = daysOfWeek[i];
if ($('#chk' + day, page).checked()) {
days.push(day);
}
}
return days;
}
function onSubmit() { function onSubmit() {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
@ -52,7 +99,9 @@
item.RequestedPostPaddingSeconds = $('#txtRequestedPostPaddingSeconds', form).val(); item.RequestedPostPaddingSeconds = $('#txtRequestedPostPaddingSeconds', form).val();
item.RequiredPrePaddingSeconds = $('#txtRequiredPrePaddingSeconds', form).val(); item.RequiredPrePaddingSeconds = $('#txtRequiredPrePaddingSeconds', form).val();
item.RequiredPostPaddingSeconds = $('#txtRequiredPostPaddingSeconds', form).val(); item.RequiredPostPaddingSeconds = $('#txtRequiredPostPaddingSeconds', form).val();
item.Priority = $('#selectPriority', form).val(); item.RecurrenceType = $('#selectSeriesType', form).val();
item.Days = getDays(form);
ApiClient.updateLiveTvSeriesTimer(item).done(function () { ApiClient.updateLiveTvSeriesTimer(item).done(function () {
Dashboard.alert('Timer Saved'); Dashboard.alert('Timer Saved');
@ -70,7 +119,7 @@
var id = getParameterByName('id'); var id = getParameterByName('id');
apiClient.getLiveTvTimer(id).done(function (result) { apiClient.getLiveTvSeriesTimer(id).done(function (result) {
renderTimer(page, result); renderTimer(page, result);
@ -87,6 +136,16 @@
}); });
$('#selectSeriesType', page).on('change', function () {
if (this.value == 'Manual') {
$('#fldDays', page).show();
} else {
$('#fldDays', page).hide();
}
});
}).on('pagebeforeshow', "#liveTvSeriesTimerPage", function () { }).on('pagebeforeshow', "#liveTvSeriesTimerPage", function () {
var page = this; var page = this;

View file

@ -32,9 +32,8 @@
html += '<th class="tabletColumn">&nbsp;</th>'; html += '<th class="tabletColumn">&nbsp;</th>';
html += '<th>Name</th>'; html += '<th>Name</th>';
html += '<th class="desktopColumn">Channel</th>'; html += '<th class="desktopColumn">Channel</th>';
html += '<th>Start</th>';
html += '<th>End</th>';
html += '<th class="tabletColumn">Days</th>'; html += '<th class="tabletColumn">Days</th>';
html += '<th class="tabletColumn">Time</th>';
html += '</tr>'; html += '</tr>';
@ -53,33 +52,15 @@
html += '</td>'; html += '</td>';
html += '<td class="desktopColumn">'; html += '<td class="desktopColumn">';
if (timer.ChannelId) {
if (timer.RecurrenceType == 'NewProgramEventsAllChannels' || timer.RecurrenceType == 'AllProgramEventsAllChannels') {
html += 'All Channels';
}
else if (timer.ChannelId) {
html += '<a href="livetvchannel.html?id=' + timer.ChannelId + '">' + timer.ChannelName + '</a>'; html += '<a href="livetvchannel.html?id=' + timer.ChannelId + '">' + timer.ChannelName + '</a>';
} }
html += '</td>'; html += '</td>';
var startDate = timer.StartDate;
var endDate = timer.StartDate;
try {
startDate = parseISO8601Date(startDate, { toLocal: true });
} catch (err) {
}
try {
endDate = parseISO8601Date(endDate, { toLocal: true });
} catch (err) {
}
html += '<td>' + startDate.toLocaleDateString() + '</td>';
html += '<td>' + endDate.toLocaleDateString() + '</td>';
html += '<td class="tabletColumn">'; html += '<td class="tabletColumn">';
if (timer.DayPattern) { if (timer.DayPattern) {
@ -93,6 +74,8 @@
html += '</td>'; html += '</td>';
html += '<td class="tabletColumn">' + LiveTvHelpers.getDisplayTime(timer.StartDate) + '</td>';
html += '</tr>'; html += '</tr>';
} }