+
+
TOMATOMETER®
-
Top Critic Reviews
diff --git a/dashboard-ui/scripts/episodes.js b/dashboard-ui/scripts/episodes.js
index d9f13eb4de..2e5fa70a40 100644
--- a/dashboard-ui/scripts/episodes.js
+++ b/dashboard-ui/scripts/episodes.js
@@ -34,7 +34,8 @@
shape: "backdrop",
showTitle: true,
showParentTitle: true,
- overlayText: true
+ overlayText: true,
+ selectionPanel: true
});
$('.itemsContainer', page).removeClass('timelineItemsContainer');
@@ -260,6 +261,12 @@
reloadItems(page);
});
+ $('.itemsContainer', page).on('needsrefresh', function () {
+
+ reloadItems(page);
+
+ });
+
}).on('pagebeforeshow', "#episodesPage", function () {
var limit = LibraryBrowser.getDefaultPageSize();
diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js
index d2a5ac9af8..263cbb441a 100644
--- a/dashboard-ui/scripts/itemdetailpage.js
+++ b/dashboard-ui/scripts/itemdetailpage.js
@@ -57,11 +57,27 @@
$('#playExternalButtonContainer', page).hide();
}
- if (item.LocalTrailerCount && item.LocationType !== "Offline" && item.PlayAccess == 'Full') {
+ if (item.LocalTrailerCount && item.PlayAccess == 'Full') {
$('#trailerButtonContainer', page).show();
} else {
$('#trailerButtonContainer', page).hide();
}
+
+ if (!item.LocalTrailerCount && item.RemoteTrailers.length && item.PlayAccess == 'Full') {
+ $('#externalTrailerButtonContainer', page).show();
+
+ $('#btnPlayExternalTrailer', page).attr('href', item.RemoteTrailers[0].Url);
+
+ } else {
+ $('#externalTrailerButtonContainer', page).hide();
+ $('#btnPlayExternalTrailer', page).attr('href', '#');
+ }
+
+ if (user.Configuration.IsAdministrator) {
+ $('.btnSplitVersions', page).show();
+ } else {
+ $('.btnSplitVersions', page).hide();
+ }
});
if (item.LocationType == "Offline") {
@@ -203,12 +219,7 @@
$('#scenesCollapsible', page).show();
renderScenes(page, item, user, 4);
}
- if (item.LocalTrailerCount || !item.RemoteTrailers.length || item.Type == "Trailer") {
- $('#trailersCollapsible', page).addClass('hide');
- } else {
- $('#trailersCollapsible', page).removeClass('hide');
- renderTrailers(page, item, user);
- }
+
if (!item.SpecialFeatureCount || item.SpecialFeatureCount == 0 || item.Type == "Series") {
$('#specialsCollapsible', page).addClass('hide');
} else {
@@ -745,7 +756,7 @@
ApiClient.getCriticReviews(item.Id, options).done(function (result) {
- if (result.TotalRecordCount || item.CriticRatingSummary) {
+ if (result.TotalRecordCount || item.CriticRatingSummary || item.AwardSummary) {
$('#criticReviewsCollapsible', page).show();
renderCriticReviewsContent(page, result, limit);
} else {
@@ -897,7 +908,7 @@
function renderAlternateVersions(page, item, user) {
- var url = ApiClient.getUrl("Videos/" + item.Id + "/AlternateVersions", {
+ var url = ApiClient.getUrl("Videos/" + item.Id + "/Versions", {
userId: user.Id
});
@@ -920,7 +931,8 @@
centerText: true,
formatIndicators: true,
linkItem: false,
- showProgress: false
+ showProgress: false,
+ showUnplayedIndicator: false
});
$('#alternateVersionsContent', page).html(html).trigger('create');
@@ -1021,7 +1033,7 @@
}
if (stream.Width || stream.Height) {
- attributes.push('
' + stream.Width + 'x' + stream.Height + '');
+ attributes.push('
' + stream.Width + 'x' + stream.Height + '');
}
if (stream.AspectRatio && stream.Codec != "mjpeg") {
@@ -1128,38 +1140,6 @@
});
}
- function renderTrailers(page, item, user) {
-
- if (item.Type == "Trailer") {
- $('#trailerSectionHeader', page).html('More trailers');
- } else {
- $('#trailerSectionHeader', page).html('Trailers');
- }
-
- var remoteTrailersHtml = '';
-
- for (var i = 0, length = item.RemoteTrailers.length; i < length; i++) {
-
- var trailer = item.RemoteTrailers[i];
-
- var id = getParameterByName('v', trailer.Url);
-
- if (id) {
- remoteTrailersHtml += '
';
- }
- }
-
- var elem = $('#trailersContent', page).html(remoteTrailersHtml).css({ "position": "relative", "z-index": 0 });
-
- if (item.LocalTrailerCount) {
- ApiClient.getLocalTrailers(user.Id, item.Id).done(function (trailers) {
-
- elem.prepend(getVideosHtml(trailers, user));
-
- });
- }
- }
-
function renderCast(page, item, context, limit) {
var html = '';
@@ -1232,6 +1212,39 @@
MediaPlayer.play([currentItem], startPosition);
}
+ function splitVersions(page) {
+
+ var id = getParameterByName('id');
+
+ Dashboard.confirm("Are you sure you wish to split the versions apart into separate items?", "Split Versions Apart", function (confirmResult) {
+
+ if (confirmResult) {
+
+ Dashboard.showLoadingMsg();
+
+ $.ajax({
+ type: "DELETE",
+ url: ApiClient.getUrl("Videos/" + id + "/AlternateVersions")
+
+ }).done(function () {
+
+ Dashboard.hideLoadingMsg();
+
+ reload(page);
+ });
+ }
+ });
+ }
+
+ function playTrailer(page) {
+
+ ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), currentItem.Id).done(function (trailers) {
+
+ MediaPlayer.play(trailers);
+
+ });
+ }
+
$(document).on('pageinit', "#itemDetailPage", function () {
var page = this;
@@ -1249,12 +1262,7 @@
});
$('#btnPlayTrailer', page).on('click', function () {
-
- ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), currentItem.Id).done(function (trailers) {
-
- MediaPlayer.play(trailers);
-
- });
+ playTrailer(page);
});
$('#btnPlayExternal', page).on('click', function () {
@@ -1275,6 +1283,11 @@
});
});
+ $('.btnSplitVersions', page).on('click', function () {
+
+ splitVersions(page);
+ });
+
}).on('pageshow', "#itemDetailPage", function () {
var page = this;
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index 0337402364..39f95e7550 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -733,7 +733,7 @@
var chkItemSelectId = 'chkItemSelect' + i;
// Render this pre-enhanced to save on jquery mobile dom manipulation
- html += '
';
+ html += '
';
}
diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js
index ed448b68a1..adaba1bfa3 100644
--- a/dashboard-ui/scripts/librarylist.js
+++ b/dashboard-ui/scripts/librarylist.js
@@ -365,7 +365,7 @@
var msg = "The following titles will be grouped into one item:
" + names;
- msg += "
Media Browser clients will choose the optimal version to play based on device and network conditions. Are you sure you wish to continue?";
+ msg += "
Media Browser clients will automatically choose the optimal version to play based on device and network performance. Are you sure you wish to continue?";
Dashboard.confirm(msg, "Group Versions", function (confirmResult) {
@@ -397,10 +397,6 @@
toggleSelections(page);
});
- $('.itemsContainer', page).on('listrender', function () {
- hideSelections(page);
- });
-
$('.btnMergeVersions', page).on('click', function () {
combineVersions(page);
});
diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js
index 8cb64c2e10..e670c38d59 100644
--- a/dashboard-ui/scripts/movies.js
+++ b/dashboard-ui/scripts/movies.js
@@ -67,7 +67,7 @@
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
- $('#items', page).html(html).trigger('create').createPosterItemMenus().trigger('listrender');
+ $('#items', page).html(html).trigger('create').createPosterItemMenus();
$('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit;
diff --git a/dashboard-ui/scripts/scheduledtaskpage.js b/dashboard-ui/scripts/scheduledtaskpage.js
index af1ebe5b51..a3f1e31022 100644
--- a/dashboard-ui/scripts/scheduledtaskpage.js
+++ b/dashboard-ui/scripts/scheduledtaskpage.js
@@ -102,11 +102,11 @@
hours = 0;
}
- hours = hours.toFixed(0);
+ hours = Math.floor(hours);
ticks -= (hours * 36000000000);
- var minutes = (ticks / 600000000).toFixed(0);
+ var minutes = Math.floor((ticks / 600000000));
var suffix = "am";