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

live tv updates

This commit is contained in:
Luke Pulverenti 2013-12-21 13:37:34 -05:00
parent 97a67a7cf8
commit ac4c65ac9a
23 changed files with 318 additions and 156 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

View file

@ -113,7 +113,7 @@
} }
.libraryPage, .libraryPage .itemListContent { .libraryPage, .libraryPage .itemListContent {
background: #494949 url(images/bgflip.png) repeat-x!important; background: #252525 repeat-x!important;
background-attachment: fixed!important; background-attachment: fixed!important;
} }
@ -123,7 +123,8 @@
.listHeader { .listHeader {
margin-top: .5em; margin-top: .5em;
margin-bottom: 5px; margin-bottom: 0;
padding-left: 4px;
} }
.libraryViewNav { .libraryViewNav {
@ -149,7 +150,7 @@
} }
.ehsContent { .ehsContent {
max-width: 600px; max-width: 620px;
margin: 0 auto; margin: 0 auto;
padding: 0; padding: 0;
border-spacing: 0; border-spacing: 0;
@ -344,6 +345,10 @@ a.itemTag:hover {
left: .8em; left: .8em;
} }
.itemCommunityRating + .userDataIcons {
margin-left: 1.5em;
}
.itemBackdrop { .itemBackdrop {
background-size: cover; background-size: cover;
background-position: center 15%; background-position: center 15%;
@ -408,6 +413,11 @@ a.itemTag:hover {
box-shadow: 0px 0 20px #000; box-shadow: 0px 0 20px #000;
border: solid 1px #222; border: solid 1px #222;
margin-top: -20px; margin-top: -20px;
margin-bottom: 5px;
}
.noBackdrop .itemDetailImage {
margin-top: 0;
} }
.itemDetailGalleryLink img:hover { .itemDetailGalleryLink img:hover {
@ -447,6 +457,17 @@ a.itemTag:hover {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.mobileOverview {
display: none;
padding: 0 .5em;
max-height: initial;
}
.mobileGenres {
display: none;
padding: 0 .5em;
}
.libraryPage ::-webkit-scrollbar { .libraryPage ::-webkit-scrollbar {
width: 12px; width: 12px;
height: 12px; height: 12px;
@ -476,8 +497,8 @@ a.itemTag:hover {
padding: .5em .75em; padding: .5em .75em;
font-size: 16px; font-size: 16px;
font-weight: normal; font-weight: normal;
border: 1px solid #181818; border: 1px solid #000;
background: #222; background: #111;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
@ -509,20 +530,55 @@ a.itemTag:hover {
.itemBackdrop { .itemBackdrop {
background-image: none!important; background-image: none!important;
height: 510px; height: auto;
}
.itemImageContainer {
position: absolute;
top: -230px;
margin: 0 auto 0 -20px;
text-align: center;
left: 0;
width: 100%;
} }
.noBackdrop { .noBackdrop {
height: 510px; height: auto;
}
.itemBackdropContent {
position: static;
padding: 1em 1em 0;
background-color: transparent;
}
.parentName {
position: static;
}
.itemDetailImage {
max-height: 240px;
max-width: 100px;
margin-top: 0;
}
.mobileOverview, .mobileGenres {
display: block;
}
.desktopOverview, .desktopGenres {
display: none;
}
.inlineItemName {
font-size: 18px;
}
.inlineItemName + .itemMiscInfo {
margin-left: 0!important;
margin-top: 1em;
display: block!important;
}
.primaryDetailPageContent p:first-child {
margin-top: 0;
}
.primaryDetailPageContent .userDataIcons {
margin-left: 0!important;
margin-top: 1.5em;
display: block;
} }
} }
@ -585,7 +641,7 @@ a.itemTag:hover {
@media all and (min-width: 1000px) { @media all and (min-width: 1000px) {
.ehsContent { .ehsContent {
max-width: 800px; max-width: 820px;
} }
.detailPageContent { .detailPageContent {
@ -593,14 +649,14 @@ a.itemTag:hover {
} }
.primaryDetailPageContent { .primaryDetailPageContent {
max-width: 800px; max-width: 850px;
} }
} }
@media all and (min-width: 1200px) { @media all and (min-width: 1200px) {
.ehsContent { .ehsContent {
max-width: 940px; max-width: 950px;
} }
.detailPageContent { .detailPageContent {
@ -608,7 +664,7 @@ a.itemTag:hover {
} }
.primaryDetailPageContent { .primaryDetailPageContent {
max-width: 800px; max-width: 900px;
} }
} }
@ -623,7 +679,7 @@ a.itemTag:hover {
} }
.ehsContent { .ehsContent {
max-width: 1070px; max-width: 1080px;
} }
} }
@ -649,7 +705,6 @@ a.itemTag:hover {
.itemMiscInfo { .itemMiscInfo {
color: #ddd; color: #ddd;
white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
@ -818,10 +873,10 @@ a.itemTag:hover {
.alphabetPicker { .alphabetPicker {
position: fixed; position: fixed;
right: 2px; right: 1px;
bottom: 0; bottom: 0;
top: 100px; top: 100px;
width: 27px; width: 20px;
z-index: 1000; z-index: 1000;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
@ -853,7 +908,7 @@ a.itemTag:hover {
} }
.itemsContainerWithAlphaPicker { .itemsContainerWithAlphaPicker {
margin-right: 27px; margin-right: 10px;
} }
} }

View file

@ -81,3 +81,41 @@
.tvProgram:hover, .tvProgram:hover .tvProgramInfo { .tvProgram:hover, .tvProgram:hover .tvProgramInfo {
background-color: #4d90fe; background-color: #4d90fe;
} }
.timerCircle {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
background: #cc0000;
vertical-align: top;
border: 1px solid #cc3333;
margin-left: 1em;
}
.seriesTimerCircle {
position: relative;
margin-left: 0;
left: 30px;
opacity: .3;
margin-left: 1em;
}
.seriesTimerCircle + .seriesTimerCircle {
opacity: .65;
left: 0;
margin-left: 0;
}
.seriesTimerCircle + .seriesTimerCircle + .seriesTimerCircle {
opacity: 1;
left: -30px;
margin-left: 0;
}
.channelImageContainer .itemDetailImage {
max-width: 160px;
max-height: 100px;
margin-top: 1em;
margin-bottom: 1em;
}

View file

@ -1,5 +1,5 @@
.posterItem { .posterItem {
margin: 3px; margin: 6px;
text-shadow: none; text-shadow: none;
font-weight: normal!important; font-weight: normal!important;
display: inline-block; display: inline-block;
@ -8,7 +8,6 @@
text-decoration: none; text-decoration: none;
text-align: left; text-align: left;
overflow: hidden; overflow: hidden;
border: 1px solid #555;
} }
.posterItem:hover { .posterItem:hover {
@ -46,14 +45,17 @@
padding-left: 2px; padding-left: 2px;
} }
.posterItemTextContainer {
}
.posterItemText { .posterItemText {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
text-wrap: none; text-wrap: none;
white-space: nowrap; white-space: nowrap;
padding: 5px 4px 4px; padding: 6px 5px 5px;
background: #181818; background: #111;
text-shadow: none; text-shadow: none;
} }
@ -63,7 +65,6 @@
.posterItemText + .posterItemText { .posterItemText + .posterItemText {
padding-top: 2px; padding-top: 2px;
border-top: 0;
} }
.posterItemText + .posterItemProgress { .posterItemText + .posterItemProgress {
@ -122,11 +123,6 @@
.portraitPosterItem { .portraitPosterItem {
width: 100px; width: 100px;
border-color: #555;
}
.smallBackdropPosterItem {
border-color: #555;
} }
.portraitPosterItem .posterItemImage { .portraitPosterItem .posterItemImage {

View file

@ -716,7 +716,7 @@ progress {
.imgUserItemRating { .imgUserItemRating {
height: 16px; height: 16px;
width: 16px; width: 16px;
margin-right: 1em; margin-right: .75em;
cursor: pointer; cursor: pointer;
vertical-align: top; vertical-align: top;
} }

View file

@ -1,5 +1,5 @@
.tileItem { .tileItem {
background: #333; background: #1e1e1e;
padding: 10px 7px 5px; padding: 10px 7px 5px;
margin: 3px 0; margin: 3px 0;
font-weight: normal!important; font-weight: normal!important;
@ -38,7 +38,7 @@
} }
.defaultTileImage { .defaultTileImage {
background-color: #999; background-color: #555;
} }
.tileItem p { .tileItem p {

View file

@ -126,15 +126,16 @@
<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> <p>
<span class="itemCommunityRating"></span> <span class="itemCommunityRating"></span>
<span class="userDataIcons" style="margin-left: 2em;"></span> <span class="userDataIcons"></span>
</p> </p>
<p class="itemGenres"></p> <p class="itemGenres"></p>
<p class="itemOverview"></p> <p class="itemOverview desktopOverview"></p>
<p id="itemBirthday"></p> <p id="itemBirthday"></p>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<p class="itemOverview mobileOverview"></p>
</div> </div>
<div class="ui-body-a" style="text-align: center; padding: .25em 0 .5em;"> <div class="ui-body-a" style="text-align: center; padding: .25em 0 .5em;">
<span id="playButtonContainer" style="display: none;"> <span id="playButtonContainer" style="display: none;">

View file

@ -117,17 +117,19 @@
<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> <p>
<span class="itemCommunityRating"></span> <span class="itemCommunityRating"></span>
<span class="userDataIcons" style="margin-left: 2em;"></span> <span class="userDataIcons"></span>
</p> </p>
<p id="artist"></p> <p id="artist"></p>
<p class="itemGenres"></p> <p class="itemGenres desktopGenres"></p>
<p class="itemOverview"></p> <p class="itemOverview desktopOverview"></p>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<a href="#" id="lnkPreviousItem" class="lnkPreviousItem lnkSibling hide">← Previous</a> <a href="#" id="lnkPreviousItem" class="lnkPreviousItem lnkSibling hide">← Previous</a>
<a href="#" id="lnkNextItem" class="lnkNextItem lnkSibling hide">Next →</a> <a href="#" id="lnkNextItem" class="lnkNextItem lnkSibling hide">Next →</a>
<p class="itemGenres mobileGenres"></p>
<p class="itemOverview mobileOverview"></p>
</div> </div>
<div class="ui-body-a" style="text-align: center; padding: .25em 0 .5em;"> <div class="ui-body-a" style="text-align: center; padding: .25em 0 .5em;">
<span id="missingIndicator" style="margin-left: .5em; display: none;"> <span id="missingIndicator" style="margin-left: .5em; display: none;">

View file

@ -12,24 +12,20 @@
<a href="livetvtimers.html">Schedule</a> <a href="livetvtimers.html">Schedule</a>
<a href="livetvseriestimers.html">Series</a> <a href="livetvseriestimers.html">Series</a>
</div> </div>
<div id="itemBackdrop" class="itemBackdrop noBackdrop"> <table class="detailPageContent primaryDetailPageContent">
<div class="itemBackdropContent"> <tr>
<table class="detailPageContent primaryDetailPageContent"> <td style="vertical-align: top; padding: 0 1em 0 0;">
<tr> <div id="itemImage" class="itemImageContainer channelImageContainer"></div>
<td style="vertical-align: top; padding: 0 1em 0 0;"> </td>
<div id="itemImage" class="itemImageContainer"></div> <td style="vertical-align: top; padding: 0;">
</td> <p><span class="itemName inlineItemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p>
<td style="vertical-align: top; padding: 0;"> <p class="itemChannelNumber"></p>
<p><span class="itemName inlineItemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p> <p style="margin: 2em 0;">
<p class="itemChannelNumber"></p> <span class="userDataIcons"></span>
<p style="margin: 2em 0;"> </p>
<span class="userDataIcons"></span> </td>
</p> </tr>
</td> </table>
</tr>
</table>
</div>
</div>
<div class="ui-body-a" style="text-align: center; padding: .25em 0 .5em;"> <div class="ui-body-a" style="text-align: center; padding: .25em 0 .5em;">
<span id="playButtonContainer" style="display: none;"> <span id="playButtonContainer" style="display: none;">
<button id="btnPlay" type="button" data-icon="play" data-inline="true" data-mini="true">Play</button> <button id="btnPlay" type="button" data-icon="play" data-inline="true" data-mini="true">Play</button>

View file

@ -22,27 +22,27 @@
<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 class="itemEpisodeName"></p>
<p class="itemMiscInfo miscTvProgramInfo"></p>
<p> <p>
<span class="itemCommunityRating"></span> <span class="itemCommunityRating"></span>
<span class="userDataIcons"></span> <span class="userDataIcons"></span>
</p> </p>
<p class="itemGenres"></p> <p class="itemGenres desktopGenres"></p>
<p class="itemOverview"></p> <p class="itemOverview desktopOverview"></p>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<p class="itemGenres mobileGenres"></p>
<p class="itemOverview mobileOverview"></p>
</div> </div>
<div class="ui-body-a" style="text-align: center; padding: .25em 0 .5em;"> <div class="ui-body-a" style="text-align: center; padding: .25em 0 .5em;">
<span id="playButtonContainer" style="display: none;"> <span id="recordButtonContainer" style="display: none;">
<button id="btnPlay" type="button" data-icon="play" data-inline="true" data-mini="true">Play</button> <button id="btnRecord" type="button" data-icon="facetime-video" data-inline="true" data-mini="true">Record</button>
</span> </span>
<span> <span>
<button id="btnRemote" type="button" data-icon="hand-up" data-inline="true" data-mini="true">Remote</button> <button id="btnRemote" type="button" data-icon="hand-up" data-inline="true" data-mini="true">Remote</button>
</span> </span>
<span id="deleteButtonContainer" style="display: none;">
<button id="btnDelete" type="button" data-icon="delete" data-inline="true" data-mini="true">Delete</button>
</span>
</div> </div>
<div data-role="content"> <div data-role="content">
<div class="detailPageContent"> <div class="detailPageContent">
@ -54,8 +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="airDate"></p>
<p class="audio"></p>
</div> </div>
</div> </div>
</div> </div>

View file

@ -22,16 +22,19 @@
<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 class="itemEpisodeName"></p>
<p class="itemMiscInfo miscTvProgramInfo"></p>
<p> <p>
<span class="itemCommunityRating"></span> <span class="itemCommunityRating"></span>
<span class="userDataIcons"></span> <span class="userDataIcons"></span>
</p> </p>
<p class="itemGenres"></p> <p class="itemGenres desktopGenres"></p>
<p class="itemOverview"></p> <p class="itemOverview desktopOverview"></p>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<p class="itemGenres mobileGenres"></p>
<p class="itemOverview mobileOverview"></p>
</div> </div>
<div class="ui-body-a" style="text-align: center; padding: .25em 0 .5em;"> <div class="ui-body-a" style="text-align: center; padding: .25em 0 .5em;">
<span id="playButtonContainer" style="display: none;"> <span id="playButtonContainer" style="display: none;">
@ -54,8 +57,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="airDate"></p>
<p class="audio"></p>
</div> </div>
</div> </div>
</div> </div>

View file

@ -183,7 +183,7 @@
$('#scenesCollapsible', page).hide(); $('#scenesCollapsible', page).hide();
} else { } else {
$('#scenesCollapsible', page).show(); $('#scenesCollapsible', page).show();
renderScenes(page, item, 6); renderScenes(page, item, 5);
} }
if (!item.LocalTrailerCount && !item.RemoteTrailers.length) { if (!item.LocalTrailerCount && !item.RemoteTrailers.length) {
$('#trailersCollapsible', page).addClass('hide'); $('#trailersCollapsible', page).addClass('hide');

View file

@ -213,6 +213,10 @@
return "<img src='css/images/clients/mbkinect.png' alt='MB Kinect' />"; return "<img src='css/images/clients/mbkinect.png' alt='MB Kinect' />";
} }
if (clientLowered == "xbmc") {
return "<img src='css/images/clients/xbmc.png' alt='Xbmc' />";
}
return connection.Client; return connection.Client;
}, },

View file

@ -33,14 +33,15 @@
var checkSortOption = $('.radioSortBy:checked', page); var checkSortOption = $('.radioSortBy:checked', page);
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
if (view == "Poster") { html += LibraryBrowser.getPosterViewHtml({
html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items,
items: result.Items, useAverageAspectRatio: true,
context: "tv", shape: "backdrop",
shape: "backdrop" showTitle: true,
}); showParentTitle: true
$('.itemsContainer', page).removeClass('timelineItemsContainer'); });
}
$('.itemsContainer', page).removeClass('timelineItemsContainer');
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);

View file

@ -327,7 +327,7 @@
try { try {
var birthday = parseISO8601Date(item.PremiereDate, { toLocal: true }).toDateString(); var birthday = parseISO8601Date(item.PremiereDate, { toLocal: true }).toDateString();
$('#itemBirthday', page).show().html("Birthday:&nbsp;&nbsp;" + birthday); $('#itemBirthday', page).show().html("Born:&nbsp;&nbsp;" + birthday);
} }
catch (err) { catch (err) {
$('#itemBirthday', page).hide(); $('#itemBirthday', page).hide();
@ -341,7 +341,7 @@
try { try {
var deathday = parseISO8601Date(item.EndDate, { toLocal: true }).toDateString(); var deathday = parseISO8601Date(item.EndDate, { toLocal: true }).toDateString();
$('#itemDeathDate', page).show().html("Death day:&nbsp;&nbsp;" + deathday); $('#itemDeathDate', page).show().html("Died:&nbsp;&nbsp;" + deathday);
} }
catch (err) { catch (err) {
$('#itemBirthday', page).hide(); $('#itemBirthday', page).hide();

View file

@ -1,6 +1,6 @@
var LibraryBrowser = (function (window, document, $, screen, localStorage) { var LibraryBrowser = (function (window, document, $, screen, localStorage) {
var defaultBackground = "#999;"; var defaultBackground = "#555;";
return { return {
@ -867,9 +867,9 @@
if (options.showParentTitle) { if (options.showParentTitle) {
html += "<div class='" + cssclass + "'>"; html += "<div class='" + cssclass + "'><b>";
html += item.SeriesName || item.Album || "&nbsp;"; html += item.SeriesName || item.Album || "&nbsp;";
html += "</div>"; html += "</b></div>";
} }
if (options.showTitle) { if (options.showTitle) {
@ -1983,6 +1983,11 @@
text = date.toLocaleDateString(); text = date.toLocaleDateString();
miscInfo.push(text); miscInfo.push(text);
if (item.Type != "Recording") {
text = LiveTvHelpers.getDisplayTime(date);
miscInfo.push(text);
}
} }
catch (e) { catch (e) {
console.log("Error parsing date: " + item.PremiereDate); console.log("Error parsing date: " + item.PremiereDate);
@ -2057,18 +2062,6 @@
miscInfo.push(item.OfficialRating); miscInfo.push(item.OfficialRating);
} }
if (item.Type == "Recording") {
if (item.IsHD) {
miscInfo.push("HD");
}
if (item.IsRepeat) {
miscInfo.push("Repeat");
}
}
if (item.Video3DFormat) { if (item.Video3DFormat) {
miscInfo.push("3D"); miscInfo.push("3D");
} }
@ -2080,7 +2073,7 @@
var overview = item.OverviewHtml || item.Overview || ''; var overview = item.OverviewHtml || item.Overview || '';
elem.html(overview).show().trigger('create'); elem.html(overview).trigger('create');
$('a', elem).each(function () { $('a', elem).each(function () {
$(this).attr("target", "_blank"); $(this).attr("target", "_blank");
@ -2114,31 +2107,26 @@
renderGenres: function (elem, item, context) { renderGenres: function (elem, item, context) {
if (item.Genres && item.Genres.length) { var html = '';
var html = ''; var genres = item.Genres || [];
for (var i = 0, length = item.Genres.length; i < length; i++) { for (var i = 0, length = genres.length; i < length; i++) {
if (i > 0) { if (i > 0) {
html += '&nbsp;&nbsp;/&nbsp;&nbsp;'; html += '&nbsp;&nbsp;/&nbsp;&nbsp;';
}
var param = item.Type == "Audio" || item.Type == "MusicArtist" || item.Type == "MusicAlbum" ? "musicgenre" : "genre";
if (item.MediaType == "Game") {
param = "gamegenre";
}
html += '<a class="textlink" href="itembynamedetails.html?context=' + context + '&' + param + '=' + ApiClient.encodeName(item.Genres[i]) + '">' + item.Genres[i] + '</a>';
} }
elem.show().html(html).trigger('create'); var param = item.Type == "Audio" || item.Type == "MusicArtist" || item.Type == "MusicAlbum" ? "musicgenre" : "genre";
if (item.MediaType == "Game") {
param = "gamegenre";
}
} else { html += '<a class="textlink" href="itembynamedetails.html?context=' + context + '&' + param + '=' + ApiClient.encodeName(genres[i]) + '">' + genres[i] + '</a>';
elem.hide();
} }
elem.html(html).trigger('create');
}, },
renderPremiereDate: function (elem, item) { renderPremiereDate: function (elem, item) {

View file

@ -100,6 +100,16 @@
} else { } else {
html += minutes; html += minutes;
} }
if (program.SeriesTimerId) {
html += '<div class="timerCircle seriesTimerCircle"></div>';
html += '<div class="timerCircle seriesTimerCircle"></div>';
html += '<div class="timerCircle seriesTimerCircle"></div>';
}
else if (program.TimerId) {
html += '<div class="timerCircle"></div>';
}
html += '</div>'; html += '</div>';
html += '</div>'; html += '</div>';
@ -234,6 +244,61 @@
date = date.replace('0:00', '0').replace(':00 ', '').replace(' ', ''); date = date.replace('0:00', '0').replace(':00 ', '').replace(' ', '');
return date; return date;
},
renderMiscProgramInfo: function(elem, obj) {
var html = [];
if (obj.IsSeries && !obj.IsRepeat) {
html.push('<span class="newTvProgram">NEW</span>');
}
if (obj.IsLive) {
html.push('<span class="liveTvProgram">LIVE</span>');
}
if (obj.ChannelId) {
html.push('<a class="textlink" href="livetvchannel.html?id=' + obj.ChannelId + '">' + obj.ChannelName + '</a>');
}
if (obj.IsHD) {
html.push('HD');
}
if (obj.Audio) {
html.push(obj.Audio);
}
elem.html(html.join('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;')).trigger('create');
},
renderOriginalAirDate: function(elem, item) {
var airDate = item.OriginalAirDate;
if (airDate) {
try {
airDate = parseISO8601Date(airDate, { toLocal: true }).toLocaleDateString();
}
catch (e) {
console.log("Error parsing date: " + airDate);
}
elem.html('Original air date:&nbsp;&nbsp;' + airDate).show();
} else {
elem.hide();
}
} }
}; };

View file

@ -11,11 +11,7 @@
$('.itemName', page).html(program.Name); $('.itemName', page).html(program.Name);
$('.itemChannelNumber', page).html('Channel:&nbsp;&nbsp;&nbsp;<a href="livetvchannel.html?id=' + program.ChannelId + '">' + program.ChannelName + '</a>').trigger('create'); $('.itemChannelNumber', page).html('Channel:&nbsp;&nbsp;&nbsp;<a href="livetvchannel.html?id=' + program.ChannelId + '">' + program.ChannelName + '</a>').trigger('create');
if (program.EpisodeTitle) { $('.itemEpisodeName', page).html(program.EpisodeTitle || '');
$('.itemEpisodeName', page).html('Episode:&nbsp;&nbsp;&nbsp;' + program.EpisodeTitle);
} else {
$('.itemEpisodeName', page).html('');
}
if (program.CommunityRating) { if (program.CommunityRating) {
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(program)).show(); $('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(program)).show();
@ -166,7 +162,9 @@
$('#btnCancel', page).on('click', function () { $('#btnCancel', page).on('click', function () {
Dashboard.navigate('livetvchannel.html?id=' + currentProgram.ChannelId); var programId = getParameterByName('programid');
Dashboard.navigate('livetvprogram.html?id=' + programId);
}); });

View file

@ -18,13 +18,8 @@
Dashboard.setPageTitle(name); Dashboard.setPageTitle(name);
$('.itemName', page).html(name); $('.itemName', page).html(name);
$('.itemChannelNumber', page).html('Channel:&nbsp;&nbsp;&nbsp;<a href="livetvchannel.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create');
if (item.EpisodeTitle) { $('.itemEpisodeName', page).html(item.EpisodeTitle || '');
$('.itemEpisodeName', page).html('Episode:&nbsp;&nbsp;&nbsp;' + item.EpisodeTitle);
} else {
$('.itemEpisodeName', page).html('');
}
if (item.CommunityRating) { if (item.CommunityRating) {
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item)).show(); $('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item)).show();
@ -38,6 +33,8 @@
LibraryBrowser.renderOverview($('.itemOverview', page), item); LibraryBrowser.renderOverview($('.itemOverview', page), item);
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item)); $('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
LiveTvHelpers.renderMiscProgramInfo($('.miscTvProgramInfo', page), item);
if (ApiClient.isWebSocketOpen()) { if (ApiClient.isWebSocketOpen()) {
var vals = [item.Type, item.Id, item.Name]; var vals = [item.Type, item.Id, item.Name];
@ -47,6 +44,8 @@
ApiClient.sendWebSocketMessage("Context", vals.join('|')); ApiClient.sendWebSocketMessage("Context", vals.join('|'));
} }
$('#recordButtonContainer', page).show();
if (MediaPlayer.canPlay(item)) { if (MediaPlayer.canPlay(item)) {
$('#playButtonContainer', page).show(); $('#playButtonContainer', page).show();
} else { } else {
@ -63,6 +62,8 @@
}); });
LiveTvHelpers.renderOriginalAirDate($('.airDate', page), item);
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
}); });
} }
@ -71,6 +72,14 @@
var page = this; var page = this;
$('#btnRecord', page).on('click', function() {
var id = getParameterByName('id');
Dashboard.navigate('livetvnewrecording.html?programid=' + id);
});
}).on('pageshow', "#liveTvProgramPage", function () { }).on('pageshow', "#liveTvProgramPage", function () {
var page = this; var page = this;

View file

@ -20,6 +20,15 @@
}); });
} }
function play() {
var userdata = currentItem.UserData || {};
var mediaType = currentItem.MediaType;
LibraryBrowser.showPlayMenu(this, currentItem.Id, currentItem.Type, mediaType, userdata.PlaybackPositionTicks);
}
function renderRecording(page, item) { function renderRecording(page, item) {
@ -33,13 +42,8 @@
Dashboard.setPageTitle(name); Dashboard.setPageTitle(name);
$('.itemName', page).html(name); $('.itemName', page).html(name);
$('.itemChannelNumber', page).html('Channel:&nbsp;&nbsp;&nbsp;<a href="livetvchannel.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create');
if (item.EpisodeTitle) { $('.itemEpisodeName', page).html(item.EpisodeTitle || '');
$('.itemEpisodeName', page).html('Episode:&nbsp;&nbsp;&nbsp;' + item.EpisodeTitle);
} else {
$('.itemEpisodeName', page).html('');
}
if (item.CommunityRating) { if (item.CommunityRating) {
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item)).show(); $('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item)).show();
@ -53,6 +57,8 @@
LibraryBrowser.renderOverview($('.itemOverview', page), item); LibraryBrowser.renderOverview($('.itemOverview', page), item);
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item)); $('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
LiveTvHelpers.renderMiscProgramInfo($('.miscTvProgramInfo', page), item);
if (ApiClient.isWebSocketOpen()) { if (ApiClient.isWebSocketOpen()) {
var vals = [item.Type, item.Id, item.Name]; var vals = [item.Type, item.Id, item.Name];
@ -69,12 +75,6 @@
} }
$('.status', page).html('Status:&nbsp;&nbsp;&nbsp;' + item.Status); $('.status', page).html('Status:&nbsp;&nbsp;&nbsp;' + item.Status);
if (item.Audio) {
$('.audio', page).html('Audio:&nbsp;&nbsp;&nbsp;' + item.Audio).show();
} else {
$('.audio', page).hide();
}
Dashboard.getCurrentUser().done(function (user) { Dashboard.getCurrentUser().done(function (user) {
@ -86,6 +86,8 @@
}); });
LiveTvHelpers.renderOriginalAirDate($('.airDate', page), item);
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
} }
@ -107,6 +109,7 @@
var page = this; var page = this;
$('#btnDelete', page).on('click', deleteRecording); $('#btnDelete', page).on('click', deleteRecording);
$('#btnPlay', page).on('click', play);
}).on('pagebeforeshow', "#liveTvRecordingPage", function () { }).on('pagebeforeshow', "#liveTvRecordingPage", function () {

View file

@ -480,18 +480,21 @@
// Account for screen rotation. Use the larger dimension as the width. // Account for screen rotation. Use the larger dimension as the width.
var screenWidth = Math.max(screen.height, screen.width); var screenWidth = Math.max(screen.height, screen.width);
var mediaStreams = item.MediaStreams || [];
var baseParams = { var baseParams = {
audioChannels: 2, audioChannels: 2,
audioBitrate: 128000, audioBitrate: 128000,
videoBitrate: 2000000, videoBitrate: 2000000,
maxWidth: Math.min(screenWidth, 1280), maxWidth: Math.min(screenWidth, 1280),
StartTimeTicks: 0, StartTimeTicks: 0,
SubtitleStreamIndex: getInitialSubtitleStreamIndex(item.MediaStreams, user), SubtitleStreamIndex: getInitialSubtitleStreamIndex(mediaStreams, user),
AudioStreamIndex: getInitialAudioStreamIndex(item.MediaStreams, user), AudioStreamIndex: getInitialAudioStreamIndex(mediaStreams, user),
deviceId: ApiClient.deviceId() deviceId: ApiClient.deviceId(),
Type: item.Type
}; };
var videoStream = item.MediaStreams.filter(function (i) { var videoStream = mediaStreams.filter(function (i) {
return i.Type == "Video"; return i.Type == "Video";
})[0]; })[0];
@ -573,7 +576,7 @@
$('#qualityButton', nowPlayingBar).show(); $('#qualityButton', nowPlayingBar).show();
if (item.MediaStreams.filter(function (i) { if (mediaStreams.filter(function (i) {
return i.Type == "Audio"; return i.Type == "Audio";
}).length) { }).length) {
$('#audioTracksButton', nowPlayingBar).show(); $('#audioTracksButton', nowPlayingBar).show();
@ -581,7 +584,7 @@
$('#audioTracksButton', nowPlayingBar).hide(); $('#audioTracksButton', nowPlayingBar).hide();
} }
if (item.MediaStreams.filter(function (i) { if (mediaStreams.filter(function (i) {
return i.Type == "Subtitle"; return i.Type == "Subtitle";
}).length) { }).length) {
$('#subtitleButton', nowPlayingBar).show(); $('#subtitleButton', nowPlayingBar).show();
@ -589,7 +592,7 @@
$('#subtitleButton', nowPlayingBar).hide(); $('#subtitleButton', nowPlayingBar).hide();
} }
if (item.Chapters.length) { if (item.Chapters && item.Chapters.length) {
$('#chaptersButton', nowPlayingBar).show(); $('#chaptersButton', nowPlayingBar).show();
} else { } else {
$('#chaptersButton', nowPlayingBar).hide(); $('#chaptersButton', nowPlayingBar).hide();
@ -1361,15 +1364,17 @@
var currentTicks = getCurrentTicks(); var currentTicks = getCurrentTicks();
for (var i = 0, length = item.Chapters.length; i < length; i++) { var chapters = item.Chapters || [];
var chapter = item.Chapters[i]; for (var i = 0, length = chapters.length; i < length; i++) {
var chapter = chapters[i];
var isSelected = false; var isSelected = false;
if (currentTicks >= chapter.StartPositionTicks) { if (currentTicks >= chapter.StartPositionTicks) {
var nextChapter = item.Chapters[i + 1]; var nextChapter = chapters[i + 1];
isSelected = !nextChapter || currentTicks < nextChapter.StartPositionTicks; isSelected = !nextChapter || currentTicks < nextChapter.StartPositionTicks;
} }

View file

@ -9,7 +9,7 @@
SortBy: "DateCreated", SortBy: "DateCreated",
SortOrder: "Descending", SortOrder: "Descending",
IncludeItemTypes: "Movie", IncludeItemTypes: "Movie",
Limit: 7, Limit: 6,
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio,DateCreated,UserData", Fields: "PrimaryImageAspectRatio,DateCreated,UserData",
Filters: "IsUnplayed" Filters: "IsUnplayed"
@ -32,7 +32,7 @@
SortOrder: "Descending", SortOrder: "Descending",
IncludeItemTypes: "Movie", IncludeItemTypes: "Movie",
Filters: "IsResumable", Filters: "IsResumable",
Limit: 7, Limit: 6,
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio,DateCreated,UserData" Fields: "PrimaryImageAspectRatio,DateCreated,UserData"
}; };
@ -59,7 +59,7 @@
SortBy: "DateCreated", SortBy: "DateCreated",
SortOrder: "Descending", SortOrder: "Descending",
IncludeItemTypes: "Trailer", IncludeItemTypes: "Trailer",
Limit: 7, Limit: 6,
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio,DateCreated,UserData", Fields: "PrimaryImageAspectRatio,DateCreated,UserData",
Filters: "IsUnplayed" Filters: "IsUnplayed"

View file

@ -71,7 +71,7 @@
.jstree li { .jstree li {
margin-left: 10px; margin-left: 10px;
min-width: 10px; min-width: 10px;
border-bottom: 1px solid #505050; border-bottom: 1px solid #404040;
} }
.jstree li:last-child { .jstree li:last-child {