added dvdlib for better dvd runtimes

This commit is contained in:
Luke Pulverenti 2014-01-11 00:49:18 -05:00
parent 8ef09d054d
commit 02cd9ef7f7
12 changed files with 197 additions and 168 deletions

View File

@ -1594,9 +1594,6 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
if (itemType == "Artist") {
url = self.getUrl("Artists/" + self.encodeName(itemName) + "/Images");
}
else if (itemType == "Channel") {
url = self.getUrl("LiveTv/Channels/" + itemId + "/Images");
}
else if (itemType == "Genre") {
url = self.getUrl("Genres/" + self.encodeName(itemName) + "/Images");
} else if (itemType == "GameGenre") {
@ -1667,9 +1664,6 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
if (itemType == "Artist") {
url = self.getUrl("Artists/" + self.encodeName(itemName) + "/Images/" + imageType + "/" + imageIndex + "/Index", options);
}
else if (itemType == "Channel") {
url = self.getUrl("LiveTv/Channels/" + itemId + "/Images/" + imageType + "/" + imageIndex + "/Index", options);
}
else if (itemType == "Genre") {
url = self.getUrl("Genres/" + self.encodeName(itemName) + "/Images/" + imageType + "/" + imageIndex + "/Index", options);
} else if (itemType == "GameGenre") {
@ -1701,9 +1695,6 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
if (itemType == "Artist") {
url = self.getUrl("Artists/" + self.encodeName(itemName) + "/Images");
}
else if (itemType == "Channel") {
url = self.getUrl("LiveTv/Channels/" + itemId + "/Images");
}
else if (itemType == "Genre") {
url = self.getUrl("Genres/" + self.encodeName(itemName) + "/Images");
} else if (itemType == "GameGenre") {
@ -1838,9 +1829,6 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
if (itemType == "Artist") {
url = self.getUrl("Artists/" + self.encodeName(itemName) + "/Images");
}
else if (itemType == "Channel") {
url = self.getUrl("LiveTv/Channels/" + itemId + "/Images");
}
else if (itemType == "Genre") {
url = self.getUrl("Genres/" + self.encodeName(itemName) + "/Images");
} else if (itemType == "GameGenre") {

View File

@ -156,9 +156,9 @@
}
.detailButtonsContainer {
padding: .75em 0 .75em;
padding: .5em 0 .5em;
text-align: center;
border-top: 1px solid #444;
border-top: 1px solid #333;
border-bottom: 1px solid #333;
}

View File

@ -133,12 +133,12 @@
.channelTimeslotHeader {
position: absolute;
left: 15px;
left: 10px;
}
.timeslotHeaders {
position: absolute;
right: 28px;
right: 13px;
overflow-y: hidden;
overflow-x: hidden;
white-space: nowrap;
@ -146,7 +146,7 @@
.channelPrograms {
white-space: nowrap;
height: 47px;
height: 53px;
}
.timeslotHeader {
@ -197,7 +197,7 @@
position: relative;
}
.channelHeaderCellInner:hover {
.channelHeaderCell:hover {
background-color: #38c;
}
@ -205,14 +205,14 @@
overflow-y: hidden;
overflow-x: hidden;
position: absolute;
left: 15px;
left: 10px;
bottom: 46px;
}
.programGrid {
position: absolute;
bottom: 30px;
right: 15px;
right: 0;
overflow-y: scroll;
overflow-x: scroll;
}
@ -242,7 +242,7 @@
}
.timeslotHeaders, .programGrid {
left: 206px;
left: 201px;
}
.channelTimeslotHeader, .timeslotHeaders {
@ -254,11 +254,12 @@
}
.channelHeaderCell, .timeslotCell {
height: 46px;
height: 52px;
}
.guideProgramName {
padding: .35em .5em;
font-size: 14px;
}
.guideProgramTime {
@ -300,15 +301,4 @@
.timerPageImageContainer {
display: none !important;
}
}
/* Account for hidden navigation */
@media (max-width: 750px) {
.channelTimeslotHeader, .timeslotHeaders {
top: 115px;
}
.channelList, .programGrid {
top: 145px;
}
}
}

View File

@ -14,7 +14,7 @@
<a href="livetvseriestimers.html" class="ui-btn-active">Series</a>
</div>
<div data-role="content">
<div style="max-width: 700px; margin: 0 auto;">
<div style="max-width: 600px; margin: 0 auto;">
<div id="items"></div>
</div>
</div>

View File

@ -14,7 +14,7 @@
<a href="livetvseriestimers.html">Series</a>
</div>
<div data-role="content">
<div style="max-width: 900px; margin: 0 auto;">
<div style="max-width: 600px; margin: 0 auto;">
<div id="items"></div>
</div>
</div>

View File

@ -779,22 +779,12 @@
height = 400;
width = primaryImageAspectRatio ? Math.round(height * primaryImageAspectRatio) : null;
if (item.Type == "Recording") {
imgUrl = ApiClient.getUrl("LiveTV/Recordings/" + item.Id + "/Images/Primary", {
type: "Primary",
height: height,
width: width,
tag: item.ImageTags.Primary
});
} else {
imgUrl = ApiClient.getImageUrl(item.Id, {
type: "Primary",
height: height,
width: width,
tag: item.ImageTags.Primary
});
}
imgUrl = ApiClient.getImageUrl(item.Id, {
type: "Primary",
height: height,
width: width,
tag: item.ImageTags.Primary
});
}
else if (item.AlbumId && item.AlbumPrimaryImageTag) {
@ -1784,28 +1774,7 @@
if (imageTags.Primary) {
if (item.Type == "Channel") {
url = ApiClient.getUrl("LiveTV/Channels/" + item.Id + "/Images/Primary", {
maxheight: imageHeight,
tag: imageTags.Primary,
type: "Primary"
});
}
else if (item.Type == "Recording") {
url = ApiClient.getUrl("LiveTV/Recordings/" + item.Id + "/Images/Primary", {
maxheight: imageHeight,
tag: imageTags.Primary,
type: "Primary"
});
}
else if (item.Type == "Program") {
url = ApiClient.getUrl("LiveTV/Programs/" + item.Id + "/Images/Primary", {
maxheight: imageHeight,
tag: imageTags.Primary,
type: "Primary"
});
}
else if (item.Type == "Person") {
if (item.Type == "Person") {
url = ApiClient.getPersonImageUrl(item.Name, {
maxheight: imageHeight,
tag: imageTags.Primary,

View File

@ -50,7 +50,7 @@
var nextDay = new Date(date.getTime());
nextDay.setHours(0, 0, 0, 0);
nextDay.setDate(nextDay.getDate() + 1);
console.log(nextDay);
channelsPromise.done(function(channelsResult) {
apiClient.getLiveTvPrograms({
@ -311,7 +311,7 @@
html.push(getChannelProgramsHtml(page, date, channels[i], programs));
}
$('.programGrid', page).html(html.join(''));
$('.programGrid', page).html(html.join('')).scrollTop(0).scrollLeft(0);
}
function renderChannelHeaders(page, channels) {
@ -331,7 +331,7 @@
if (channel.ImageTags.Primary) {
var url = ApiClient.getUrl("LiveTV/Channels/" + channel.Id + "/Images/Primary", {
var url = ApiClient.getImageUrl(channel.Id, {
maxheight: 200,
maxwidth: 200,
tag: channel.ImageTags.Primary,

View File

@ -139,38 +139,59 @@
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
var index = '';
for (var i = 0, length = timers.length; i < length; i++) {
var timer = timers[i];
var programInfo = timer.ProgramInfo || {};
html += '<li><a href="livetvtimer.html?id=' + timer.Id + '">';
html += '<h3>';
html += (programInfo.EpisodeTitle || timer.Name);
html += '</h3>';
var startDate = timer.StartDate;
try {
startDate = parseISO8601Date(startDate, { toLocal: true });
} catch (err) {
var startDateText = LibraryBrowser.getFutureDateText(parseISO8601Date(timer.StartDate, { toLocal: true }));
if (startDateText != index) {
html += '<li data-role="list-divider">' + startDateText + '</li>';
index = startDateText;
}
html += '<p>' + startDate.toLocaleDateString() + '</p>';
html += '<li><a href="livetvtimer.html?id=' + timer.Id + '">';
var program = timer.ProgramInfo;
var imgUrl;
if (program.ImageTags && program.ImageTags.Primary) {
imgUrl = ApiClient.getImageUrl(program.Id, {
height: 160,
tag: program.ImageTags.Primary,
type: "Primary"
});
} else {
imgUrl = "css/images/items/searchhintsv2/tv.png";
}
html += '<img src="css/images/items/searchhintsv2/tv.png" style="display:none;">';
html += '<div class="ui-li-thumb" style="background-image:url(\'' + imgUrl + '\');width:5em;height:5em;background-repeat:no-repeat;background-position:center center;background-size: cover;"></div>';
html += '<h3>';
html += program.EpisodeTitle || timer.Name;
if (program.IsRepeat) {
html += ' (R)';
}
html += '</h3>';
html += '<p>';
html += LiveTvHelpers.getDisplayTime(timer.StartDate);
if (timer.ChannelName) {
html += ' on ' + timer.ChannelName;
}
html += ' - ' + LiveTvHelpers.getDisplayTime(timer.EndDate);
html += '</p>';
if (timer.SeriesTimerId) {
html += '<div class="ui-li-aside" style="right:0;">';
html += '<div class="timerCircle seriesTimerCircle"></div>';
html += '<div class="timerCircle seriesTimerCircle"></div>';
html += '<div class="timerCircle seriesTimerCircle"></div>';
html += '</div>';
}
html += '</a>';
html += '<a data-timerid="' + timer.Id + '" href="#" title="Cancel Recording" class="btnCancelTimer">Cancel Recording</a>';

View File

@ -43,7 +43,7 @@
if (programInfo.ImageTags && programInfo.ImageTags.Primary) {
var imgUrl = ApiClient.getUrl("LiveTV/Programs/" + programInfo.Id + "/Images/Primary", {
var imgUrl = ApiClient.getImageUrl(programInfo.Id, {
maxwidth: 200,
maxheight: 200,
tag: programInfo.ImageTags.Primary,

View File

@ -23,98 +23,159 @@
var html = '';
var cssClass = "detailTable";
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
html += '<div class="detailTableContainer"><table class="detailTable" >';
html += '<thead>';
html += '<tr>';
html += '<th class="tabletColumn">&nbsp;</th>';
html += '<th>Name</th>';
html += '<th class="desktopColumn">Channel</th>';
html += '<th>Date</th>';
html += '<th>Time</th>';
html += '<th class="tabletColumn">Length</th>';
html += '<th class="tabletColumn">Status</th>';
html += '<th class="desktopColumn">Series</th>';
html += '</tr>';
html += '</thead>';
html += '<tbody>';
var index = '';
for (var i = 0, length = timers.length; i < length; i++) {
var timer = timers[i];
html += '<tr>';
html += '<td class="tabletColumn">';
html += '<button data-timerid="' + timer.Id + '" class="btnDeleteTimer" type="button" data-icon="delete" data-inline="true" data-mini="true" data-iconpos="notext">Cancel</button>';
html += '</td>';
html += '<td>';
html += '<a href="livetvtimer.html?id=' + timer.Id + '">' + timer.Name + '</a>';
html += '</td>';
html += '<td class="desktopColumn">';
if (timer.ChannelId) {
html += '<a href="livetvchannel.html?id=' + timer.ChannelId + '">' + timer.ChannelName + '</a>';
}
html += '</td>';
var startDate = timer.StartDate;
try {
startDate = parseISO8601Date(startDate, { toLocal: true });
} catch (err) {
var startDateText = LibraryBrowser.getFutureDateText(parseISO8601Date(timer.StartDate, { toLocal: true }));
if (startDateText != index) {
html += '<li data-role="list-divider">' + startDateText + '</li>';
index = startDateText;
}
html += '<td>' + startDate.toLocaleDateString() + '</td>';
html += '<li><a href="livetvtimer.html?id=' + timer.Id + '">';
html += '<td>' + LiveTvHelpers.getDisplayTime(timer.StartDate) + '</td>';
var minutes = timer.RunTimeTicks / 600000000;
minutes = minutes || 1;
html += '<td class="tabletColumn">' + Math.round(minutes) + 'min</td>';
html += '<td class="tabletColumn">';
if (timer.Status == 'ConflictedNotOk' || timer.Status == 'Error') {
html += '<span style="color:red;">';
html += timer.Status;
html += '</span>';
var program = timer.ProgramInfo;
var imgUrl;
if (program.ImageTags && program.ImageTags.Primary) {
imgUrl = ApiClient.getImageUrl(program.Id, {
height: 160,
tag: program.ImageTags.Primary,
type: "Primary"
});
} else {
html += timer.Status;
imgUrl = "css/images/items/searchhintsv2/tv.png";
}
html += '</td>';
html += '<img src="css/images/items/searchhintsv2/tv.png" style="display:none;">';
html += '<div class="ui-li-thumb" style="background-image:url(\'' + imgUrl + '\');width:5em;height:5em;background-repeat:no-repeat;background-position:center center;background-size: cover;"></div>';
html += '<h3>';
html += timer.Name;
html += '</h3>';
html += '<p>';
html += LiveTvHelpers.getDisplayTime(timer.StartDate);
html += ' - ' + LiveTvHelpers.getDisplayTime(timer.EndDate);
html += '</p>';
html += '<td class="desktopColumn">';
if (timer.SeriesTimerId) {
html += '<a href="livetvseriestimer.html?id=' + timer.SeriesTimerId + '" title="View Series Recording">';
html += '<div class="ui-li-aside" style="right:0;">';
html += '<div class="timerCircle seriesTimerCircle"></div>';
html += '<div class="timerCircle seriesTimerCircle"></div>';
html += '<div class="timerCircle seriesTimerCircle"></div>';
html += '</a>';
html += '</div>';
}
html += '</td>';
html += '</a>';
html += '</tr>';
html += '<a data-timerid="' + timer.Id + '" href="#" title="Cancel Recording" class="btnDeleteTimer">Cancel Recording</a>';
html += '</li>';
}
html += '</tbody>';
html += '</table></div>';
html += '</ul>';
//var cssClass = "detailTable";
//html += '<div class="detailTableContainer"><table class="detailTable" >';
//html += '<thead>';
//html += '<tr>';
//html += '<th class="tabletColumn">&nbsp;</th>';
//html += '<th>Name</th>';
//html += '<th class="desktopColumn">Channel</th>';
//html += '<th>Date</th>';
//html += '<th>Time</th>';
//html += '<th class="tabletColumn">Length</th>';
//html += '<th class="tabletColumn">Status</th>';
//html += '<th class="desktopColumn">Series</th>';
//html += '</tr>';
//html += '</thead>';
//html += '<tbody>';
//for (var i = 0, length = timers.length; i < length; i++) {
// var timer = timers[i];
// html += '<tr>';
// html += '<td class="tabletColumn">';
// html += '<button data-timerid="' + timer.Id + '" class="btnDeleteTimer" type="button" data-icon="delete" data-inline="true" data-mini="true" data-iconpos="notext">Cancel</button>';
// html += '</td>';
// html += '<td>';
// html += '<a href="livetvtimer.html?id=' + timer.Id + '">' + timer.Name + '</a>';
// html += '</td>';
// html += '<td class="desktopColumn">';
// if (timer.ChannelId) {
// html += '<a href="livetvchannel.html?id=' + timer.ChannelId + '">' + timer.ChannelName + '</a>';
// }
// html += '</td>';
// var startDate = timer.StartDate;
// try {
// startDate = parseISO8601Date(startDate, { toLocal: true });
// } catch (err) {
// }
// html += '<td>' + startDate.toLocaleDateString() + '</td>';
// html += '<td>' + LiveTvHelpers.getDisplayTime(timer.StartDate) + '</td>';
// var minutes = timer.RunTimeTicks / 600000000;
// minutes = minutes || 1;
// html += '<td class="tabletColumn">' + Math.round(minutes) + 'min</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">';
// if (timer.SeriesTimerId) {
// html += '<a href="livetvseriestimer.html?id=' + timer.SeriesTimerId + '" title="View Series Recording">';
// html += '<div class="timerCircle seriesTimerCircle"></div>';
// html += '<div class="timerCircle seriesTimerCircle"></div>';
// html += '<div class="timerCircle seriesTimerCircle"></div>';
// html += '</a>';
// }
// html += '</td>';
// html += '</tr>';
//}
//html += '</tbody>';
//html += '</table></div>';
var elem = $('#items', page).html(html).trigger('create');

View File

@ -1910,7 +1910,7 @@
if (channel.ImageTags.Primary) {
imgUrl = ApiClient.getUrl("LiveTV/Channels/" + channel.Id + "/Images/Primary", {
imgUrl = ApiClient.getImageUrl(channel.Id, {
maxwidth: 200,
tag: channel.ImageTags.Primary,
type: "Primary"

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.223" targetFramework="net45" />
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.224" targetFramework="net45" />
</packages>