live tv updates

This commit is contained in:
Luke Pulverenti 2015-04-11 21:38:38 -04:00
parent 16c69c903b
commit f41b336e87
15 changed files with 196 additions and 101 deletions

View File

@ -88,8 +88,8 @@
}*/ }*/
.ui-page-theme-b .visualCardBox { .ui-page-theme-b .visualCardBox {
background: rgb(51, 51, 51); background: rgba(45,45,45,.85);
border: 1px solid rgb(31, 31, 31); border: 1px solid #1f1f1f;
border-radius: 3px; border-radius: 3px;
} }
@ -365,10 +365,6 @@
@media all and (min-width: 1600px) { @media all and (min-width: 1600px) {
.squareCard {
width: 12.5%;
}
.portraitCard { .portraitCard {
width: 12.5%; width: 12.5%;
} }
@ -386,7 +382,7 @@
@media all and (min-width: 1800px) { @media all and (min-width: 1800px) {
.squareCard { .squareCard {
width: 10%; width: 12.5%;
} }
.portraitCard { .portraitCard {
@ -398,8 +394,19 @@
} }
} }
@media all and (min-width: 1920px) {
.squareCard {
width: 11.111111111111111111111111111111%;
}
}
@media all and (min-width: 2200px) { @media all and (min-width: 2200px) {
.squareCard {
width: 10%;
}
.backdropCard { .backdropCard {
width: 16.666666666666666666666666666667%; width: 16.666666666666666666666666666667%;
} }

View File

@ -6,7 +6,7 @@
.tvProgram { .tvProgram {
display: block; display: block;
text-decoration: none; text-decoration: none;
font-weight: normal!important; font-weight: normal !important;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
} }
@ -173,13 +173,13 @@
} }
.channelTimeslotHeader { .channelTimeslotHeader {
border-right: 1px solid #4971A7; border-right: 1px solid #38c;
} }
.channelTimeslotHeader, .timeslotHeader { .channelTimeslotHeader, .timeslotHeader {
background: #4971A7; background: #38c;
border-bottom: 1px solid #4971A7; border-bottom: 1px solid #38c;
border-left: 1px solid #4971A7; border-left: 1px solid #38c;
} }
.timeslotHeader, .channelTimeslotHeader { .timeslotHeader, .channelTimeslotHeader {
@ -190,8 +190,8 @@
padding: .5em .5em; padding: .5em .5em;
display: block; display: block;
text-decoration: none; text-decoration: none;
font-weight: normal!important; font-weight: normal !important;
color: #fff!important; color: #fff !important;
position: relative; position: relative;
} }
@ -228,8 +228,8 @@
top: 0; top: 0;
display: block; display: block;
text-decoration: none; text-decoration: none;
font-weight: normal!important; font-weight: normal !important;
color: #fff!important; color: #fff !important;
} }
.timeslotCellInnerWithProgram { .timeslotCellInnerWithProgram {
@ -278,60 +278,74 @@
@media (min-height: 500px) { @media (min-height: 500px) {
.channelList, .programGrid { .channelList, .programGrid {
height: 290px; height: 360px;
} }
} }
@media (min-height: 600px) { @media (min-height: 600px) {
.channelList, .programGrid { .channelList, .programGrid {
height: 390px; height: 400px;
} }
} }
@media (min-height: 700px) { @media (min-height: 700px) {
.channelList, .programGrid { .channelList, .programGrid {
height: 490px; height: 500px;
} }
} }
@media (min-height: 800px) { @media (min-height: 800px) {
.channelList, .programGrid { .channelList, .programGrid {
height: 590px; height: 600px;
} }
} }
@media (min-height: 900px) { @media (min-height: 900px) {
.channelList, .programGrid { .channelList, .programGrid {
height: 690px; height: 700px;
} }
} }
@media (min-height: 1000px) { @media (min-height: 1000px) {
.channelList, .programGrid { .channelList, .programGrid {
height: 790px; height: 800px;
} }
} }
@media (min-height: 1100px) { @media (min-height: 1100px) {
.channelList, .programGrid { .channelList, .programGrid {
height: 890px; height: 900px;
} }
} }
@media (min-height: 1200px) { @media (min-height: 1200px) {
.channelList, .programGrid { .channelList, .programGrid {
height: 950px; height: 1000px;
} }
} }
@media (max-width: 600px) { @media (min-height: 1300px) {
.channelList, .programGrid {
height: 1100px;
}
}
@media (min-height: 1400px) {
.channelList, .programGrid {
height: 1200px;
}
}
@media (max-width: 800px) {
.guideChannelImage { .guideChannelImage {
display: none; display: none;
@ -340,4 +354,12 @@
.timerPageImageContainer { .timerPageImageContainer {
display: none !important; display: none !important;
} }
}
.channelHeaderCell, .channelTimeslotHeader {
width: 89px;
}
.programGrid, .timeslotHeaders {
margin-left: 90px;
}
}

View File

@ -13,15 +13,12 @@
<a href="livetvtimers.html">${TabScheduled}</a> <a href="livetvtimers.html">${TabScheduled}</a>
<a href="livetvseriestimers.html">${TabSeries}</a> <a href="livetvseriestimers.html">${TabSeries}</a>
</div> </div>
<div data-role="content" style="padding-top: 5px;"> <div data-role="content" style="padding-top: 5px;padding-left:0!important;padding-right:0!important;">
<div> <div>
<div class="viewSettings"> <div class="viewSettings">
<select id="selectDate" data-mini="true" data-icon="calendar" data-inline="true"> <select id="selectDate" data-mini="true" data-inline="true">
</select> </select>
<div style="display: inline-block; vertical-align: middle;">
${HeaderChannels}
</div>
<div style="display: inline-block; vertical-align: middle;" class="channelPaging"> <div style="display: inline-block; vertical-align: middle;" class="channelPaging">
</div> </div>
</div> </div>

View File

@ -28,7 +28,7 @@
<div style="display: none;" id="eligibleForSeriesFields"> <div style="display: none;" id="eligibleForSeriesFields">
<p> <p>
<input type="checkbox" data-mini="true" id="chkRecordSeries" /> <input type="checkbox" id="chkRecordSeries" />
<label for="chkRecordSeries">${OptionRecordSeries}</label> <label for="chkRecordSeries">${OptionRecordSeries}</label>
</p> </p>
<br /> <br />
@ -38,39 +38,39 @@
<h3>${HeaderDays}</h3> <h3>${HeaderDays}</h3>
<div data-role="controlgroup"> <div data-role="controlgroup">
<input type="checkbox" data-mini="true" id="chkSunday" /> <input type="checkbox" id="chkSunday" />
<label for="chkSunday">${OptionSunday}</label> <label for="chkSunday">${OptionSunday}</label>
<input type="checkbox" data-mini="true" id="chkMonday" /> <input type="checkbox" id="chkMonday" />
<label for="chkMonday">${OptionMonday}</label> <label for="chkMonday">${OptionMonday}</label>
<input type="checkbox" data-mini="true" id="chkTuesday" /> <input type="checkbox" id="chkTuesday" />
<label for="chkTuesday">${OptionTuesday}</label> <label for="chkTuesday">${OptionTuesday}</label>
<input type="checkbox" data-mini="true" id="chkWednesday" /> <input type="checkbox" id="chkWednesday" />
<label for="chkWednesday">${OptionWednesday}</label> <label for="chkWednesday">${OptionWednesday}</label>
<input type="checkbox" data-mini="true" id="chkThursday" /> <input type="checkbox" id="chkThursday" />
<label for="chkThursday">${OptionThursday}</label> <label for="chkThursday">${OptionThursday}</label>
<input type="checkbox" data-mini="true" id="chkFriday" /> <input type="checkbox" id="chkFriday" />
<label for="chkFriday">${OptionFriday}</label> <label for="chkFriday">${OptionFriday}</label>
<input type="checkbox" data-mini="true" id="chkSaturday" /> <input type="checkbox" id="chkSaturday" />
<label for="chkSaturday">${OptionSaturday}</label> <label for="chkSaturday">${OptionSaturday}</label>
</div> </div>
</li> </li>
<li> <li>
<label for="chkNewOnly">${OptionRecordOnlyNewEpisodes}</label> <h3>${HeaderRepeatingOptions}</h3>
<input type="checkbox" id="chkNewOnly" data-mini="true" /> <div data-role="controlgroup">
</li>
<li> <label for="chkNewOnly">${OptionRecordOnlyNewEpisodes}</label>
<label for="chkAnyTime">${OptionRecordAnytime}</label> <input type="checkbox" id="chkNewOnly" />
<input type="checkbox" id="chkAnyTime" data-mini="true" /> <label for="chkAnyTime">${OptionRecordAnytime}</label>
</li> <input type="checkbox" id="chkAnyTime" />
<li> <label for="chkAllChannels">${OptionRecordOnAllChannels}</label>
<label for="chkAllChannels">${OptionRecordOnAllChannels}</label> <input type="checkbox" id="chkAllChannels" />
<input type="checkbox" id="chkAllChannels" data-mini="true" /> </div>
</li> </li>
</ul> </ul>
</div> </div>
@ -106,10 +106,10 @@
<br /> <br />
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li> <li>
<button type="submit" data-theme="b" data-icon="check" data-mini="true"> <button type="submit" data-theme="a" data-icon="check">
${ButtonRecord} ${ButtonRecord}
</button> </button>
<button id="btnCancel" type="button" data-icon="delete" data-mini="true"> <button id="btnCancel" type="button" data-icon="delete">
${ButtonCancel} ${ButtonCancel}
</button> </button>
</li> </li>

View File

@ -14,7 +14,7 @@
<a href="livetvseriestimers.html">${TabSeries}</a> <a href="livetvseriestimers.html">${TabSeries}</a>
</div> </div>
<div data-role="content"> <div data-role="content">
<div class="viewSettings"> <div class="viewSettings" style="margin:.5em 0;">
<h1 class="listName" style="margin: 0 1em 0 0; display: inline-block; vertical-align: middle;"></h1> <h1 class="listName" style="margin: 0 1em 0 0; display: inline-block; vertical-align: middle;"></h1>
@ -23,7 +23,7 @@
<div class="listTopPaging"> <div class="listTopPaging">
</div> </div>
</div> </div>
<div id="items" class="itemsContainer"></div> <div id="items" class="itemsContainer" style="text-align:center;"></div>
</div> </div>
</div> </div>
</body> </body>

View File

@ -17,12 +17,12 @@
<div class="ehsContent"> <div class="ehsContent">
<div id="activeRecordings" style="display: none;"> <div id="activeRecordings" style="display: none;">
<h1 class="listHeader">${HeaderActiveRecordings}</h1> <h1 class="listHeader">${HeaderActiveRecordings}</h1>
<div class="recordingItems"></div> <div class="recordingItems itemsContainer"></div>
<br /> <br />
</div> </div>
<div id="latestRecordings" style="display: none;"> <div id="latestRecordings" style="display: none;">
<h1 class="listHeader">${HeaderLatestRecordings}</h1> <h1 class="listHeader">${HeaderLatestRecordings}</h1>
<div class="recordingItems"></div> <div class="recordingItems itemsContainer"></div>
<br /> <br />
</div> </div>
<div id="recordingGroups" style="display: none;"> <div id="recordingGroups" style="display: none;">

View File

@ -37,39 +37,39 @@
<h3>${HeaderDays}</h3> <h3>${HeaderDays}</h3>
<div data-role="controlgroup"> <div data-role="controlgroup">
<input type="checkbox" data-mini="true" id="chkSunday" /> <input type="checkbox" id="chkSunday" />
<label for="chkSunday">${OptionSunday}</label> <label for="chkSunday">${OptionSunday}</label>
<input type="checkbox" data-mini="true" id="chkMonday" /> <input type="checkbox" id="chkMonday" />
<label for="chkMonday">${OptionMonday}</label> <label for="chkMonday">${OptionMonday}</label>
<input type="checkbox" data-mini="true" id="chkTuesday" /> <input type="checkbox" id="chkTuesday" />
<label for="chkTuesday">${OptionTuesday}</label> <label for="chkTuesday">${OptionTuesday}</label>
<input type="checkbox" data-mini="true" id="chkWednesday" /> <input type="checkbox" id="chkWednesday" />
<label for="chkWednesday">${OptionWednesday}</label> <label for="chkWednesday">${OptionWednesday}</label>
<input type="checkbox" data-mini="true" id="chkThursday" /> <input type="checkbox" id="chkThursday" />
<label for="chkThursday">${OptionThursday}</label> <label for="chkThursday">${OptionThursday}</label>
<input type="checkbox" data-mini="true" id="chkFriday" /> <input type="checkbox" id="chkFriday" />
<label for="chkFriday">${OptionFriday}</label> <label for="chkFriday">${OptionFriday}</label>
<input type="checkbox" data-mini="true" id="chkSaturday" /> <input type="checkbox" id="chkSaturday" />
<label for="chkSaturday">${OptionSaturday}</label> <label for="chkSaturday">${OptionSaturday}</label>
</div> </div>
</li> </li>
<li> <li>
<label for="chkNewOnly">${OptionRecordOnlyNewEpisodes}</label> <h3>${HeaderRepeatingOptions}</h3>
<input type="checkbox" id="chkNewOnly" data-mini="true" /> <div data-role="controlgroup">
</li>
<li> <label for="chkNewOnly">${OptionRecordOnlyNewEpisodes}</label>
<label for="chkAnyTime">${OptionRecordAnytime}</label> <input type="checkbox" id="chkNewOnly" />
<input type="checkbox" id="chkAnyTime" data-mini="true" /> <label for="chkAnyTime">${OptionRecordAnytime}</label>
</li> <input type="checkbox" id="chkAnyTime" />
<li> <label for="chkAllChannels">${OptionRecordOnAllChannels}</label>
<label for="chkAllChannels">${OptionRecordOnAllChannels}</label> <input type="checkbox" id="chkAllChannels" />
<input type="checkbox" id="chkAllChannels" data-mini="true" /> </div>
</li> </li>
</ul> </ul>
<div data-role="collapsible" data-mini="true"> <div data-role="collapsible" data-mini="true">
@ -101,10 +101,10 @@
</div> </div>
<br /> <br />
<div> <div>
<button type="submit" data-theme="a" data-icon="check" data-mini="true"> <button type="submit" data-theme="a" data-icon="check">
${ButtonSave} ${ButtonSave}
</button> </button>
<button type="button" onclick="history.back();" data-icon="delete" data-mini="true"> <button type="button" onclick="history.back();" data-icon="delete">
${ButtonCancel} ${ButtonCancel}
</button> </button>
</div> </div>

View File

@ -24,6 +24,13 @@
</div> </div>
</div> </div>
<div id="playlists" style="display: none;" class="homePageSection">
<h1 class="listHeader">${HeaderPlaylists}</h1>
<div class="itemsContainer fullWidthItemsContainer" style="text-align:left;">
</div>
</div>
<div id="recentlyPlayed" style="display: none;" class="homePageSection"> <div id="recentlyPlayed" style="display: none;" class="homePageSection">
<h1 class="listHeader">${HeaderRecentlyPlayed}</h1> <h1 class="listHeader">${HeaderRecentlyPlayed}</h1>

View File

@ -2,7 +2,8 @@
var query = { var query = {
StartIndex: 0 StartIndex: 0,
EnableFavoriteSorting: true
}; };
function getChannelsHtml(channels) { function getChannelsHtml(channels) {

View File

@ -12,7 +12,8 @@
var channelQuery = { var channelQuery = {
StartIndex: 0, StartIndex: 0,
Limit: 20 Limit: 20,
EnableFavoriteSorting: true
}; };
var channelsPromise; var channelsPromise;

View File

@ -1,6 +1,6 @@
(function ($, document) { (function ($, document) {
var view = LibraryBrowser.getDefaultItemsView('PosterCard', 'PosterCard'); var view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
var currentDate = new Date(); var currentDate = new Date();
currentDate.setHours(0, 0, 0, 0); currentDate.setHours(0, 0, 0, 0);
@ -14,7 +14,7 @@
}; };
function getSavedQueryKey() { function getSavedQueryKey() {
return 'livetvitems' + (query.ParentId || ''); return 'livetvitems2' + (query.ParentId || '');
} }
function updateFilterControls(page) { function updateFilterControls(page) {
@ -72,8 +72,6 @@
}); });
} }
$('.itemsContainer', page).html(html).lazyChildren();
var elem = $('.itemsContainer', page).html(html).lazyChildren(); var elem = $('.itemsContainer', page).html(html).lazyChildren();
$(pagingHtml).appendTo(elem).trigger('create'); $(pagingHtml).appendTo(elem).trigger('create');

View File

@ -58,9 +58,10 @@
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
overlayText: screenWidth >= 600, overlayText: screenWidth >= 600,
coverImage: true coverImage: true,
lazy: true
})); })).lazyChildren();
} }
function reload(page) { function reload(page) {

View File

@ -8,7 +8,7 @@
userId: Dashboard.getCurrentUserId(), userId: Dashboard.getCurrentUserId(),
IsAiring: true, IsAiring: true,
limit: 16 limit: 18
}).done(function (result) { }).done(function (result) {
@ -32,7 +32,7 @@
userId: Dashboard.getCurrentUserId(), userId: Dashboard.getCurrentUserId(),
IsAiring: false, IsAiring: false,
HasAired: false, HasAired: false,
limit: 10, limit: 9,
IsMovie: false, IsMovie: false,
IsSports: false IsSports: false
@ -58,7 +58,7 @@
userId: Dashboard.getCurrentUserId(), userId: Dashboard.getCurrentUserId(),
IsAiring: false, IsAiring: false,
HasAired: false, HasAired: false,
limit: 10, limit: 9,
IsMovie: true IsMovie: true
}).done(function (result) { }).done(function (result) {
@ -66,7 +66,7 @@
var html = LibraryBrowser.getPosterViewHtml({ var html = LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "auto", shape: "auto",
showTitle: true, showTitle: false,
coverImage: true, coverImage: true,
overlayText: false, overlayText: false,
lazy: true lazy: true
@ -80,7 +80,7 @@
userId: Dashboard.getCurrentUserId(), userId: Dashboard.getCurrentUserId(),
IsAiring: false, IsAiring: false,
HasAired: false, HasAired: false,
limit: 10, limit: 9,
IsSports: true IsSports: true
}).done(function (result) { }).done(function (result) {
@ -88,7 +88,7 @@
var html = LibraryBrowser.getPosterViewHtml({ var html = LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "auto", shape: "auto",
showTitle: true, showTitle: false,
coverImage: true, coverImage: true,
overlayText: false, overlayText: false,
lazy: true lazy: true

View File

@ -1,16 +1,12 @@
(function ($, document) { (function ($, document) {
$(document).on('pagebeforeshow', "#musicRecommendedPage", function () { function loadLatest(page, parentId) {
var userId = Dashboard.getCurrentUserId(); var userId = Dashboard.getCurrentUserId();
var page = this;
var parentId = LibraryMenu.getTopParentId();
var options = { var options = {
IncludeItemTypes: "Audio", IncludeItemTypes: "Audio",
Limit: 20, Limit: 9,
Fields: "PrimaryImageAspectRatio,SyncInfo", Fields: "PrimaryImageAspectRatio,SyncInfo",
ParentId: parentId, ParentId: parentId,
ImageTypeLimit: 1, ImageTypeLimit: 1,
@ -26,17 +22,22 @@
shape: "square", shape: "square",
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
lazy: true lazy: true,
cardLayout: true
})).lazyChildren(); })).lazyChildren();
}); });
}
options = { function loadRecentlyPlayed(page, parentId) {
var options = {
SortBy: "DatePlayed", SortBy: "DatePlayed",
SortOrder: "Descending", SortOrder: "Descending",
IncludeItemTypes: "Audio", IncludeItemTypes: "Audio",
Limit: 10, Limit: 9,
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio,AudioInfo,SyncInfo", Fields: "PrimaryImageAspectRatio,AudioInfo,SyncInfo",
Filters: "IsPlayed", Filters: "IsPlayed",
@ -60,18 +61,23 @@
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
defaultAction: 'play', defaultAction: 'play',
lazy: true lazy: true,
cardLayout: true
})).lazyChildren(); })).lazyChildren();
}); });
options = { }
function loadFrequentlyPlayed(page, parentId) {
var options = {
SortBy: "PlayCount", SortBy: "PlayCount",
SortOrder: "Descending", SortOrder: "Descending",
IncludeItemTypes: "Audio", IncludeItemTypes: "Audio",
Limit: 20, Limit: 9,
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio,AudioInfo,SyncInfo", Fields: "PrimaryImageAspectRatio,AudioInfo,SyncInfo",
Filters: "IsPlayed", Filters: "IsPlayed",
@ -95,12 +101,64 @@
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
defaultAction: 'play', defaultAction: 'play',
lazy: true lazy: true,
cardLayout: true
})).lazyChildren(); })).lazyChildren();
}); });
}
function loadPlaylists(page, parentId) {
var options = {
SortBy: "SortName",
SortOrder: "Ascending",
IncludeItemTypes: "Playlist",
Recursive: true,
ParentId: parentId,
Fields: "PrimaryImageAspectRatio,SortName,CumulativeRunTimeTicks,CanDelete,SyncInfo",
StartIndex: 0,
Limit: 9
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
var elem;
if (result.Items.length) {
elem = $('#playlists', page).show();
} else {
elem = $('#playlists', page).hide();
}
$('.itemsContainer', elem).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "square",
showTitle: true,
lazy: true,
coverImage: true,
showItemCounts: true,
cardLayout: true
})).lazyChildren();
});
}
$(document).on('pagebeforeshow', "#musicRecommendedPage", function () {
var parentId = LibraryMenu.getTopParentId();
var page = this;
loadLatest(page, parentId);
loadPlaylists(page, parentId);
loadRecentlyPlayed(page, parentId);
loadFrequentlyPlayed(page, parentId);
}); });

View File

@ -212,6 +212,9 @@
supportsPlaylists: function (item) { supportsPlaylists: function (item) {
if (item.Type == 'Program') {
return false;
}
return item.RunTimeTicks || item.IsFolder || item.Type == "Genre" || item.Type == "MusicGenre" || item.Type == "MusicArtist"; return item.RunTimeTicks || item.IsFolder || item.Type == "Genre" || item.Type == "MusicGenre" || item.Type == "MusicArtist";
} }
}; };