From 02cd9ef7f71da156d8ed421d8efe06b52d868b93 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 11 Jan 2014 00:49:18 -0500 Subject: [PATCH] added dvdlib for better dvd runtimes --- ApiClient.js | 12 -- dashboard-ui/css/librarybrowser.css | 4 +- dashboard-ui/css/livetv.css | 30 ++-- dashboard-ui/livetvseriestimers.html | 2 +- dashboard-ui/livetvtimers.html | 2 +- dashboard-ui/scripts/librarybrowser.js | 45 +---- dashboard-ui/scripts/livetvguide.js | 6 +- dashboard-ui/scripts/livetvseriestimer.js | 63 ++++--- dashboard-ui/scripts/livetvtimer.js | 2 +- dashboard-ui/scripts/livetvtimers.js | 195 ++++++++++++++-------- dashboard-ui/scripts/mediaplayer.js | 2 +- packages.config | 2 +- 12 files changed, 197 insertions(+), 168 deletions(-) diff --git a/ApiClient.js b/ApiClient.js index cbe815c03a..fe0e5e541f 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -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") { diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index dbbcddde7a..6c79a9bacf 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -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; } diff --git a/dashboard-ui/css/livetv.css b/dashboard-ui/css/livetv.css index f9d1739f21..d5de19d6d2 100644 --- a/dashboard-ui/css/livetv.css +++ b/dashboard-ui/css/livetv.css @@ -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; - } -} +} \ No newline at end of file diff --git a/dashboard-ui/livetvseriestimers.html b/dashboard-ui/livetvseriestimers.html index 2171c3b2ab..b443ba94ab 100644 --- a/dashboard-ui/livetvseriestimers.html +++ b/dashboard-ui/livetvseriestimers.html @@ -14,7 +14,7 @@ Series
-
+
diff --git a/dashboard-ui/livetvtimers.html b/dashboard-ui/livetvtimers.html index e8119b0208..ae607d9253 100644 --- a/dashboard-ui/livetvtimers.html +++ b/dashboard-ui/livetvtimers.html @@ -14,7 +14,7 @@ Series
-
+
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 8c0473b59d..b36ca3d368 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -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, diff --git a/dashboard-ui/scripts/livetvguide.js b/dashboard-ui/scripts/livetvguide.js index d0af393ef0..4884a155be 100644 --- a/dashboard-ui/scripts/livetvguide.js +++ b/dashboard-ui/scripts/livetvguide.js @@ -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, diff --git a/dashboard-ui/scripts/livetvseriestimer.js b/dashboard-ui/scripts/livetvseriestimer.js index 3b0d2d70fc..d6e04e366e 100644 --- a/dashboard-ui/scripts/livetvseriestimer.js +++ b/dashboard-ui/scripts/livetvseriestimer.js @@ -139,38 +139,59 @@ html += '