diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css
index 6549e3b4f1..0a563aeaef 100644
--- a/dashboard-ui/css/site.css
+++ b/dashboard-ui/css/site.css
@@ -66,6 +66,12 @@ body {
overflow-y: hidden !important;
}
+.jqmButtonNoText {
+ padding: 3px 4px!important;
+ border-radius: 4px!important;
+ vertical-align: top;
+}
+
.textlink {
text-decoration: none;
}
diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html
index 8c48744bd3..2102e20abc 100644
--- a/dashboard-ui/itemdetails.html
+++ b/dashboard-ui/itemdetails.html
@@ -134,7 +134,7 @@
${ButtonPlayTrailer}
${ButtonPlay}
${ButtonSync}
-
+
@@ -161,7 +161,7 @@
${ButtonPlayTrailer}
${ButtonPlay}
${ButtonSync}
-
+
';
- if (linkToGallery) {
- html += "
";
- }
-
html += "
";
- if (linkToGallery) {
- html += "";
- }
-
var progressHtml = item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData));
if (progressHtml) {
@@ -2322,15 +2319,10 @@
}
if (!href) {
- href = "itemgallery.html?id=" + item.Id;
+ href = "#";
}
- var linkToGallery = LibraryBrowser.shouldDisplayGallery(item);
-
html += '
';
- if (linkToGallery) {
- html += "
";
- }
if (detectRatio && item.PrimaryImageAspectRatio) {
@@ -2343,10 +2335,6 @@
html += "
";
- if (linkToGallery) {
- html += "";
- }
-
var progressHtml = item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData));
if (progressHtml) {
@@ -2663,161 +2651,7 @@
$('#itemBackdrop', page).addClass('noBackdrop').css('background-image', 'none');
}
- },
-
- shouldDisplayGallery: function (item) {
-
- var imageTags = item.ImageTags || {};
-
- if (imageTags.Primary) {
-
- return true;
- }
-
- if (imageTags.Banner) {
-
- return true;
- }
-
- if (imageTags.Logo) {
-
- return true;
- }
- if (imageTags.Thumb) {
-
- return true;
- }
- if (imageTags.Art) {
-
- return true;
-
- }
- if (imageTags.Menu) {
-
- return true;
-
- }
- if (imageTags.Disc) {
-
- return true;
- }
- if (imageTags.Box) {
-
- return true;
- }
- if (imageTags.BoxRear) {
-
- return true;
- }
-
- if (item.BackdropImageTags && item.BackdropImageTags.length) {
- return true;
-
- }
-
- if (item.ScreenshotImageTags && item.ScreenshotImageTags.length) {
- return true;
- }
-
- return false;
- },
-
- getGalleryHtml: function (item) {
-
- var html = '';
- var i, length;
-
- var imageTags = item.ImageTags || {};
-
- if (imageTags.Primary) {
-
- html += LibraryBrowser.createGalleryImage(item, "Primary", imageTags.Primary);
- }
-
- if (imageTags.Banner) {
-
- html += LibraryBrowser.createGalleryImage(item, "Banner", imageTags.Banner);
- }
-
- if (imageTags.Logo) {
-
- html += LibraryBrowser.createGalleryImage(item, "Logo", imageTags.Logo);
- }
- if (imageTags.Thumb) {
-
- html += LibraryBrowser.createGalleryImage(item, "Thumb", imageTags.Thumb);
- }
- if (imageTags.Art) {
-
- html += LibraryBrowser.createGalleryImage(item, "Art", imageTags.Art);
-
- }
- if (imageTags.Menu) {
-
- html += LibraryBrowser.createGalleryImage(item, "Menu", imageTags.Menu);
-
- }
- if (imageTags.Box) {
-
- html += LibraryBrowser.createGalleryImage(item, "Box", imageTags.Box);
- }
- if (imageTags.BoxRear) {
-
- html += LibraryBrowser.createGalleryImage(item, "BoxRear", imageTags.BoxRear);
- }
-
- if (item.BackdropImageTags) {
-
- for (i = 0, length = item.BackdropImageTags.length; i < length; i++) {
- html += LibraryBrowser.createGalleryImage(item, "Backdrop", item.BackdropImageTags[i], i);
- }
-
- }
-
- if (item.ScreenshotImageTags) {
-
- for (i = 0, length = item.ScreenshotImageTags.length; i < length; i++) {
- html += LibraryBrowser.createGalleryImage(item, "Screenshot", item.ScreenshotImageTags[i], i);
- }
- }
- if (imageTags.Disc) {
-
- html += LibraryBrowser.createGalleryImage(item, "Disc", imageTags.Disc);
- }
-
- return html;
- },
-
- createGalleryImage: function (item, type, tag, index) {
-
- var screenWidth = Math.max(screen.height, screen.width);
-
- var html = '';
-
- if (typeof (index) == "undefined") index = 0;
-
- html += '
';
-
- html += '';
-
- return html;
}
-
};
})(window, document, jQuery, screen, window.store);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js
index 5e0b0cbd40..470e2d6946 100644
--- a/dashboard-ui/scripts/librarylist.js
+++ b/dashboard-ui/scripts/librarylist.js
@@ -396,6 +396,10 @@
html += '
' + Globalize.translate('ButtonAddToPlaylist') + '';
}
+ if (commands.indexOf('delete') != -1) {
+ html += '
' + Globalize.translate('ButtonDelete') + '';
+ }
+
if (user.Policy.IsAdministrator && commands.indexOf('edit') != -1) {
html += '
' + Globalize.translate('ButtonEdit') + '';
}
@@ -450,10 +454,6 @@
html += '
' + Globalize.translate('ButtonSync') + '';
}
- if (commands.indexOf('delete') != -1) {
- html += '
' + Globalize.translate('ButtonDelete') + '';
- }
-
html += '';
html += '
';
diff --git a/dashboard-ui/scripts/livetvrecording.js b/dashboard-ui/scripts/livetvrecording.js
index ab0e739e96..949992d7a9 100644
--- a/dashboard-ui/scripts/livetvrecording.js
+++ b/dashboard-ui/scripts/livetvrecording.js
@@ -63,21 +63,17 @@
$('.recordingStatus', page).html('Status: ' + item.Status);
- Dashboard.getCurrentUser().done(function (user) {
+ if (MediaController.canPlay(item)) {
+ $('#playButtonContainer', page).show();
+ } else {
+ $('#playButtonContainer', page).hide();
+ }
- if (MediaController.canPlay(item)) {
- $('#playButtonContainer', page).show();
- } else {
- $('#playButtonContainer', page).hide();
- }
-
- if (user.Policy.IsAdministrator && item.LocationType !== "Offline") {
- $('#deleteButtonContainer', page).show();
- } else {
- $('#deleteButtonContainer', page).hide();
- }
-
- });
+ if (item.CanDelete) {
+ $('#deleteButtonContainer', page).show();
+ } else {
+ $('#deleteButtonContainer', page).hide();
+ }
LiveTvHelpers.renderOriginalAirDate($('.airDate', page), item);
diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js
index 94a641f445..5a869f80a4 100644
--- a/dashboard-ui/scripts/mediaplayer-video.js
+++ b/dashboard-ui/scripts/mediaplayer-video.js
@@ -1059,6 +1059,7 @@
VideoCodec: mp4Quality.videoCodec,
AudioCodec: mp4Quality.audioCodec,
profile: 'high',
+ //EnableAutoStreamCopy: false,
level: '41'
}));
diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js
index 4467ef017c..ed2365284e 100644
--- a/dashboard-ui/scripts/mediaplayer.js
+++ b/dashboard-ui/scripts/mediaplayer.js
@@ -106,9 +106,14 @@
// Chrome, Firefox or IE with plugin installed
// For some reason in chrome pausing mp4 is causing the video to fail.
// So for now it will have to prioritize webm
- if (self.canPlayWebm() && ($.browser.chrome || $.browser.msie)) {
+ if (self.canPlayWebm()) {
- return '.webm';
+ if ($.browser.msie) {
+ return '.webm';
+ }
+ if ($.browser.chrome) {
+ return '.webm';
+ }
}
return '.mp4';
@@ -551,8 +556,8 @@
ApiClient.getJSON(ApiClient.getUrl('Items/' + item.Id + '/MediaInfo', {
userId: Dashboard.getCurrentUserId()
- })).done(function(result) {
-
+ })).done(function (result) {
+
self.currentItem = item;
self.currentMediaSource = getOptimalMediaSource(item.MediaType, result.MediaSources);
diff --git a/dashboard-ui/scripts/moviecollections.js b/dashboard-ui/scripts/moviecollections.js
index 77c563e5d0..00d9abc3e5 100644
--- a/dashboard-ui/scripts/moviecollections.js
+++ b/dashboard-ui/scripts/moviecollections.js
@@ -9,7 +9,7 @@
SortOrder: "Ascending",
IncludeItemTypes: "BoxSet",
Recursive: true,
- Fields: "PrimaryImageAspectRatio,SortName,SyncInfo",
+ Fields: "PrimaryImageAspectRatio,SortName,SyncInfo,CanDelete",
StartIndex: 0,
ImageTypeLimit: 1,
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
diff --git a/dashboard-ui/scripts/playlists.js b/dashboard-ui/scripts/playlists.js
index 2937634b6d..18602e0511 100644
--- a/dashboard-ui/scripts/playlists.js
+++ b/dashboard-ui/scripts/playlists.js
@@ -9,7 +9,7 @@
SortOrder: "Ascending",
IncludeItemTypes: "Playlist",
Recursive: true,
- Fields: "PrimaryImageAspectRatio,SortName,CumulativeRunTimeTicks",
+ Fields: "PrimaryImageAspectRatio,SortName,CumulativeRunTimeTicks,CanDelete",
StartIndex: 0
};
diff --git a/dashboard-ui/scripts/useredit.js b/dashboard-ui/scripts/useredit.js
index 881a758d53..76fd641be9 100644
--- a/dashboard-ui/scripts/useredit.js
+++ b/dashboard-ui/scripts/useredit.js
@@ -27,7 +27,9 @@
$('#chkIsHidden', page).checked(user.Policy.IsHidden).checkboxradio("refresh");
$('#chkRemoteControlSharedDevices', page).checked(user.Policy.EnableSharedDeviceControl).checkboxradio("refresh");
$('#chkEnableRemoteControlOtherUsers', page).checked(user.Policy.EnableRemoteControlOfOtherUsers).checkboxradio("refresh");
+
$('#chkEnableMediaPlayback', page).checked(user.Policy.EnableMediaPlayback).checkboxradio("refresh");
+ $('#chkEnableDownloading', page).checked(user.Policy.EnableContentDownloading).checkboxradio("refresh");
$('#chkManageLiveTv', page).checked(user.Policy.EnableLiveTvManagement).checkboxradio("refresh");
$('#chkEnableLiveTvAccess', page).checked(user.Policy.EnableLiveTvAccess).checkboxradio("refresh");
@@ -68,12 +70,14 @@
user.Policy.IsDisabled = $('#chkDisabled', page).checked();
user.Policy.EnableRemoteControlOfOtherUsers = $('#chkEnableRemoteControlOtherUsers', page).checked();
user.Policy.EnableLiveTvManagement = $('#chkManageLiveTv', page).checked();
- user.Policy.EnableMediaPlayback = $('#chkEnableMediaPlayback', page).checked();
user.Policy.EnableLiveTvAccess = $('#chkEnableLiveTvAccess', page).checked();
user.Policy.EnableContentDeletion = $('#chkEnableContentDeletion', page).checked();
user.Policy.EnableUserPreferenceAccess = !$('#chkDisableUserPreferences', page).checked();
user.Policy.EnableSharedDeviceControl = $('#chkRemoteControlSharedDevices', page).checked();
+ user.Policy.EnableMediaPlayback = $('#chkEnableMediaPlayback', page).checked();
+ user.Policy.EnableContentDownloading = $('#chkEnableDownloading', page).checked();
+
user.Policy.EnableSync = $('#chkEnableSync', page).checked();
ApiClient.updateUser(user).done(function () {
diff --git a/dashboard-ui/useredit.html b/dashboard-ui/useredit.html
index 0863f77078..03e96e74b4 100644
--- a/dashboard-ui/useredit.html
+++ b/dashboard-ui/useredit.html
@@ -41,14 +41,16 @@