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

View File

@ -28,16 +28,6 @@
<ul data-role="listview" class="ulForm">
<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>
<div data-role="controlgroup">
@ -63,6 +53,21 @@
<label for="chkSaturday">Saturday</label>
</div>
</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>
<label for="txtRequestedPrePaddingSeconds">Requested pre-padding seconds: </label>
<input type="number" id="txtRequestedPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" />

View File

@ -21,12 +21,12 @@
html += '<tr>';
html += '<th>&nbsp;</th>';
html += '<th class="tabletColumn">&nbsp;</th>';
html += '<th>Date</th>';
html += '<th>Start</th>';
html += '<th>End</th>';
html += '<th class="tabletColumn">End</th>';
html += '<th>Name</th>';
html += '<th>Genre</th>';
html += '<th class="desktopColumn">Genre</th>';
html += '</tr>';
@ -36,7 +36,7 @@
html += '<tr>';
html += '<td>';
html += '<td class="tabletColumn">';
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>';
@ -60,10 +60,19 @@
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>' + program.Genres.join(' / ') + '</td>';
html += '<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>';
}
@ -90,7 +99,7 @@
function loadPrograms(page) {
ApiClient.getLiveTvPrograms({
ChannelIds: currentItem.Id,
UserId: Dashboard.getCurrentUserId()
@ -155,7 +164,7 @@
window.LiveTvHelpers = {
getDisplayTime: function (date) {
try {
date = parseISO8601Date(date, { toLocal: true });

View File

@ -33,7 +33,7 @@
Dashboard.setPageTitle(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);

View File

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

View File

@ -33,6 +33,10 @@
$('#txtRequiredPrePaddingSeconds', page).val(item.RequiredPrePaddingSeconds);
$('#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 = '';
if (item.RecurrenceType == 'NewProgramEventsAllChannels' || item.RecurrenceType == 'AllProgramEventsAllChannels') {
@ -44,8 +48,6 @@
$('.channel', page).html('Channel:&nbsp;&nbsp;&nbsp;' + channelHtml).trigger('create');
$('#selectSeriesType', page).val(item.RecurrenceType).selectmenu('refresh').trigger('change');
selectDays(page, item.Days);
@ -99,7 +101,10 @@
item.RequestedPostPaddingSeconds = $('#txtRequestedPostPaddingSeconds', form).val();
item.RequiredPrePaddingSeconds = $('#txtRequiredPrePaddingSeconds', 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);
@ -136,16 +141,6 @@
});
$('#selectSeriesType', page).on('change', function () {
if (this.value == 'Manual') {
$('#fldDays', page).show();
} else {
$('#fldDays', page).hide();
}
});
}).on('pagebeforeshow', "#liveTvSeriesTimerPage", function () {
var page = this;

View File

@ -32,8 +32,8 @@
html += '<th class="tabletColumn">&nbsp;</th>';
html += '<th>Name</th>';
html += '<th class="desktopColumn">Channel</th>';
html += '<th class="tabletColumn">Days</th>';
html += '<th class="tabletColumn">Time</th>';
html += '<th>Days</th>';
html += '<th>Time</th>';
html += '</tr>';
@ -61,7 +61,7 @@
}
html += '</td>';
html += '<td class="tabletColumn">';
html += '<td>';
if (timer.DayPattern) {
html += timer.DayPattern;
@ -74,7 +74,7 @@
html += '</td>';
html += '<td class="tabletColumn">' + LiveTvHelpers.getDisplayTime(timer.StartDate) + '</td>';
html += '<td>' + LiveTvHelpers.getDisplayTime(timer.StartDate) + '</td>';
html += '</tr>';
}

View File

@ -78,7 +78,19 @@
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">';