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 += '
';
+ }
for (var i = 0, length = infos.length; i < length; i++) {
var info = infos[i];
- if (info.OrganizerType != currentType) {
- currentType = info.OrganizerType;
+ html += '
';
- if (html.length > 0) {
- html += "";
- }
+ html += '';
- html += "" + currentType + "
";
+ html += '';
- html += '';
- }
+ html += "" + info.DisplayName + "
";
- html += "" + info.Name + "
";
+ html += info.MatchStrings.map(function (m) {
+ return "" + m + "
";
+ }).join('');
- for (var n = 0; n < info.MatchStrings.length; n++) {
- html += "- ";
+ html += '
';
- html += "";
+ html += '';
- html += "" + info.MatchStrings[n] + "
";
-
- html += "" + Globalize.translate('ButtonDelete') + "";
-
- html += "";
-
- html += "";
- }
+ html += '';
}
- html += "";
+ 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 () {