live tv updates

This commit is contained in:
Luke Pulverenti 2013-12-17 01:08:06 -05:00
parent 60bcd69fd3
commit f030db9841
8 changed files with 62 additions and 45 deletions

View File

@ -21,12 +21,11 @@
</td> </td>
<td style="vertical-align: top; padding: 0;"> <td style="vertical-align: top; padding: 0;">
<p><span class="itemName inlineItemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p> <p><span class="itemName inlineItemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p>
<p class="itemEpisodeName"></p> <p>
<p class="itemChannelNumber"></p>
<p style="margin: 2em 0;">
<span class="itemCommunityRating"></span> <span class="itemCommunityRating"></span>
<span class="userDataIcons"></span> <span class="userDataIcons"></span>
</p> </p>
<p class="itemEpisodeName"></p>
<p class="itemGenres"></p> <p class="itemGenres"></p>
<p class="itemOverview"></p> <p class="itemOverview"></p>
</td> </td>
@ -55,6 +54,7 @@
<div class="detailSectionContent" style="padding: 0 1em;"> <div class="detailSectionContent" style="padding: 0 1em;">
<p class="status"></p> <p class="status"></p>
<p class="itemChannelNumber"></p>
<p class="audio"></p> <p class="audio"></p>
</div> </div>
</div> </div>

View File

@ -28,16 +28,6 @@
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li> <li>
<label for="selectSeriesType">Series type: </label>
<select id="selectSeriesType" required="required" data-mini="true" disabled="disabled">
<option value="Manual">Manual</option>
<option value="NewProgramEventsOneChannel">New episodes, one channel</option>
<option value="NewProgramEventsAllChannels">New episodes, all channels</option>
<option value="AllProgramEventsOneChannel">All episodes, one channel</option>
<option value="AllProgramEventsAllChannels">All episodes, all channels</option>
</select>
</li>
<li id="fldDays" style="display: none;">
<h3>Days</h3> <h3>Days</h3>
<div data-role="controlgroup"> <div data-role="controlgroup">
@ -63,6 +53,21 @@
<label for="chkSaturday">Saturday</label> <label for="chkSaturday">Saturday</label>
</div> </div>
</li> </li>
<li>
<h3>Advanced</h3>
</li>
<li>
<label for="chkNewOnly">Record only new episodes</label>
<input type="checkbox" id="chkNewOnly" data-mini="true" />
</li>
<li>
<label for="chkAnyTime">Record program at any time</label>
<input type="checkbox" id="chkAnyTime" data-mini="true" />
</li>
<li>
<label for="chkAllChannels">Record program on all channels</label>
<input type="checkbox" id="chkAllChannels" data-mini="true" />
</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

