diff --git a/dashboard-ui/css/posteritem.css b/dashboard-ui/css/posteritem.css
index f679f00b5a..8b51c08740 100644
--- a/dashboard-ui/css/posteritem.css
+++ b/dashboard-ui/css/posteritem.css
@@ -66,6 +66,10 @@
border-top: 0;
}
+.posterItemText + .posterItemProgress {
+ padding-top: 0;
+}
+
.posterItemDefaultText {
position: absolute;
top: 30%;
diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css
index 880106a083..055c08a3e7 100644
--- a/dashboard-ui/css/site.css
+++ b/dashboard-ui/css/site.css
@@ -32,7 +32,7 @@
body {
overflow-y: scroll!important;
- font-size: 90%;
+ font-size: 13px;
}
.textlink {
diff --git a/dashboard-ui/livetvrecording.html b/dashboard-ui/livetvrecording.html
index 75964f19c2..86b384f8c4 100644
--- a/dashboard-ui/livetvrecording.html
+++ b/dashboard-ui/livetvrecording.html
@@ -11,6 +11,35 @@
Recordings
Timers
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dashboard-ui/livetvrecordings.html b/dashboard-ui/livetvrecordings.html
index 8f41abce90..90234b4f40 100644
--- a/dashboard-ui/livetvrecordings.html
+++ b/dashboard-ui/livetvrecordings.html
@@ -24,7 +24,7 @@
Channel |
Date |
Start |
- End |
+ Length |
Status |
diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js
index 749a4c8269..0c90e6c47a 100644
--- a/dashboard-ui/scripts/Itemdetailpage.js
+++ b/dashboard-ui/scripts/Itemdetailpage.js
@@ -364,14 +364,34 @@
return;
}
- var friendly = item.Type == "Audio" ? "song" : item.Type.toLowerCase();
+ var promise;
- ApiClient.getItems(Dashboard.getCurrentUserId(), {
+ if (item.Type == "Season") {
- AdjacentTo: item.Id,
- ParentId: item.ParentId
+ promise = ApiClient.getSeasons(item.SeriesId, {
- }).done(function (result) {
+ userId: Dashboard.getCurrentUserId(),
+ AdjacentTo: item.Id
+ });
+ }
+ else if (item.Type == "Episode") {
+
+ // Use dedicated episodes endpoint
+ promise = ApiClient.getEpisodes(item.SeriesId, {
+
+ seasonId: item.SeasonId,
+ userId: Dashboard.getCurrentUserId(),
+ AdjacentTo: item.Id
+ });
+
+ } else {
+ promise = ApiClient.getItems(Dashboard.getCurrentUserId(), {
+ AdjacentTo: item.Id,
+ ParentId: item.ParentId
+ });
+ }
+
+ promise.done(function (result) {
for (var i = 0, length = result.Items.length; i < length; i++) {
@@ -381,13 +401,15 @@
continue;
}
+ var friendlyTypeName = item.Type == "Audio" ? "song" : item.Type.toLowerCase();
+
if (curr.IndexNumber < item.IndexNumber) {
- $('.lnkPreviousItem', page).removeClass('hide').attr('href', 'itemdetails.html?id=' + curr.Id).html('← Previous ' + friendly);
+ $('.lnkPreviousItem', page).removeClass('hide').attr('href', 'itemdetails.html?id=' + curr.Id).html('← Previous ' + friendlyTypeName);
}
else if (curr.IndexNumber > item.IndexNumber) {
- $('.lnkNextItem', page).removeClass('hide').attr('href', 'itemdetails.html?id=' + curr.Id).html('Next ' + friendly + ' →');
+ $('.lnkNextItem', page).removeClass('hide').attr('href', 'itemdetails.html?id=' + curr.Id).html('Next ' + friendlyTypeName + ' →');
}
}
});
@@ -518,23 +540,12 @@
}
else if (item.Type == "Season") {
- if (item.IndexNumber == null) {
+ // Use dedicated episodes endpoint
+ promise = ApiClient.getEpisodes(item.SeriesId, {
- // Use dedicated episodes endpoint
- promise = ApiClient.getEpisodes(item.SeriesId, {
-
- seasonId: item.Id,
- userId: user.Id
- });
- } else {
-
- // Use dedicated episodes endpoint
- promise = ApiClient.getEpisodes(item.SeriesId, {
-
- season: item.IndexNumber,
- userId: user.Id
- });
- }
+ seasonId: item.Id,
+ userId: user.Id
+ });
}
promise = promise || ApiClient.getItems(Dashboard.getCurrentUserId(), query);
diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js
index ded0b157a9..4e67a789c3 100644
--- a/dashboard-ui/scripts/indexpage.js
+++ b/dashboard-ui/scripts/indexpage.js
@@ -68,7 +68,8 @@
for (var i = 0, length = result.Items.length; i < length; i++) {
urls.push(LibraryBrowser.getImageUrl(result.Items[i], 'Primary', 0, {
- width: 160
+ width: 160,
+ EnableImageEnhancers: false
}));
}
@@ -96,7 +97,8 @@
for (var i = 0, length = result.Items.length; i < length; i++) {
urls.push(LibraryBrowser.getImageUrl(result.Items[i], 'Primary', 0, {
- width: 160
+ width: 160,
+ EnableImageEnhancers: false
}));
}
@@ -124,7 +126,8 @@
for (var i = 0, length = result.Items.length; i < length; i++) {
urls.push(LibraryBrowser.getImageUrl(result.Items[i], 'Primary', 0, {
- width: 160
+ width: 160,
+ EnableImageEnhancers: false
}));
}
@@ -152,7 +155,8 @@
for (var i = 0, length = result.Items.length; i < length; i++) {
urls.push(LibraryBrowser.getImageUrl(result.Items[i], 'Primary', 0, {
- width: 160
+ width: 160,
+ EnableImageEnhancers: false
}));
}
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index 46dd91ef3f..ab13b7eba2 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -735,7 +735,7 @@
else if (item.ImageTags && item.ImageTags.Primary) {
height = 300;
- width = primaryImageAspectRatio ? parseInt(height * primaryImageAspectRatio) : null;
+ width = primaryImageAspectRatio ? (height * primaryImageAspectRatio).toFixed(0) : null;
imgUrl = ApiClient.getImageUrl(item.Id, {
type: "Primary",
@@ -748,7 +748,7 @@
else if (item.AlbumId && item.AlbumPrimaryImageTag) {
height = 300;
- width = primaryImageAspectRatio ? parseInt(height * primaryImageAspectRatio) : null;
+ width = primaryImageAspectRatio ? (height * primaryImageAspectRatio).toFixed(0) : null;
imgUrl = ApiClient.getImageUrl(item.AlbumId, {
type: "Primary",
@@ -1200,7 +1200,7 @@
}
else if (item.ParentIndexNumber && item.Type == "Episode") {
- html.push('Season ' + item.ParentIndexNumber + '');
+ html.push('Season ' + item.ParentIndexNumber + '');
}
else if (item.Album && item.Type == "Audio" && (item.AlbumId || item.ParentId)) {
html.push('' + item.Album + '');
@@ -2009,20 +2009,31 @@
}
}
+ var minutes;
+
if (item.RunTimeTicks && item.Type != "Series") {
if (item.Type == "Audio") {
miscInfo.push(Dashboard.getDisplayTime(item.RunTimeTicks));
} else {
- var minutes = item.RunTimeTicks / 600000000;
+ minutes = item.RunTimeTicks / 600000000;
minutes = minutes || 1;
- miscInfo.push(parseInt(minutes) + "min");
+ miscInfo.push(minutes.toFixed(0) + "min");
}
}
+ if (item.DurationMs) {
+
+ minutes = item.DurationMs / 60000;
+
+ minutes = minutes || 1;
+
+ miscInfo.push(minutes.toFixed(0) + "min");
+ }
+
if (item.OfficialRating && item.Type !== "Season" && item.Type !== "Episode") {
miscInfo.push(item.OfficialRating);
}
diff --git a/dashboard-ui/scripts/livetvrecording.js b/dashboard-ui/scripts/livetvrecording.js
index 812f47f49e..c9f8ee0df7 100644
--- a/dashboard-ui/scripts/livetvrecording.js
+++ b/dashboard-ui/scripts/livetvrecording.js
@@ -1,19 +1,99 @@
-function deleteRecording(page, id) {
+(function ($, document, apiClient) {
- Dashboard.confirm("Are you sure you wish to delete this recording?", "Confirm Recording Deletion", function (result) {
+ var currentItem;
- if (result) {
+ function deleteRecording() {
- Dashboard.showLoadingMsg();
+ Dashboard.confirm("Are you sure you wish to delete this recording?", "Confirm Recording Deletion", function (result) {
- ApiClient.deleteLiveTvRecording(id).done(function () {
+ if (result) {
- Dashboard.alert('Recording deleted');
+ Dashboard.showLoadingMsg();
- reload(page);
- });
+ ApiClient.deleteLiveTvRecording(currentItem.Id).done(function () {
+
+ Dashboard.alert('Recording deleted');
+
+ Dashboard.navigate('livetvrecordings.html');
+ });
+ }
+
+ });
+ }
+
+ function renderRecording(page, item) {
+
+ currentItem = item;
+
+ var name = item.Name;
+
+ $('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item));
+
+ Dashboard.setPageTitle(name);
+
+ $('.itemName', page).html(name);
+ $('.itemChannelNumber', page).html(item.Number);
+
+ $('.userDataIcons', page).html(LibraryBrowser.getUserDataIconsHtml(item));
+
+ $('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
+
+ if (ApiClient.isWebSocketOpen()) {
+
+ var vals = [item.Type, item.Id, item.Name];
+
+ vals.push('livetv');
+
+ ApiClient.sendWebSocketMessage("Context", vals.join('|'));
}
- });
-}
+ if (MediaPlayer.canPlay(item)) {
+ $('#playButtonContainer', page).show();
+ } else {
+ $('#playButtonContainer', page).hide();
+ }
+ Dashboard.getCurrentUser().done(function (user) {
+
+ if (user.Configuration.IsAdministrator && item.LocationType !== "Offline") {
+ $('#deleteButtonContainer', page).show();
+ } else {
+ $('#deleteButtonContainer', page).hide();
+ }
+
+ });
+
+ Dashboard.hideLoadingMsg();
+ }
+
+ function reload(page) {
+
+ Dashboard.showLoadingMsg();
+
+ var id = getParameterByName('id');
+
+ apiClient.getLiveTvRecording(id).done(function (result) {
+
+ renderRecording(page, result);
+
+ });
+ }
+
+ $(document).on('pageinit', "#liveTvRecordingPage", function () {
+
+ var page = this;
+
+ $('#btnDelete', page).on('click', deleteRecording);
+
+ }).on('pagebeforeshow', "#liveTvRecordingPage", function () {
+
+ var page = this;
+
+ reload(page);
+
+ }).on('pagehide', "#liveTvRecordingPage", function () {
+
+ currentItem = null;
+ });
+
+})(jQuery, document, ApiClient);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/livetvrecordings.js b/dashboard-ui/scripts/livetvrecordings.js
index 2cf8b75ad2..0b2f69d4fb 100644
--- a/dashboard-ui/scripts/livetvrecordings.js
+++ b/dashboard-ui/scripts/livetvrecordings.js
@@ -34,7 +34,13 @@
html += '';
html += '';
- html += '' + recording.Name + '';
+ html += '';
+ html += recording.Name;
+
+ if (recording.EpisodeTitle) {
+ html += " " + recording.EpisodeTitle;
+ }
+ html += '';
html += ' | ';
html += '';
@@ -57,7 +63,9 @@
html += ' | ' + LiveTvHelpers.getDisplayTime(recording.StartDate) + ' | ';
- html += '' + LiveTvHelpers.getDisplayTime(recording.EndDate) + ' | ';
+ var minutes = recording.DurationMs / 60000;
+
+ html += '' + minutes.toFixed(0) + ' mins | ';
html += '' + (recording.Status || '') + ' | ';
diff --git a/dashboard-ui/scripts/livetvtimers.js b/dashboard-ui/scripts/livetvtimers.js
index 7edde7cddf..d979fed247 100644
--- a/dashboard-ui/scripts/livetvtimers.js
+++ b/dashboard-ui/scripts/livetvtimers.js
@@ -38,7 +38,7 @@
html += 'Channel | ';
html += 'Date | ';
html += 'Start | ';
- html += 'End | ';
+ html += 'Length | ';
html += 'Status | ';
html += 'Recurring | ';
@@ -78,7 +78,9 @@
html += '' + LiveTvHelpers.getDisplayTime(timer.StartDate) + ' | ';
- html += '' + LiveTvHelpers.getDisplayTime(timer.EndDate) + ' | ';
+ var minutes = timer.DurationMs / 60000;
+
+ html += '' + minutes.toFixed(0) + ' mins | ';
html += '' + (timer.Status || '') + ' | ';
diff --git a/dashboard-ui/scripts/scheduledtaskpage.js b/dashboard-ui/scripts/scheduledtaskpage.js
index 6e16211c99..af1ebe5b51 100644
--- a/dashboard-ui/scripts/scheduledtaskpage.js
+++ b/dashboard-ui/scripts/scheduledtaskpage.js
@@ -102,11 +102,11 @@
hours = 0;
}
- hours = parseInt(hours);
+ hours = hours.toFixed(0);
ticks -= (hours * 36000000000);
- var minutes = parseInt(ticks / 600000000);
+ var minutes = (ticks / 600000000).toFixed(0);
var suffix = "am";
diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js
index a3af8b0fcd..da2e17ccae 100644
--- a/dashboard-ui/scripts/site.js
+++ b/dashboard-ui/scripts/site.js
@@ -1100,7 +1100,7 @@ var Dashboard = {
var parts = [];
var hours = ticks / ticksPerHour;
- hours = parseInt(hours);
+ hours = hours.toFixed(0);
if (hours) {
parts.push(hours);
@@ -1111,7 +1111,7 @@ var Dashboard = {
var ticksPerMinute = 600000000;
var minutes = ticks / ticksPerMinute;
- minutes = parseInt(minutes);
+ minutes = minutes.toFixed(0);
ticks -= (minutes * ticksPerMinute);
@@ -1123,7 +1123,7 @@ var Dashboard = {
var ticksPerSecond = 10000000;
var seconds = ticks / ticksPerSecond;
- seconds = parseInt(seconds);
+ seconds = seconds.toFixed(0);
if (seconds < 10) {
seconds = '0' + seconds;
diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js
index 9dd4b2a2ea..7e819b7903 100644
--- a/dashboard-ui/scripts/tvrecommended.js
+++ b/dashboard-ui/scripts/tvrecommended.js
@@ -9,7 +9,7 @@
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "Episode",
- Limit: 8,
+ Limit: 12,
Recursive: true,
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
Filters: "IsUnplayed",
@@ -35,7 +35,7 @@
SortOrder: "Descending",
IncludeItemTypes: "Episode",
Filters: "IsResumable",
- Limit: 8,
+ Limit: 4,
Recursive: true,
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
ExcludeLocationTypes: "Virtual"
diff --git a/dashboard-ui/scripts/tvupcoming.js b/dashboard-ui/scripts/tvupcoming.js
index 54743a6743..1d56b48220 100644
--- a/dashboard-ui/scripts/tvupcoming.js
+++ b/dashboard-ui/scripts/tvupcoming.js
@@ -7,8 +7,10 @@
function getDateFormat(date) {
// yyyyMMddHHmmss
- var d = date;
-
+ // Convert to UTC
+ // http://stackoverflow.com/questions/948532/how-do-you-convert-a-javascript-date-to-utc/14610512#14610512
+ var d = new Date(date.getTime());
+
return "" + d.getFullYear() + formatDigit(d.getMonth() + 1) + formatDigit(d.getDate()) + formatDigit(d.getHours()) + formatDigit(d.getMinutes()) + formatDigit(d.getSeconds());
}
@@ -28,15 +30,15 @@
var missedItemsQuery = $.extend({
- }, query);
+ IsUnaired: false
+ }, query);
+
var yesterday = new Date();
- yesterday.setHours(23, 50, 0, 0);
yesterday.setDate(yesterday.getDate() - 1);
- missedItemsQuery.MaxPremiereDate = getDateFormat(yesterday);
-
yesterday.setHours(0, 0, 0, 0);
+
missedItemsQuery.MinPremiereDate = getDateFormat(yesterday);
var unairedQuery = $.extend({
diff --git a/dashboard-ui/tvrecommended.html b/dashboard-ui/tvrecommended.html
index d171809e02..5c6d39ffbd 100644
--- a/dashboard-ui/tvrecommended.html
+++ b/dashboard-ui/tvrecommended.html
@@ -19,10 +19,6 @@