From 7835a9d3e6073f53b918459b24a9ca245be62745 Mon Sep 17 00:00:00 2001 From: softworkz Date: Fri, 12 Feb 2016 23:42:11 +0100 Subject: [PATCH 01/12] Refactored organization dialog as a component --- dashboard-ui/autoorganizelog.html | 46 +- .../emby-apiclient/apiclient.js | 33 ++ .../components/fileorganizer/fileorganizer.js | 501 ++++++++++++++++++ .../fileorganizer/fileorganizer.template.html | 120 +++++ dashboard-ui/scripts/autoorganizelog.js | 135 +++-- dashboard-ui/strings/javascript/en-US.json | 1 + .../strings/javascript/javascript.json | 1 + 7 files changed, 718 insertions(+), 119 deletions(-) create mode 100644 dashboard-ui/components/fileorganizer/fileorganizer.js create mode 100644 dashboard-ui/components/fileorganizer/fileorganizer.template.html diff --git a/dashboard-ui/autoorganizelog.html b/dashboard-ui/autoorganizelog.html index 419774564e..1c4f5872cd 100644 --- a/dashboard-ui/autoorganizelog.html +++ b/dashboard-ui/autoorganizelog.html @@ -1,11 +1,11 @@  + ${TitleAutoOrganize} -
- +
@@ -52,48 +52,6 @@
- -
diff --git a/dashboard-ui/bower_components/emby-apiclient/apiclient.js b/dashboard-ui/bower_components/emby-apiclient/apiclient.js index 4b112ab836..1cef9a3711 100644 --- a/dashboard-ui/bower_components/emby-apiclient/apiclient.js +++ b/dashboard-ui/bower_components/emby-apiclient/apiclient.js @@ -1127,6 +1127,39 @@ }); }; + self.performMovieOrganization = function (id, options) { + + var url = self.getUrl("Library/FileOrganizations/" + id + "/Movie/Organize", options || {}); + + return self.ajax({ + type: "POST", + url: url + }); + }; + + self.getSmartMatchInfos = function (options) { + + options = options || {}; + + var url = self.getUrl("Library/FileOrganizationSmartMatch", options); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + + self.deleteSmartMatchEntry = function (id, options) { + + var url = self.getUrl("Library/FileOrganizationSmartMatch/" + id + "/Delete", options || {}); + + return self.ajax({ + type: "POST", + url: url + }); + }; + self.getLiveTvSeriesTimer = function (id) { if (!id) { diff --git a/dashboard-ui/components/fileorganizer/fileorganizer.js b/dashboard-ui/components/fileorganizer/fileorganizer.js new file mode 100644 index 0000000000..12d5a60a1b --- /dev/null +++ b/dashboard-ui/components/fileorganizer/fileorganizer.js @@ -0,0 +1,501 @@ +define(['paperdialoghelper', 'paper-tabs', 'paper-item', 'paper-input', 'paper-fab', 'paper-item-body'], function (paperDialogHelper) { + + var currentItemId; + var currentFile; + var currentDeferred; + var hasChanges = false; + var reloadItems; + + function submitEpisodeForm(form) { + + Dashboard.showLoadingMsg(); + + var resultId = $('#hfResultId', form).val(); + + var targetFolder = $('#spanTargetFolder', form).text(); + + var elemString = $('#hfNewSeriesProviderIds', form).val(); + var newSeriesName = $('#hfNewSeriesName', form).val(); + var newSeriesYear = $('#hfNewSeriesYear', form).val(); + + var options = { + + SeriesId: $('#selectSeries', form).val(), + SeasonNumber: $('#txtSeason', form).val(), + EpisodeNumber: $('#txtEpisode', form).val(), + EndingEpisodeNumber: $('#txtEndingEpisode', form).val(), + RememberCorrection: $('#chkRememberCorrection', form).checked(), + NewSeriesProviderIds: elemString, + NewSeriesName: newSeriesName, + NewSeriesYear: newSeriesYear, + TargetFolder: targetFolder + }; + + ApiClient.performEpisodeOrganization(resultId, options).then(function () { + + Dashboard.hideLoadingMsg(); + + document.querySelector('.organizerDialog').close(); + + reloadItems(); + + }, onApiFailure); + } + + function submitMovieForm(form) { + + Dashboard.showLoadingMsg(); + + var resultId = $('#hfResultIdMovie', form).val(); + + var targetFolder = $('#selectMovieFolder', form).val(); + + var options = { + MovieName: $('#txtMovieName', form).val(), + MovieYear: $('#txtMovieYear', form).val(), + TargetFolder: targetFolder + }; + + ApiClient.performMovieOrganization(resultId, options).then(function () { + + Dashboard.hideLoadingMsg(); + + document.querySelector('.organizerDialog').close(); + + reloadItems(); + + }, onApiFailure); + } + + function searchForIdentificationResults(popup, itemtype) { + + var lookupInfo = { + Name: $('#txtMovieName', popup).val(), + Year: $('#txtMovieYear', popup).val(), + }; + + var url = ApiClient.getUrl("Items/RemoteSearch/Movie"); + + if (itemtype == 'tvshows') { + lookupInfo.Name = $('#txtNewSeriesName', popup).val(); + lookupInfo.Year = $('#txtNewSeriesYear', popup).val(); + url = ApiClient.getUrl("Items/RemoteSearch/Series"); + } + + if (!lookupInfo.Name) { + Dashboard.alert(Globalize.translate('MessagePleaseEnterNameOrId')); + return; + } + + lookupInfo = { + SearchInfo: lookupInfo, + IncludeDisabledProviders: true + }; + + Dashboard.showLoadingMsg(); + + ApiClient.ajax({ + type: "POST", + url: url, + data: JSON.stringify(lookupInfo), + dataType: "json", + contentType: "application/json" + + }).then(function (results) { + + Dashboard.hideLoadingMsg(); + showIdentificationSearchResults(popup, results, itemtype); + + $('#btnBack', popup).off('click').on('click', function () { + $('.identificationResultForm', popup).hide(); + $('.organizeMovieForm', popup).show(); + $('.createSeriesForm', popup).show(); + + if (itemtype == 'tvshows') { + $('#btnBack', popup).off('click').on('click', function () { + $('.createSeriesForm', popup).hide(); + $('.episodeCorrectionForm', popup).show(); + + $('#btnBack', popup).off('click').on('click', function () { + popup.close(); + }); + }); + } + else { + $('#btnBack', popup).off('click').on('click', function () { + popup.close(); + }); + } + }); + + }, onApiFailure); + } + + function showIdentificationSearchResults(popup, results, itemtype) { + + $('.organizeMovieForm', popup).hide(); + $('.createSeriesForm', popup).hide(); + $('.identificationResultForm', popup).show(); + + var html = ''; + + for (var i = 0, length = results.length; i < length; i++) { + + var result = results[i]; + + html += getIdentifyResultHtml(result, i); + } + + var elem = $('.identificationSearchResultList', popup).html(html).trigger('create'); + + $('.searchImage', elem).on('click', function () { + + var index = parseInt(this.getAttribute('data-index')); + + var currentResult = results[index]; + + $('.identificationResultForm', popup).hide(); + + var targetName = currentResult.Name; + if (currentResult.ProductionYear) { + targetName = targetName + ' (' + currentResult.ProductionYear + ')'; + } + + if (itemtype == 'tvshows') { + $('#txtNewSeriesName', popup).val(currentResult.Name); + $('#txtNewSeriesYear', popup).val(currentResult.ProductionYear); + $('#txtSelectedNewSeries', popup).val(targetName); + $('#txtSelectedNewSeries2', popup).val(targetName); + $('#hfNewSeriesName', popup).val(currentResult.Name); + $('#hfNewSeriesYear', popup).val(currentResult.ProductionYear); + var elems = currentResult.ProviderIds; + $('#hfNewSeriesProviderIds', popup).val(JSON.stringify(elems)); + $('.createSeriesForm', popup).show(); + $('#btnBack', popup).off('click').on('click', function () { + $('.createSeriesForm', popup).hide(); + $('.episodeCorrectionForm', popup).show(); + $('#btnBack', popup).off('click').on('click', function () { + popup.close(); + }); + }); + } + else { + $('#txtMovieName', popup).val(currentResult.Name); + $('#txtMovieYear', popup).val(currentResult.ProductionYear); + $('#txtSelectedMovie', popup).val(targetName); + $('.organizeMovieForm', popup).show(); + $('#btnBack', popup).off('click').on('click', function () { + popup.close(); + }); + } + }); + } + + function getSearchImageDisplayUrl(url, provider) { + return ApiClient.getUrl("Items/RemoteSearch/Image", { imageUrl: url, ProviderName: provider }); + } + + function getIdentifyResultHtml(result, index) { + + var html = ''; + var cssClass = "searchImageContainer remoteImageContainer"; + + cssClass += " searchPosterImageContainer"; + + html += '
'; + + if (result.ImageUrl) { + var displayUrl = getSearchImageDisplayUrl(result.ImageUrl, result.SearchProviderName); + + html += ''; + } else { + + html += ''; + } + html += ''; + + html += '
'; + html += result.Name; + html += '
'; + + html += '
'; + html += result.ProductionYear || ' '; + html += '
'; + + html += '
'; + return html; + } + + function onEpisodeCorrectionFormSubmit() { + submitEpisodeForm(this); + return false; + } + + function onOrganizeMovieFormFormSubmit() { + submitMovieForm(this); + return false; + } + + function showTab(popup, index) { + $('.organizeMovieForm', popup).show(); + $('.episodeCorrectionForm', popup).show(); + $('.identificationResultForm', popup).hide(); + $('.createSeriesForm', popup).hide(); + $('.popupTabPage', popup).addClass('hide')[index].classList.remove('hide'); + + $('#btnBack', popup).off('click').on('click', function () { + popup.close(); + }); + } + + function initEditor(popup, item, allSeries, movieLocations, seriesLocations) { + + $('#divNewSeries', popup).hide(); + + showTab(popup, 0); + + $('.inputFile', popup).html(item.OriginalFileName); + + $('#txtSeason', popup).val(item.ExtractedSeasonNumber); + $('#txtEpisode', popup).val(item.ExtractedEpisodeNumber); + $('#txtEndingEpisode', popup).val(item.ExtractedEndingEpisodeNumber); + + $('#chkRememberCorrection', popup).val(false); + $('.extractedName', popup).html(item.ExtractedName); + + if (!item.ExtractedName || item.ExtractedName.length < 4) { + $('#divRememberCorrection', popup).hide(); + } + + $('#txtNewSeriesName', popup).val(item.ExtractedName); + $('#txtNewSeriesYear', popup).val(item.ExtractedYear); + + $('#hfResultId', popup).val(item.Id); + $('#hfResultIdMovie', popup).val(item.Id); + $('#hfNewSeriesProviderIds', popup).val(null); + $('#hfNewSeriesName', popup).val(null); + $('#hfNewSeriesYear', popup).val(null); + + $('#txtSelectedNewSeries', popup).val(null); + $('#txtSelectedNewSeries2', popup).val(null); + + $('#txtMovieName', popup).val(item.ExtractedMovieName); + $('#txtMovieYear', popup).val(item.ExtractedMovieYear); + $('#txtSelectedMovie', popup).val(null); + + var seriesHtml = allSeries.map(function (s) { + + return ''; + + }).join(''); + + seriesHtml = '' + seriesHtml; + + $('#selectSeries', popup).html(seriesHtml); + + + var movieFolderHtml = movieLocations.map(function (s) { + return ''; + }).join(''); + + if (movieLocations.length > 1) { + movieFolderHtml = '' + movieFolderHtml; + } + + var seriesFolderHtml = seriesLocations.map(function (s) { + return ''; + }).join(''); + + if (seriesLocations.length > 1) { + seriesFolderHtml = '' + seriesFolderHtml; + } + + $('#selectMovieFolder', popup).html(movieFolderHtml); + $('#selectSeriesFolder', popup).html(seriesFolderHtml); + + $('.episodeCorrectionForm').off('submit', onEpisodeCorrectionFormSubmit).on('submit', onEpisodeCorrectionFormSubmit); + $('.organizeMovieForm').off('submit', onOrganizeMovieFormFormSubmit).on('submit', onOrganizeMovieFormFormSubmit); + + $('#btnIdentifyMovie', popup).on('click', function () { + searchForIdentificationResults(popup, 'movies'); + }); + + $('#btnIdentifySeries', popup).on('click', function () { + searchForIdentificationResults(popup, 'tvshows'); + }); + + $('.txt-readonly', popup).keydown(function (e) { + e.preventDefault(); + }); + + $('#btnNewSeries', popup).on('click', function () { + $('.episodeCorrectionForm', popup).hide(); + $('.createSeriesForm', popup).show(); + + $('#btnBack', popup).off('click').on('click', function () { + + $('.createSeriesForm', popup).hide(); + $('.episodeCorrectionForm', popup).show(); + + $('#btnBack', popup).off('click').on('click', function () { + popup.close(); + }); + }); + }); + + $('.createSeriesForm').off('submit').on('submit', function () { + var folder = $('#selectSeriesFolder', popup).val(); + $('#spanTargetFolder', popup).text(folder); + + $('#divSelectSeries', popup).hide(); + $('#divNewSeries', popup).show(); + $('.episodeCorrectionForm', popup).show(); + $('.createSeriesForm', popup).hide(); + + $('#btnBack', popup).off('click').on('click', function () { + popup.close(); + }); + + return false; + }); + } + + function showEditor(page, item, allSeries, movieLocations, seriesLocations, reloadDelegate) { + + reloadItems = reloadDelegate; + + var xhr = new XMLHttpRequest(); + xhr.open('GET', 'components/fileorganizer/fileorganizer.template.html', true); + + xhr.onload = function (e) { + + var template = this.response; + + var dlg = createDialog(); + dlg.setAttribute('id', 'with-backdrop'); + + var html = ''; + //html += '
'; + html += '

'; + html += ''; + html += '
' + Globalize.translate('FileOrganizeManually') + '
'; + html += '

'; + //html += '
'; + + html += '
'; + html += 'TV Episode'; + html += 'Movie'; + html += '
' + + html += '
'; + html += Globalize.translateDocument(template); + html += '
'; + + dlg.innerHTML = html; + document.body.appendChild(dlg); + + initEditor(dlg, item, allSeries, movieLocations, seriesLocations); + + // Has to be assigned a z-index after the call to .open() + $(dlg).on('iron-overlay-closed', onDialogClosed); + + var tabs = dlg.querySelector('paper-tabs'); + + $(tabs).on('iron-select', function () { + + var self = this; + + var selected = this.selected; + showTab(dlg, selected); + + //setTimeout(function () { + // Events.trigger(self, 'tabchange'); + //}, 400); + + }); + + //.on('tabchange', function () { + // var selected = this.selected; + + // showTab(dlg, selected); + //}); + + dlg.classList.add('organizerDialog'); + + paperDialogHelper.open(dlg); + //PaperDialogHelper.openWithHash(dlg, 'fileorganizer'); + //dlg.open(); + + $('#btnBack', dlg).on('click', function () { + paperDialogHelper.close(dlg); + }); + }; + + xhr.send(); + } + + function createDialog() { + //var dlg = document.createElement('paper-dialog'); + + var dlg = paperDialogHelper.createDialog({ + removeOnClose: true + }); + + dlg.setAttribute('with-backdrop', 'with-backdrop'); + dlg.setAttribute('role', 'alertdialog'); + + // without this safari will scroll the background instead of the dialog contents + // but not needed here since this is already on top of an existing dialog + dlg.setAttribute('modal', 'modal'); + + dlg.setAttribute('noAutoFocus', 'noAutoFocus'); + dlg.entryAnimation = 'scale-up-animation'; + dlg.exitAnimation = 'fade-out-animation'; + dlg.classList.add('ui-body-a'); + dlg.classList.add('background-theme-a'); + dlg.classList.add('smoothScrollY'); + + return dlg; + } + + function onApiFailure(e) { + + Dashboard.hideLoadingMsg(); + + document.querySelector('.organizerDialog').close(); + + if (e.status == 0) { + Dashboard.alert({ + title: 'Auto-Organize', + message: 'The operation is going to take a little longer. The view will be updated on completion.' + }); + } + else { + Dashboard.alert({ + title: Globalize.translate('AutoOrganizeError'), + message: Globalize.translate('ErrorOrganizingFileWithErrorCode', e.getResponseHeader("X-Application-Error-Code")) + }); + } + } + + function onDialogClosed() { + + $(this).remove(); + Dashboard.hideLoadingMsg(); + currentDeferred.resolveWith(null, [hasChanges]); + } + + window.FileOrganizer = { + show: function (page, item, allSeries, movieLocations, seriesLocations, reloadDelegate) { + + var deferred = DeferredBuilder.Deferred(); + + currentDeferred = deferred; + hasChanges = false; + + showEditor(page, item, allSeries, movieLocations, seriesLocations, reloadDelegate); + + return deferred.promise(); + } + }; +}); diff --git a/dashboard-ui/components/fileorganizer/fileorganizer.template.html b/dashboard-ui/components/fileorganizer/fileorganizer.template.html new file mode 100644 index 0000000000..cedd5cd843 --- /dev/null +++ b/dashboard-ui/components/fileorganizer/fileorganizer.template.html @@ -0,0 +1,120 @@ +
+
+

+
+
+ + +
+ +
+ +
+ + +
+
+ + +
+
+ + +
${LabelEndingEpisodeNumberHelp}
+
+
+ + + +
+

+ +

+ + + + +
+ +
+

+
+ + +
+
+ + +
+
+ +
+
+ + + +
+
+ + +
+

+ +

+
+ +
+
+
+

+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+

+ +

+ +
+
+ +
+
+ +
+
+
+
+
diff --git a/dashboard-ui/scripts/autoorganizelog.js b/dashboard-ui/scripts/autoorganizelog.js index bbc243b0c0..d31960e7ce 100644 --- a/dashboard-ui/scripts/autoorganizelog.js +++ b/dashboard-ui/scripts/autoorganizelog.js @@ -54,41 +54,57 @@ Dashboard.showLoadingMsg(); + var seriesItems; + ApiClient.getItems(null, { recursive: true, includeItemTypes: 'Series', sortBy: 'SortName' }).then(function (result) { - Dashboard.hideLoadingMsg(); - showEpisodeCorrectionPopup(page, item, result.Items); - }, onApiFailure); + seriesItems = result.Items; + + ApiClient.getVirtualFolders().then(function (result) { + + Dashboard.hideLoadingMsg(); + + var movieLocations = []; + var seriesLocations = []; + + for (var n = 0; n < result.length; n++) { + + var virtualFolder = result[n]; + + for (var i = 0, length = virtualFolder.Locations.length; i < length; i++) { + var location = { + value: virtualFolder.Locations[i], + display: virtualFolder.Name + ': ' + virtualFolder.Locations[i] + }; + + if (virtualFolder.CollectionType == 'movies') { + movieLocations.push(location); + } + if (virtualFolder.CollectionType == 'tvshows') { + seriesLocations.push(location); + } + } + } + + showEpisodeCorrectionPopup(page, item, seriesItems, movieLocations, seriesLocations); + }, onApiFailure); + + }, onApiFailure); } - function showEpisodeCorrectionPopup(page, item, allSeries) { + function showEpisodeCorrectionPopup(page, item, allSeries, movieLocations, seriesLocations) { - var popup = $('.episodeCorrectionPopup', page).popup("open"); + require(['components/fileorganizer/fileorganizer'], function () { - $('.inputFile', popup).html(item.OriginalFileName); - - $('#txtSeason', popup).val(item.ExtractedSeasonNumber); - $('#txtEpisode', popup).val(item.ExtractedEpisodeNumber); - $('#txtEndingEpisode', popup).val(item.ExtractedEndingEpisodeNumber); - - $('#chkRememberCorrection', popup).val(false); - - $('#hfResultId', popup).val(item.Id); - - var seriesHtml = allSeries.map(function (s) { - - return ''; - - }).join(''); - - seriesHtml = '' + seriesHtml; - - $('#selectSeries', popup).html(seriesHtml); + FileOrganizer.show(page, item, allSeries, movieLocations, seriesLocations, function () { + reloadItems(page); + }); + }); } function organizeFile(page, id) { @@ -131,38 +147,9 @@ }, onApiFailure); } - }); } - function submitEpisodeForm(form) { - - Dashboard.showLoadingMsg(); - - var page = $(form).parents('.page'); - - var resultId = $('#hfResultId', form).val(); - - var options = { - - SeriesId: $('#selectSeries', form).val(), - SeasonNumber: $('#txtSeason', form).val(), - EpisodeNumber: $('#txtEpisode', form).val(), - EndingEpisodeNumber: $('#txtEndingEpisode', form).val(), - RememberCorrection: $('#chkRememberCorrection', form).checked() - }; - - ApiClient.performEpisodeOrganization(resultId, options).then(function () { - - Dashboard.hideLoadingMsg(); - - $('.episodeCorrectionPopup', page).popup("close"); - - reloadItems(page); - - }, onApiFailure); - } - function reloadItems(page) { Dashboard.showLoadingMsg(); @@ -173,7 +160,6 @@ renderResults(page, result); Dashboard.hideLoadingMsg(); - }, onApiFailure); } @@ -229,9 +215,9 @@ var status = item.Status; if (status == 'SkippedExisting') { - html += '
'; + html += ''; html += item.OriginalFileName; - html += '
'; + html += ''; } else if (status == 'Failure') { html += ''; @@ -323,14 +309,9 @@ var page = $.mobile.activePage; - if (msg.MessageType == "ScheduledTaskEnded") { + if ((msg.MessageType == 'ScheduledTaskEnded' && msg.Data.Key == 'AutoOrganize') || msg.MessageType == 'AutoOrganizeUpdate') { - var result = msg.Data; - - if (result.Key == 'AutoOrganize') { - - reloadItems(page); - } + reloadItems(page); } } @@ -338,15 +319,21 @@ Dashboard.hideLoadingMsg(); - Dashboard.alert({ - title: Globalize.translate('AutoOrganizeError'), - message: Globalize.translate('ErrorOrganizingFileWithErrorCode', e.getResponseHeader("X-Application-Error-Code")) - }); - } + var page = $.mobile.activePage; + $('.episodeCorrectionPopup', page).popup("close"); - function onEpisodeCorrectionFormSubmit() { - submitEpisodeForm(this); - return false; + if (e.status == 0) { + Dashboard.alert({ + title: 'Auto-Organize', + message: 'The operation is going to take a little longer. The view will be updated on completion.' + }); + } + else { + Dashboard.alert({ + title: Globalize.translate('AutoOrganizeError'), + message: Globalize.translate('ErrorOrganizingFileWithErrorCode', e.getResponseHeader("X-Application-Error-Code")) + }); + } } $(document).on('pageinit', "#libraryFileOrganizerLogPage", function () { @@ -361,8 +348,6 @@ }); - $('.episodeCorrectionForm').off('submit', onEpisodeCorrectionFormSubmit).on('submit', onEpisodeCorrectionFormSubmit); - }).on('pageshow', "#libraryFileOrganizerLogPage", function () { var page = this; @@ -377,7 +362,7 @@ taskKey: 'AutoOrganize' }); - $(ApiClient).on("websocketmessage.autoorganizelog", onWebSocketMessage); + Events.on(ApiClient, "websocketmessage", onWebSocketMessage); }).on('pagebeforehide', "#libraryFileOrganizerLogPage", function () { @@ -390,7 +375,7 @@ mode: 'off' }); - $(ApiClient).off("websocketmessage.autoorganizelog", onWebSocketMessage); + Events.off(ApiClient, "websocketmessage", onWebSocketMessage); }); })(jQuery, document, window); diff --git a/dashboard-ui/strings/javascript/en-US.json b/dashboard-ui/strings/javascript/en-US.json index cb8282476c..b51ab422e1 100644 --- a/dashboard-ui/strings/javascript/en-US.json +++ b/dashboard-ui/strings/javascript/en-US.json @@ -263,6 +263,7 @@ "HeaderSelectWatchFolderHelp": "Browse or enter the path to your watch folder. The folder must be writeable.", "OrganizePatternResult": "Result: {0}", "AutoOrganizeError": "Error Organizing File", + "FileOrganizeManually": "Organize File", "ErrorOrganizingFileWithErrorCode": "There was an error organizing the file. Error code: {0}.", "HeaderRestart": "Restart", "HeaderShutdown": "Shutdown", diff --git a/dashboard-ui/strings/javascript/javascript.json b/dashboard-ui/strings/javascript/javascript.json index f2eb4559fb..af6faec3ce 100644 --- a/dashboard-ui/strings/javascript/javascript.json +++ b/dashboard-ui/strings/javascript/javascript.json @@ -264,6 +264,7 @@ "HeaderSelectWatchFolderHelp": "Browse or enter the path to your watch folder. The folder must be writeable.", "OrganizePatternResult": "Result: {0}", "AutoOrganizeError": "Error Organizing File", + "FileOrganizeManually": "Organize File", "ErrorOrganizingFileWithErrorCode": "There was an error organizing the file. Error code: {0}.", "HeaderRestart": "Restart", "HeaderShutdown": "Shutdown", From 94bd1f190b0bb3b086d61a4b358c712dd2349f58 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 12 Feb 2016 22:39:36 -0500 Subject: [PATCH 02/12] removed dead code --- dashboard-ui/autoorganizelog.html | 2 +- .../emby-apiclient/apiclient.js | 23 ------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/dashboard-ui/autoorganizelog.html b/dashboard-ui/autoorganizelog.html index 1c4f5872cd..3639141499 100644 --- a/dashboard-ui/autoorganizelog.html +++ b/dashboard-ui/autoorganizelog.html @@ -5,7 +5,7 @@ ${TitleAutoOrganize} -
+
diff --git a/dashboard-ui/bower_components/emby-apiclient/apiclient.js b/dashboard-ui/bower_components/emby-apiclient/apiclient.js index 1cef9a3711..403415dab2 100644 --- a/dashboard-ui/bower_components/emby-apiclient/apiclient.js +++ b/dashboard-ui/bower_components/emby-apiclient/apiclient.js @@ -1137,29 +1137,6 @@ }); }; - self.getSmartMatchInfos = function (options) { - - options = options || {}; - - var url = self.getUrl("Library/FileOrganizationSmartMatch", options); - - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); - }; - - self.deleteSmartMatchEntry = function (id, options) { - - var url = self.getUrl("Library/FileOrganizationSmartMatch/" + id + "/Delete", options || {}); - - return self.ajax({ - type: "POST", - url: url - }); - }; - self.getLiveTvSeriesTimer = function (id) { if (!id) { From c0d966f1d8c8af3cb9b58c8c5c5d0f18d11b0bad Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 12 Feb 2016 22:40:49 -0500 Subject: [PATCH 03/12] update header --- .../components/fileorganizer/fileorganizer.js | 13 +----------- .../fileorganizer/fileorganizer.template.html | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/dashboard-ui/components/fileorganizer/fileorganizer.js b/dashboard-ui/components/fileorganizer/fileorganizer.js index 12d5a60a1b..f1f9beea22 100644 --- a/dashboard-ui/components/fileorganizer/fileorganizer.js +++ b/dashboard-ui/components/fileorganizer/fileorganizer.js @@ -385,7 +385,7 @@ html += '
'; html += 'TV Episode'; html += 'Movie'; - html += '
' + html += '
'; html += '
'; html += Globalize.translateDocument(template); @@ -441,19 +441,8 @@ removeOnClose: true }); - dlg.setAttribute('with-backdrop', 'with-backdrop'); - dlg.setAttribute('role', 'alertdialog'); - - // without this safari will scroll the background instead of the dialog contents - // but not needed here since this is already on top of an existing dialog - dlg.setAttribute('modal', 'modal'); - - dlg.setAttribute('noAutoFocus', 'noAutoFocus'); - dlg.entryAnimation = 'scale-up-animation'; - dlg.exitAnimation = 'fade-out-animation'; dlg.classList.add('ui-body-a'); dlg.classList.add('background-theme-a'); - dlg.classList.add('smoothScrollY'); return dlg; } diff --git a/dashboard-ui/components/fileorganizer/fileorganizer.template.html b/dashboard-ui/components/fileorganizer/fileorganizer.template.html index cedd5cd843..cf560c836f 100644 --- a/dashboard-ui/components/fileorganizer/fileorganizer.template.html +++ b/dashboard-ui/components/fileorganizer/fileorganizer.template.html @@ -1,8 +1,15 @@ -
+
+ +
+ ${HeaderInviteUser} +
+
+ +

-
-
+
+
@@ -10,7 +17,7 @@ New
- -
-
-

-
- - -
-
- - -
-
- -
-
- - -
-
- - -
-

- -

- -
-
- -
-
- -
-
-
-
-
+
+ + +
+
+ +
+
+ +
+
+ +
${LabelEndingEpisodeNumberHelp}
+
+
+
+ ${OptionRememberOrganizeCorrection} +
+
+ + + \ No newline at end of file diff --git a/dashboard-ui/components/guestinviter/guestinviter.js b/dashboard-ui/components/guestinviter/guestinviter.js index 83e2c229c3..568b5b742e 100644 --- a/dashboard-ui/components/guestinviter/guestinviter.js +++ b/dashboard-ui/components/guestinviter/guestinviter.js @@ -109,8 +109,8 @@ html += Globalize.translateDocument(template); dlg.innerHTML = html; - // needed for the collapsible document.body.appendChild(dlg); + // needed for the collapsible $(dlg.querySelector('form')).trigger('create'); paperDialogHelper.open(dlg); diff --git a/dashboard-ui/scripts/autoorganizelog.js b/dashboard-ui/scripts/autoorganizelog.js index d31960e7ce..b686e7e0f1 100644 --- a/dashboard-ui/scripts/autoorganizelog.js +++ b/dashboard-ui/scripts/autoorganizelog.js @@ -97,11 +97,11 @@ }, onApiFailure); } - function showEpisodeCorrectionPopup(page, item, allSeries, movieLocations, seriesLocations) { + function showEpisodeCorrectionPopup(page, item) { - require(['components/fileorganizer/fileorganizer'], function () { + require(['components/fileorganizer/fileorganizer'], function (fileorganizer) { - FileOrganizer.show(page, item, allSeries, movieLocations, seriesLocations, function () { + fileorganizer.show(item).then(function () { reloadItems(page); }); }); From 0a7c782bebe21b077a9f9ba100f7a715afe56149 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 01:13:54 -0500 Subject: [PATCH 05/12] remove identifier from global scope --- dashboard-ui/components/itemidentifier/itemidentifier.js | 2 +- dashboard-ui/scripts/librarybrowser.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard-ui/components/itemidentifier/itemidentifier.js b/dashboard-ui/components/itemidentifier/itemidentifier.js index a0ff561c88..cc5c00cf1f 100644 --- a/dashboard-ui/components/itemidentifier/itemidentifier.js +++ b/dashboard-ui/components/itemidentifier/itemidentifier.js @@ -333,7 +333,7 @@ currentDeferred.resolveWith(null, [hasChanges]); } - window.ItemIdentifier = { + return { show: function (itemId) { var deferred = DeferredBuilder.Deferred(); diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 4ccaa91a25..0bad35c621 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1061,9 +1061,9 @@ identifyItem: function (itemId) { - require(['components/itemidentifier/itemidentifier'], function () { + require(['components/itemidentifier/itemidentifier'], function (itemidentifier) { - ItemIdentifier.show(itemId); + itemidentifier.show(itemId); }); }, From e7448d63698a2d2be144d02ad09d489727bbb0fb Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 01:19:28 -0500 Subject: [PATCH 06/12] update delete smart match entry --- .../bower_components/emby-apiclient/.bower.json | 8 ++++---- .../bower_components/emby-apiclient/apiclient.js | 16 +++------------- dashboard-ui/scripts/autoorganizesmart.js | 12 ++++++------ 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json index f3acb5d871..d022c04417 100644 --- a/dashboard-ui/bower_components/emby-apiclient/.bower.json +++ b/dashboard-ui/bower_components/emby-apiclient/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.0.35", - "_release": "1.0.35", + "version": "1.0.36", + "_release": "1.0.36", "_resolution": { "type": "version", - "tag": "1.0.35", - "commit": "d84b62c2a98faed179e07ef805e54cd7e6d2e036" + "tag": "1.0.36", + "commit": "2fd64dfab638287a62d38c400d3e738a67e80198" }, "_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_target": "~1.0.3", diff --git a/dashboard-ui/bower_components/emby-apiclient/apiclient.js b/dashboard-ui/bower_components/emby-apiclient/apiclient.js index 403415dab2..f2f07eeff2 100644 --- a/dashboard-ui/bower_components/emby-apiclient/apiclient.js +++ b/dashboard-ui/bower_components/emby-apiclient/apiclient.js @@ -1127,16 +1127,6 @@ }); }; - self.performMovieOrganization = function (id, options) { - - var url = self.getUrl("Library/FileOrganizations/" + id + "/Movie/Organize", options || {}); - - return self.ajax({ - type: "POST", - url: url - }); - }; - self.getLiveTvSeriesTimer = function (id) { if (!id) { @@ -3438,12 +3428,12 @@ }); }; - self.deleteSmartMatchEntry = function (name, options) { + self.deleteSmartMatchEntries = function (entries) { - var url = self.getUrl("Library/FileOrganizations/SmartMatches", options || {}); + var url = self.getUrl("Library/FileOrganizations/SmartMatches"); var postData = { - Name: name + Entries: entries }; return self.ajax({ diff --git a/dashboard-ui/scripts/autoorganizesmart.js b/dashboard-ui/scripts/autoorganizesmart.js index 7a922e83d2..72e698ba54 100644 --- a/dashboard-ui/scripts/autoorganizesmart.js +++ b/dashboard-ui/scripts/autoorganizesmart.js @@ -105,14 +105,14 @@ $('.divMatchInfos', page).on('click', '.btnDeleteMatchEntry', function () { var button = this; - var id = button.getAttribute('data-id'); - var options = { + var entries = [ + { + Name: button.getAttribute('data-id'), + Value: button.getAttribute('data-matchstring') + }]; - MatchString: button.getAttribute('data-matchstring') - }; - - ApiClient.deleteSmartMatchEntry(id, options).then(function () { + ApiClient.deleteSmartMatchEntries(entries).then(function () { reloadList(page); From f45621207c1f9610e24504b0a1777038cbbf3982 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 01:39:23 -0500 Subject: [PATCH 07/12] update smart match tab --- dashboard-ui/autoorganizesmart.html | 2 +- .../emby-apiclient/apiclient.js | 2 +- dashboard-ui/scripts/autoorganizesmart.js | 52 +++++++++---------- 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/dashboard-ui/autoorganizesmart.html b/dashboard-ui/autoorganizesmart.html index ea55d38de2..31d524feac 100644 --- a/dashboard-ui/autoorganizesmart.html +++ b/dashboard-ui/autoorganizesmart.html @@ -4,7 +4,7 @@ ${TitleAutoOrganize} -
+
diff --git a/dashboard-ui/bower_components/emby-apiclient/apiclient.js b/dashboard-ui/bower_components/emby-apiclient/apiclient.js index f2f07eeff2..75d4fc5a25 100644 --- a/dashboard-ui/bower_components/emby-apiclient/apiclient.js +++ b/dashboard-ui/bower_components/emby-apiclient/apiclient.js @@ -3430,7 +3430,7 @@ self.deleteSmartMatchEntries = function (entries) { - var url = self.getUrl("Library/FileOrganizations/SmartMatches"); + var url = self.getUrl("Library/FileOrganizations/SmartMatches/Delete"); var postData = { Entries: entries diff --git a/dashboard-ui/scripts/autoorganizesmart.js b/dashboard-ui/scripts/autoorganizesmart.js index 72e698ba54..6f9a823de9 100644 --- a/dashboard-ui/scripts/autoorganizesmart.js +++ b/dashboard-ui/scripts/autoorganizesmart.js @@ -49,42 +49,37 @@ } var html = ""; - var currentType; + + if (infos.length) { + html += '"; + } $('.divMatchInfos', page).html(html).trigger('create'); } @@ -105,12 +100,15 @@ $('.divMatchInfos', page).on('click', '.btnDeleteMatchEntry', function () { var button = this; + var index = parseInt(button.getAttribute('data-index')); - var entries = [ - { - Name: button.getAttribute('data-id'), - Value: button.getAttribute('data-matchstring') - }]; + var info = currentResult.Items[index]; + var entries = info.MatchStrings.map(function (m) { + return { + Name: info.ItemName, + Value: m + }; + }); ApiClient.deleteSmartMatchEntries(entries).then(function () { From 7dd45dea751c42c43d4ec77b24e90f1e65827033 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 01:46:46 -0500 Subject: [PATCH 08/12] update icons --- dashboard-ui/bower_components/emby-apiclient/.bower.json | 8 ++++---- .../components/fileorganizer/fileorganizer.template.html | 2 +- .../components/guestinviter/guestinviter.template.html | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json index d022c04417..f80b550020 100644 --- a/dashboard-ui/bower_components/emby-apiclient/.bower.json +++ b/dashboard-ui/bower_components/emby-apiclient/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.0.36", - "_release": "1.0.36", + "version": "1.0.37", + "_release": "1.0.37", "_resolution": { "type": "version", - "tag": "1.0.36", - "commit": "2fd64dfab638287a62d38c400d3e738a67e80198" + "tag": "1.0.37", + "commit": "b383fff379b92417525a3295ebbe3b7db9e0b1a4" }, "_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_target": "~1.0.3", diff --git a/dashboard-ui/components/fileorganizer/fileorganizer.template.html b/dashboard-ui/components/fileorganizer/fileorganizer.template.html index 53368012e6..5001448491 100644 --- a/dashboard-ui/components/fileorganizer/fileorganizer.template.html +++ b/dashboard-ui/components/fileorganizer/fileorganizer.template.html @@ -1,5 +1,5 @@ 
- +
diff --git a/dashboard-ui/components/guestinviter/guestinviter.template.html b/dashboard-ui/components/guestinviter/guestinviter.template.html index 9fa4c0200f..020a1bd408 100644 --- a/dashboard-ui/components/guestinviter/guestinviter.template.html +++ b/dashboard-ui/components/guestinviter/guestinviter.template.html @@ -1,5 +1,5 @@ 
- +
${HeaderInviteUser}
From 2d078e4a2ff08d91f1c203a597a9a30c5d02b389 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 01:51:28 -0500 Subject: [PATCH 09/12] removed dead code --- dashboard-ui/scripts/autoorganizelog.js | 44 +------------------------ 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/dashboard-ui/scripts/autoorganizelog.js b/dashboard-ui/scripts/autoorganizelog.js index b686e7e0f1..fefd84fb13 100644 --- a/dashboard-ui/scripts/autoorganizelog.js +++ b/dashboard-ui/scripts/autoorganizelog.js @@ -52,49 +52,7 @@ function organizeEpsiodeWithCorrections(page, item) { - Dashboard.showLoadingMsg(); - - var seriesItems; - - ApiClient.getItems(null, { - recursive: true, - includeItemTypes: 'Series', - sortBy: 'SortName' - - }).then(function (result) { - - seriesItems = result.Items; - - ApiClient.getVirtualFolders().then(function (result) { - - Dashboard.hideLoadingMsg(); - - var movieLocations = []; - var seriesLocations = []; - - for (var n = 0; n < result.length; n++) { - - var virtualFolder = result[n]; - - for (var i = 0, length = virtualFolder.Locations.length; i < length; i++) { - var location = { - value: virtualFolder.Locations[i], - display: virtualFolder.Name + ': ' + virtualFolder.Locations[i] - }; - - if (virtualFolder.CollectionType == 'movies') { - movieLocations.push(location); - } - if (virtualFolder.CollectionType == 'tvshows') { - seriesLocations.push(location); - } - } - } - - showEpisodeCorrectionPopup(page, item, seriesItems, movieLocations, seriesLocations); - }, onApiFailure); - - }, onApiFailure); + showEpisodeCorrectionPopup(page, item); } function showEpisodeCorrectionPopup(page, item) { From c80bf053e1107245c828373b69ca7710e7f33b34 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 01:55:13 -0500 Subject: [PATCH 10/12] update icons --- dashboard-ui/components/collectioneditor/collectioneditor.js | 2 +- dashboard-ui/components/playlisteditor/playlisteditor.js | 2 +- .../components/recordingcreator/recordingcreator.template.html | 2 +- dashboard-ui/scripts/sync.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dashboard-ui/components/collectioneditor/collectioneditor.js b/dashboard-ui/components/collectioneditor/collectioneditor.js index bba463a18e..834d822600 100644 --- a/dashboard-ui/components/collectioneditor/collectioneditor.js +++ b/dashboard-ui/components/collectioneditor/collectioneditor.js @@ -200,7 +200,7 @@ var title = items.length ? Globalize.translate('HeaderAddToCollection') : Globalize.translate('HeaderNewCollection'); html += '
'; - html += ''; + html += ''; html += '
'; html += title; html += '
'; diff --git a/dashboard-ui/components/playlisteditor/playlisteditor.js b/dashboard-ui/components/playlisteditor/playlisteditor.js index 5eccec04e2..bdbbb95277 100644 --- a/dashboard-ui/components/playlisteditor/playlisteditor.js +++ b/dashboard-ui/components/playlisteditor/playlisteditor.js @@ -206,7 +206,7 @@ var title = Globalize.translate('HeaderAddToPlaylist'); html += '
'; - html += ''; + html += ''; html += '
'; html += title; html += '
'; diff --git a/dashboard-ui/components/recordingcreator/recordingcreator.template.html b/dashboard-ui/components/recordingcreator/recordingcreator.template.html index 3cfe45f654..5fb8ff7ece 100644 --- a/dashboard-ui/components/recordingcreator/recordingcreator.template.html +++ b/dashboard-ui/components/recordingcreator/recordingcreator.template.html @@ -1,5 +1,5 @@ 
- +
${HeaderNewRecording}
diff --git a/dashboard-ui/scripts/sync.js b/dashboard-ui/scripts/sync.js index a5fcb95ad4..7f085a5a3b 100644 --- a/dashboard-ui/scripts/sync.js +++ b/dashboard-ui/scripts/sync.js @@ -246,7 +246,7 @@ var html = ''; html += '
'; - html += ''; + html += ''; html += '
'; html += Globalize.translate('SyncMedia'); html += '
'; From 14b19bb60fa6e8adfb75671b354a34efaf358d2f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 02:19:49 -0500 Subject: [PATCH 11/12] update icons --- .../components/itemidentifier/itemidentifier.template.html | 2 +- .../components/metadataeditor/metadataeditor.template.html | 2 +- .../components/metadataeditor/personeditor.template.html | 2 +- .../components/recordingcreator/recordingcreator.js | 6 ++++++ .../recordingcreator/recordingcreator.template.html | 7 +++++-- dashboard-ui/css/site.css | 4 ++++ dashboard-ui/livetvsettings.html | 2 +- dashboard-ui/scripts/livetvsettings.js | 4 ++-- dashboard-ui/strings/html/en-US.json | 3 ++- dashboard-ui/strings/html/server.json | 3 ++- 10 files changed, 25 insertions(+), 10 deletions(-) diff --git a/dashboard-ui/components/itemidentifier/itemidentifier.template.html b/dashboard-ui/components/itemidentifier/itemidentifier.template.html index ed7cfa0fce..a7248734d9 100644 --- a/dashboard-ui/components/itemidentifier/itemidentifier.template.html +++ b/dashboard-ui/components/itemidentifier/itemidentifier.template.html @@ -1,5 +1,5 @@ 
- +
diff --git a/dashboard-ui/components/metadataeditor/metadataeditor.template.html b/dashboard-ui/components/metadataeditor/metadataeditor.template.html index 44863a431a..b505070181 100644 --- a/dashboard-ui/components/metadataeditor/metadataeditor.template.html +++ b/dashboard-ui/components/metadataeditor/metadataeditor.template.html @@ -1,5 +1,5 @@ 
- +
${ButtonEdit}
diff --git a/dashboard-ui/components/metadataeditor/personeditor.template.html b/dashboard-ui/components/metadataeditor/personeditor.template.html index cf8fb5d601..fa4be5936b 100644 --- a/dashboard-ui/components/metadataeditor/personeditor.template.html +++ b/dashboard-ui/components/metadataeditor/personeditor.template.html @@ -1,5 +1,5 @@ 
- +
${ButtonEdit}
diff --git a/dashboard-ui/components/recordingcreator/recordingcreator.js b/dashboard-ui/components/recordingcreator/recordingcreator.js index 72729b4e44..29fa705372 100644 --- a/dashboard-ui/components/recordingcreator/recordingcreator.js +++ b/dashboard-ui/components/recordingcreator/recordingcreator.js @@ -227,6 +227,12 @@ } } + if (AppInfo.enableSupporterMembership) { + context.querySelector('.btnSupporterForConverting a').href = 'https://emby.media/premiere'; + } else { + context.querySelector('.btnSupporterForConverting a').href = '#'; + } + ApiClient.getNamedConfiguration("livetv").then(function (config) { $('#chkConvertRecordings', context).checked(config.EnableRecordingEncoding); diff --git a/dashboard-ui/components/recordingcreator/recordingcreator.template.html b/dashboard-ui/components/recordingcreator/recordingcreator.template.html index 5fb8ff7ece..b88f0e5b67 100644 --- a/dashboard-ui/components/recordingcreator/recordingcreator.template.html +++ b/dashboard-ui/components/recordingcreator/recordingcreator.template.html @@ -49,7 +49,7 @@
${OptionConvertRecordingsToStreamingFormat}
${OptionConvertRecordingsToStreamingFormatHelp}
- +

@@ -69,7 +69,10 @@ ${HeaderBecomeProjectSupporter}
+
+
+
\ No newline at end of file diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 5032f61296..c85107cf00 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -641,6 +641,10 @@ h1 a:hover { text-decoration: underline; } +.ui-body-b a.accent { + color: #52B54B !important; +} + .ui-listview li h3 { font-weight: 400; } diff --git a/dashboard-ui/livetvsettings.html b/dashboard-ui/livetvsettings.html index dc13545385..93094a3dc2 100644 --- a/dashboard-ui/livetvsettings.html +++ b/dashboard-ui/livetvsettings.html @@ -55,7 +55,7 @@
${OptionConvertRecordingsToStreamingFormat}
${OptionConvertRecordingsToStreamingFormatHelp}
- +


diff --git a/dashboard-ui/scripts/livetvsettings.js b/dashboard-ui/scripts/livetvsettings.js index 54c5721735..aab6ce4349 100644 --- a/dashboard-ui/scripts/livetvsettings.js +++ b/dashboard-ui/scripts/livetvsettings.js @@ -81,9 +81,9 @@ }); if (AppInfo.enableSupporterMembership) { - $('.lnkSupporterLearnMore', page).show(); + page.querySelector('.btnSupporterForConverting a').href = 'https://emby.media/premiere'; } else { - $('.lnkSupporterLearnMore', page).hide(); + page.querySelector('.btnSupporterForConverting a').href = '#'; } }); diff --git a/dashboard-ui/strings/html/en-US.json b/dashboard-ui/strings/html/en-US.json index cca7e26b08..fc786c6887 100644 --- a/dashboard-ui/strings/html/en-US.json +++ b/dashboard-ui/strings/html/en-US.json @@ -1535,5 +1535,6 @@ "LabelCodecIntrosPath": "Codec intros path:", "LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.", "OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format", - "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on your devices. This feature requires an active Emby Premiere subscription." + "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on your devices.", + "FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription." } \ No newline at end of file diff --git a/dashboard-ui/strings/html/server.json b/dashboard-ui/strings/html/server.json index 92ed2fd91b..38c871a8e1 100644 --- a/dashboard-ui/strings/html/server.json +++ b/dashboard-ui/strings/html/server.json @@ -1550,5 +1550,6 @@ "LabelCodecIntrosPath": "Codec intros path:", "LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.", "OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format", - "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on your devices. This feature requires an active Emby Premiere subscription." + "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on your devices.", + "FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription." } From 404971a112813fcbb03067daf46ad3520c2a2e2a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 10:56:58 -0500 Subject: [PATCH 12/12] fix shared item page --- dashboard-ui/scripts/itemdetailpage.js | 5 ++++- dashboard-ui/shared.html | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 309b64e500..f0483065e2 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -408,7 +408,10 @@ function renderDetails(page, item, context, isStatic) { renderSimilarItems(page, item, context); - renderSiblingLinks(page, item, context); + + if (!isStatic) { + renderSiblingLinks(page, item, context); + } if (item.Taglines && item.Taglines.length) { $('.tagline', page).html(item.Taglines[0]).show(); diff --git a/dashboard-ui/shared.html b/dashboard-ui/shared.html index 47a5519482..87d4ca0a8d 100644 --- a/dashboard-ui/shared.html +++ b/dashboard-ui/shared.html @@ -70,7 +70,7 @@

-

+