@ -21,12 +21,12 @@
html += '<tr>'; html += '<tr>';
html += '<th>&nbsp;</th>'; html += '<th class="tabletColumn">&nbsp;</th>';
html += '<th>Date</th>'; html += '<th>Date</th>';
html += '<th>Start</th>'; html += '<th>Start</th>';
html += '<th>End</th>'; html += '<th class="tabletColumn">End</th>';
html += '<th>Name</th>'; html += '<th>Name</th>';
html += '<th>Genre</th>'; html += '<th class="desktopColumn">Genre</th>';
html += '</tr>'; html += '</tr>';
@ -36,7 +36,7 @@
html += '<tr>'; html += '<tr>';
html += '<td>'; html += '<td class="tabletColumn">';
if (program.RecordingId) { if (program.RecordingId) {
html += '<button data-recordingid="' + program.RecordingId + '" class="btnCancelRecording" type="button" data-icon="delete" data-inline="true" data-mini="true" data-iconpos="notext">Cancel</button>'; html += '<button data-recordingid="' + program.RecordingId + '" class="btnCancelRecording" type="button" data-icon="delete" data-inline="true" data-mini="true" data-iconpos="notext">Cancel</button>';
@ -60,10 +60,19 @@
html += '<td>' + LiveTvHelpers.getDisplayTime(program.StartDate) + '</td>'; html += '<td>' + LiveTvHelpers.getDisplayTime(program.StartDate) + '</td>';
html += '<td>' + LiveTvHelpers.getDisplayTime(program.EndDate) + '</td>'; html += '<td class="tabletColumn">' + LiveTvHelpers.getDisplayTime(program.EndDate) + '</td>';
html += '<td>' + (program.Name || '') + '</td>'; html += '<td>';
html += '<td>' + program.Genres.join(' / ') + '</td>';
if (program.Name) {
//html += '<a href="livetvprogram.html?id=' + program.Id + '">';
html += program.Name;
//html += '</a>';
}
html += '</td>';
html += '<td class="desktopColumn">' + program.Genres.join(' / ') + '</td>';
html += '</tr>'; html += '</tr>';
} }
@ -90,7 +99,7 @@
function loadPrograms(page) { function loadPrograms(page) {
ApiClient.getLiveTvPrograms({ ApiClient.getLiveTvPrograms({
ChannelIds: currentItem.Id, ChannelIds: currentItem.Id,
UserId: Dashboard.getCurrentUserId() UserId: Dashboard.getCurrentUserId()
@ -155,7 +164,7 @@
window.LiveTvHelpers = { window.LiveTvHelpers = {
getDisplayTime: function (date) { getDisplayTime: function (date) {
try { try {
date = parseISO8601Date(date, { toLocal: true }); date = parseISO8601Date(date, { toLocal: true });

View File

@ -33,7 +33,7 @@
Dashboard.setPageTitle(name); Dashboard.setPageTitle(name);
$('.itemName', page).html(name); $('.itemName', page).html(name);
$('.itemChannelNumber', page).html('<a href="livetvchannel.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create'); $('.itemChannelNumber', page).html('Channel:&nbsp;&nbsp;&nbsp;<a href="livetvchannel.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create');
$('.itemEpisodeName', page).html(item.EpisodeTitle); $('.itemEpisodeName', page).html(item.EpisodeTitle);

View File

@ -36,10 +36,6 @@
html += '<td>'; html += '<td>';
html += '<a href="livetvrecording.html?id=' + recording.Id + '">'; html += '<a href="livetvrecording.html?id=' + recording.Id + '">';
html += recording.Name; html += recording.Name;
if (recording.EpisodeTitle) {
html += "<br/>" + recording.EpisodeTitle;
}
html += '</a>'; html += '</a>';
html += '</td>'; html += '</td>';

View File

@ -33,6 +33,10 @@
$('#txtRequiredPrePaddingSeconds', page).val(item.RequiredPrePaddingSeconds); $('#txtRequiredPrePaddingSeconds', page).val(item.RequiredPrePaddingSeconds);
$('#txtRequiredPostPaddingSeconds', page).val(item.RequiredPostPaddingSeconds); $('#txtRequiredPostPaddingSeconds', page).val(item.RequiredPostPaddingSeconds);
$('#chkNewOnly', page).checked(item.RecordNewOnly).checkboxradio('refresh');
$('#chkAllChannels', page).checked(item.RecordAnyChannel).checkboxradio('refresh');
$('#chkAnyTime', page).checked(item.RecordAnyTime).checkboxradio('refresh');
var channelHtml = ''; var channelHtml = '';
if (item.RecurrenceType == 'NewProgramEventsAllChannels' || item.RecurrenceType == 'AllProgramEventsAllChannels') { if (item.RecurrenceType == 'NewProgramEventsAllChannels' || item.RecurrenceType == 'AllProgramEventsAllChannels') {
@ -44,8 +48,6 @@
$('.channel', page).html('Channel:&nbsp;&nbsp;&nbsp;' + channelHtml).trigger('create'); $('.channel', page).html('Channel:&nbsp;&nbsp;&nbsp;' + channelHtml).trigger('create');
$('#selectSeriesType', page).val(item.RecurrenceType).selectmenu('refresh').trigger('change');
selectDays(page, item.Days); selectDays(page, item.Days);
@ -99,7 +101,10 @@
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.RecurrenceType = $('#selectSeriesType', form).val();
item.RecordNewOnly = $('#chkNewOnly', form).checked();
item.RecordAnyChannel = $('#chkAllChannels', form).checked();
item.RecordAnyTime = $('#chkAnyTime', form).checked();
item.Days = getDays(form); item.Days = getDays(form);
@ -136,16 +141,6 @@
}); });
$('#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,8 +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 class="tabletColumn">Days</th>'; html += '<th>Days</th>';
html += '<th class="tabletColumn">Time</th>'; html += '<th>Time</th>';
html += '</tr>'; html += '</tr>';
@ -61,7 +61,7 @@
} }
html += '</td>'; html += '</td>';
html += '<td class="tabletColumn">'; html += '<td>';
if (timer.DayPattern) { if (timer.DayPattern) {
html += timer.DayPattern; html += timer.DayPattern;
@ -74,7 +74,7 @@
html += '</td>'; html += '</td>';
html += '<td class="tabletColumn">' + LiveTvHelpers.getDisplayTime(timer.StartDate) + '</td>'; html += '<td>' + LiveTvHelpers.getDisplayTime(timer.StartDate) + '</td>';
html += '</tr>'; html += '</tr>';
} }

View File

@ -78,7 +78,19 @@
html += '<td class="tabletColumn">' + minutes.toFixed(0) + ' mins</td>'; html += '<td class="tabletColumn">' + minutes.toFixed(0) + ' mins</td>';
html += '<td class="tabletColumn">' + (timer.Status || '') + '</td>'; html += '<td class="tabletColumn">';
if (timer.Status == 'ConflictedNotOk' || timer.Status == 'Error') {
html += '<span style="color:red;">';
html += timer.Status;
html += '</span>';
} else {
html += timer.Status;
}
html += '</td>';
html += '<td class="desktopColumn">'; html += '<td class="desktopColumn">';