update live tv recordings

This commit is contained in:
Luke Pulverenti 2015-07-29 13:16:00 -04:00
parent 65f5de02c1
commit 6d7ee58678
18 changed files with 146 additions and 272 deletions

View File

@ -40,7 +40,7 @@
<div class="detailSectionHeader">${HeaderAvailableServices}</div>
<div class="catalog"></div>
<div class="staticSupporterPromotion supporterPromotion syncPromotion" style="display:none;">
<div class="customSupporterPromotion supporterPromotion" style="display:none;">
<a class="btn btnActionAccent" href="supporter.html" style="font-size:14px;">
<div>
${HeaderSyncRequiresSupporterMembership}

View File

@ -681,6 +681,11 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
padding-bottom: .75em;
}
.detailSection h1 {
margin-bottom: .25em;
position: relative;
}
.detailSectionHeader {
background-clip: border-box;
padding: .75em 0 .75em 1em;
@ -716,7 +721,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
.detailSectionHeaderButton {
position: absolute;
right: 0;
top: 7px;
margin-top: 0;
margin-bottom: 0;
}

View File

@ -1352,12 +1352,16 @@ progress {
@media all and (min-width: 800px) {
.supporterPromotion {
.supporterPromotion:not(.inlineSupporterPromotion) {
position: absolute;
top: 70px;
right: 20px;
margin: 0;
}
.inlineSupporterPromotion {
display: inline-block;
}
}
.disabledUser {

View File

@ -1,5 +1,5 @@
.tileItem {
padding: 5px 7px 5px;
padding: 5px 7px 5px 0;
font-weight: normal !important;
display: block;
position: relative;

View File

@ -172,57 +172,57 @@
</div>
<div class="collectionItems"></div>
<div id="childrenCollapsible" class="hide detailSection">
<div class="detailSectionHeader childrenSectionHeader">
<h1 class="childrenSectionHeader">
<span id="childrenTitle"></span>
</div>
<div id="childrenContent" class="detailSectionContent">
</h1>
<div id="childrenContent">
<div class="childrenItemsContainer itemsContainer fullWidthItemsContainer" style="text-align:left;"></div>
</div>
</div>
<div id="additionalPartsCollapsible" class="detailSection hide">
<div class="detailSectionHeader">
<h1>
${HeaderAdditionalParts}
</div>
<div id="additionalPartsContent" class="detailSectionContent smallItemsContainer"></div>
</h1>
<div id="additionalPartsContent" class="smallItemsContainer"></div>
</div>
<div id="castCollapsible" style="display: none;" class="detailSection">
<div id="peopleHeader" class="detailSectionHeader">
<h1 id="peopleHeader">
${HeaderCastCrew}
</div>
<div id="castContent" class="detailSectionContent"></div>
</h1>
<div id="castContent"></div>
</div>
<div class="detailSection photoInfo hide">
<div class="detailSectionHeader">
<h1>
${HeaderPhotoInfo}
</div>
<div class="detailSectionContent" style="padding:1em;">
</h1>
<div>
<div class="photoInfoContent"></div>
</div>
</div>
<div id="specialsCollapsible" class="detailSection hide">
<div class="detailSectionHeader">
<h1>
${HeaderSpecialFeatures}
</div>
<div id="specialsContent" class="detailSectionContent smallItemsContainer"></div>
</h1>
<div id="specialsContent" class="smallItemsContainer"></div>
</div>
<div id="musicVideosCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader">
<h1>
${HeaderMusicVideos}
</div>
<div id="musicVideosContent" class="detailSectionContent smallItemsContainer"></div>
</h1>
<div id="musicVideosContent" class="smallItemsContainer"></div>
</div>
<div id="similarCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader">
</div>
<div id="similarContent" class="detailSectionContent"></div>
<h1 class="similiarHeader">
</h1>
<div id="similarContent"></div>
</div>
<div id="criticReviewsCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader">
<h1>
${HeaderAwardsAndReviews}
</div>
<div style="padding: 0 .5em;">
</h1>
<div>
<p id="awardSummary"></p>
<div id="criticRatingSummary" class="criticReview criticRatingSummary" style="display: none;">
<p style="margin: 0 0 .5em -40px; font-weight: bold;">TOMATOMETER®</p>
@ -232,28 +232,28 @@
<div class="criticRatingScore"></div>
<div class="criticRatingSummaryText"></div>
</div>
<div id="criticReviewsContent" class="detailSectionContent"></div>
<div id="criticReviewsContent"></div>
</div>
</div>
<div id="scenesCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader">
<h1>
${HeaderScenes}
<a class="detailSectionHeaderButton chapterSettingsButton clearLink" style="margin-top:-3px;display:inline-block;" href="metadataadvanced.html" title="${ButtonSettings}" style="display:none;"><paper-icon-button icon="settings"></paper-icon-button></a>
</div>
<div id="scenesContent" class="detailSectionContent smallItemsContainer"></div>
<a class="detailSectionHeaderButton chapterSettingsButton clearLink" style="margin-top:-8px;display:inline-block;" href="metadataadvanced.html" title="${ButtonSettings}" style="display:none;"><paper-icon-button icon="settings"></paper-icon-button></a>
</h1>
<div id="scenesContent" class="smallItemsContainer"></div>
</div>
<div id="themeSongsCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader">
<h1>
${HeaderThemeSongs}
</div>
<div id="themeSongsContent" class="detailSectionContent"></div>
</h1>
<div id="themeSongsContent"></div>
</div>
<div class="detailSection detailsSection">
<div class="detailSectionHeader">
<h1>
${HeaderDetails}
</div>
<div class="detailSectionContent" style="padding:0 1em;">
</h1>
<div>
<div class="tabDetails">
<p id="players"></p>
<p class="itemExternalLinks"></p>
@ -264,15 +264,15 @@
</div>
<div id="themeVideosCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader">
<h1>
${HeaderThemeVideos}
</div>
<div id="themeVideosContent" class="detailSectionContent smallItemsContainer"></div>
</h1>
<div id="themeVideosContent" class="smallItemsContainer"></div>
</div>
<div class="detailSection audioVideoMediaInfo hide">
<h2 class="detailSectionHeader">${HeaderMediaInfo}</h2>
<div class="detailSectionContent" style="padding: 0 .7em;">
<h1>${HeaderMediaInfo}</h1>
<div>
<div class="splitVersionContainer" style="border-bottom: 1px solid #444;">
<button type="button" class="btnSplitVersions" data-mini="true" data-inline="true" data-icon="delete" title="${ButtonSplitVersionsApart}">${ButtonSplitVersionsApart}</button>
</div>

View File

@ -61,8 +61,6 @@
<br />
<label for="selectCountry">${LabelCountry}</label>
<select id="selectCountry" data-mini="true" required="required">
<option value="ca">Canada</option>
<option value="usa" selected>United States</option>
</select>
</div>
<div>

View File

@ -1,66 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Emby</title>
</head>
<body>
<div id="liveTvRecordingPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvrecording,paperbuttonstyle,livetvcss">
<div class="libraryViewNav">
<a href="livetvsuggested.html"><iron-icon icon="info"></iron-icon>${TabSuggestions}</a>
<a href="livetvguide.html"><iron-icon icon="grid-on"></iron-icon>${TabGuide}</a>
<a href="livetvchannels.html"><iron-icon icon="live-tv"></iron-icon>${TabChannels}</a>
<a href="livetvrecordings.html" class="ui-btn-active"><iron-icon icon="slideshow"></iron-icon>${TabRecordings}</a>
<a href="livetvtimers.html"><iron-icon icon="schedule"></iron-icon>${TabScheduled}</a>
<a href="livetvseriestimers.html"><iron-icon icon="refresh"></iron-icon>${TabSeries}</a>
</div>
<div style="padding: 1em 0;">
<div>
<table class="detailPageContent primaryDetailPageContent">
<tr>
<td style="vertical-align: top; padding: 0 1em 0 0;">
<div id="itemImage" class="itemImageContainer smallDetailImageContainer"></div>
</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="itemMiscInfo miscTvProgramInfo"></p>
<p>
<span class="itemCommunityRating"></span>
<span class="userDataIcons"></span>
</p>
<p class="itemGenres desktopGenres"></p>
<p class="itemOverview desktopOverview smoothScrollY"></p>
</td>
</tr>
</table>
</div>
<p class="itemGenres mobileGenres"></p>
<p class="itemOverview mobileOverview smoothScrollY"></p>
</div>
<div class="detailButtonsContainer">
<span id="playButtonContainer" style="display: none;">
<paper-button raised class="secondary btnPlay"><iron-icon icon="play-arrow"></iron-icon><span>${ButtonPlay}</span></paper-button>
</span>
<paper-button raised class="submit btnSync"><iron-icon icon="refresh"></iron-icon><span>${ButtonSync}</span></paper-button>
<span id="deleteButtonContainer" style="display: none;">
<paper-button raised class="subdued btnDelete"><iron-icon icon="delete"></iron-icon><span>${ButtonDelete}</span></paper-button>
</span>
</div>
<div data-role="content">
<div class="detailPageContent">
<div id="detailsSection" class="detailSection">
<div class="detailSectionHeader" style="margin-top: 0;">
${HeaderDetails}
</div>
<div class="detailSectionContent" style="padding: 0 1em;">
<p class="recordingStatus"></p>
<p class="airDate"></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -12,7 +12,22 @@
<div data-role="content">
<div class="ehsContent">
<div class="supporterPromotionContainer" style="display:none;text-align: right;">
<div class="customSupporterPromotion supporterPromotion inlineSupporterPromotion">
<a class="btn btnActionAccent" href="supporter.html" style="font-size:14px;">
<div>
${HeaderSyncRequiresSupporterMembership}
</div>
<div>
${HeaderEnjoyDayTrial}
</div>
<div style="font-weight:normal;font-size:90%;margin-top:5px;">
${ButtonLearnMore}
</div>
</a>
</div>
</div>
<div class="ehsContent" style="clear:both;">
<br />
<div class="syncActivity">

View File

@ -119,9 +119,9 @@
Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) {
if (pluginSecurityInfo.IsMBSupporter || context != 'sync' || !AppInfo.enableSupporterMembership) {
$('.syncPromotion', page).hide();
$('.supporterPromotion', page).hide();
} else {
$('.syncPromotion', page).show();
$('.supporterPromotion', page).show();
}
});

View File

@ -1398,7 +1398,7 @@ $(document).on('pageshowready', "#dashboardPage", DashboardPage.onPageShow).on('
Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) {
if (!$('.staticSupporterPromotion', page).length) {
if (!$('.customSupporterPromotion', page).length) {
$('.supporterPromotion', page).remove();
if (!pluginSecurityInfo.IsMBSupporter && AppInfo.enableSupporterMembership) {

View File

@ -614,7 +614,7 @@
var elem = $('#similarCollapsible', page).show();
$('.detailSectionHeader', elem).html(Globalize.translate('HeaderIfYouLikeCheckTheseOut', item.Name));
$('.similiarHeader', elem).html(Globalize.translate('HeaderIfYouLikeCheckTheseOut', item.Name));
var html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
@ -915,14 +915,14 @@
html += '<div class="detailSection">';
html += '<div class="detailSectionHeader" style="position: relative;">';
html += '<h1>';
html += '<span>' + type.name + '</span>';
if (user.Policy.IsAdministrator) {
html += '<a class="detailSectionHeaderButton" href="edititemmetadata.html?tab=2&id=' + currentItem.Id + '" data-role="button" data-icon="edit" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonEdit') + '</a>';
html += '<a class="detailSectionHeaderButton clearLink" style="margin-top:-8px;display:inline-block;" href="edititemmetadata.html?tab=2&id=' + currentItem.Id + '" title="' + Globalize.translate('ButtonEdit') + '" style="display:none;"><paper-icon-button icon="mode-edit"></paper-icon-button></a>';
}
html += '</div>';
html += '</h1>';
html += '<div class="detailSectionContent">';

View File

@ -832,7 +832,7 @@
return "itembynamedetails.html?id=" + id + contextSuffix;
}
if (item.Type == "Recording") {
return "livetvrecording.html?id=" + id + contextSuffix;
return "itemdetails.html?id=" + id;
}
if (item.Type == "MusicArtist") {

View File

@ -4,6 +4,8 @@
function reload(page, providerId) {
Dashboard.showLoadingMsg();
ApiClient.getNamedConfiguration("livetv").done(function (config) {
var info = config.ListingProviders.filter(function (i) {
@ -12,15 +14,64 @@
listingsId = info.ListingsId;
$('#selectListing', page).val(info.ListingsId || '').selectmenu('refresh');
$('#selectCountry', page).val(info.Country || '').selectmenu('refresh');
page.querySelector('.txtZipCode').value = info.ZipCode || '';
$(page.querySelector('.txtZipCode')).trigger('change');
page.querySelector('.txtUser').value = info.Username || '';
page.querySelector('.txtPass').value = info.Username || '';
page.querySelector('.txtZipCode').value = info.ZipCode || '';
setCountry(page, info);
});
}
function setCountry(page, info) {
ApiClient.getJSON(ApiClient.getUrl('LiveTv/ListingProviders/SchedulesDirect/Countries')).done(function (result) {
var countryList = [];
var i, length;
for (var region in result) {
var countries = result[region];
if (countries.length && region !== 'ZZZ') {
for (i = 0, length = countries.length; i < length; i++) {
countryList.push({
name: countries[i].fullName,
value: countries[i].shortName
});
}
}
}
countryList.sort(function (a, b) {
if (a.name > b.name) {
return 1;
}
if (a.name < b.name) {
return -1;
}
// a must be equal to b
return 0;
});
$('#selectCountry', page).html(countryList.map(function (c) {
return '<option value="' + c.value + '">' + c.name + '</option>';
}).join('')).val(info.Country || '').selectmenu('refresh');
$(page.querySelector('.txtZipCode')).trigger('change');
}).fail(function () {
Dashboard.alert({
message: Globalize.translate('ErrorGettingTvLineups')
});
});
Dashboard.hideLoadingMsg();
}
function submitLoginForm(page) {
Dashboard.showLoadingMsg();

View File

@ -1,130 +0,0 @@
(function ($, document) {
var currentItem;
function deleteRecording() {
Dashboard.confirm(Globalize.translate('MessageConfirmRecordingDeletion'), Globalize.translate('HeaderConfirmRecordingDeletion'), function (result) {
if (result) {
Dashboard.showLoadingMsg();
ApiClient.deleteLiveTvRecording(currentItem.Id).done(function () {
Dashboard.alert(Globalize.translate('MessageRecordingDeleted'));
Dashboard.navigate('livetvrecordings.html');
});
}
});
}
function play() {
var userdata = currentItem.UserData || {};
var mediaType = currentItem.MediaType;
LibraryBrowser.showPlayMenu(null, currentItem.Id, currentItem.Type, false, mediaType, userdata.PlaybackPositionTicks);
}
function renderRecording(page, item) {
currentItem = item;
var context = 'livetv';
var name = item.Name;
$('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item));
Dashboard.setPageTitle(name);
$('.itemName', page).html(name);
$('.itemEpisodeName', page).html(item.EpisodeTitle || '');
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item));
$('.userDataIcons', page).html(LibraryBrowser.getUserDataIconsHtml(item));
LibraryBrowser.renderGenres($('.itemGenres', page), item, context);
LibraryBrowser.renderOverview(page.querySelectorAll('.itemOverview'), item);
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
LiveTvHelpers.renderMiscProgramInfo($('.miscTvProgramInfo', page), item);
$(page).trigger('displayingitem', [{
item: item,
context: 'livetv'
}]);
$('.recordingStatus', page).html('Status:&nbsp;&nbsp;&nbsp;' + item.Status);
if (MediaController.canPlay(item)) {
$('#playButtonContainer', page).show();
} else {
$('#playButtonContainer', page).hide();
}
if (item.CanDelete) {
$('#deleteButtonContainer', page).show();
} else {
$('#deleteButtonContainer', page).hide();
}
LiveTvHelpers.renderOriginalAirDate($('.airDate', page), item);
Dashboard.hideLoadingMsg();
Dashboard.getCurrentUser().done(function(user) {
if (SyncManager.isAvailable(item, user)) {
$('.btnSync', page).removeClass('hide');
} else {
$('.btnSync', page).addClass('hide');
}
});
}
function reload(page) {
Dashboard.showLoadingMsg();
var id = getParameterByName('id');
ApiClient.getLiveTvRecording(id, Dashboard.getCurrentUserId()).done(function (result) {
renderRecording(page, result);
});
}
$(document).on('pageinitdepends', "#liveTvRecordingPage", function () {
var page = this;
$('.btnDelete', page).on('click', deleteRecording);
$('.btnPlay', page).on('click', play);
$('.btnSync', page).on('click', function () {
SyncManager.showMenu({
items: [currentItem]
});
});
}).on('pagebeforeshowready', "#liveTvRecordingPage", function () {
var page = this;
reload(page);
}).on('pagebeforehide', "#liveTvRecordingPage", function () {
currentItem = null;
});
})(jQuery, document);

View File

@ -88,8 +88,6 @@
}).done(function (result) {
renderRecordings($('#latestRecordings', page), result.Items);
LibraryBrowser.setLastRefreshed(page);
});
ApiClient.getLiveTvRecordingGroups({

View File

@ -103,8 +103,6 @@
ApiClient.getLiveTvTimers().done(function (result) {
renderTimers(page, result.Items);
LibraryBrowser.setLastRefreshed(page);
});
}

View File

@ -296,9 +296,9 @@
Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) {
if (pluginSecurityInfo.IsMBSupporter || !AppInfo.enableSupporterMembership) {
$('.syncPromotion', page).hide();
$('.supporterPromotionContainer', hide).show();
} else {
$('.syncPromotion', page).show();
$('.supporterPromotionContainer', page).show();
}
});

View File

@ -20,18 +20,20 @@
<progress max="100" min="0" style="width:100px;display:none;" class="syncProgress"></progress>
</div>
<br />
<div class="staticSupporterPromotion supporterPromotion syncPromotion" style="display:none;">
<a class="btn btnActionAccent" href="supporter.html" style="font-size:14px;">
<div>
${HeaderSyncRequiresSupporterMembership}
</div>
<div>
${HeaderEnjoyDayTrial}
</div>
<div style="font-weight:normal;font-size:90%;margin-top:5px;">
${ButtonLearnMore}
</div>
</a>
<div class="supporterPromotionContainer" style="display:none;">
<div class="customSupporterPromotion supporterPromotion">
<a class="btn btnActionAccent" href="supporter.html" style="font-size:14px;">
<div>
${HeaderSyncRequiresSupporterMembership}
</div>
<div>
${HeaderEnjoyDayTrial}
</div>
<div style="font-weight:normal;font-size:90%;margin-top:5px;">
${ButtonLearnMore}
</div>
</a>
</div>
</div>
<div class="syncActivity">