From fe2defd0897f6417f03780b1339988697ba8ba30 Mon Sep 17 00:00:00 2001 From: softworkz Date: Fri, 12 Feb 2016 23:42:11 +0100 Subject: [PATCH 1/3] Refactored organization dialog as a component --- .../MediaBrowser.WebDashboard.csproj | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index e6ac23763..f5cd12a54 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -98,6 +98,9 @@ + + PreserveNewest + PreserveNewest @@ -140,6 +143,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + PreserveNewest From 2bd49a779b6b519cd20b273fcfd2fc4471a3bd4f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 01:19:28 -0500 Subject: [PATCH 2/3] update delete smart match entry --- .../Library/FileOrganizationService.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/MediaBrowser.Api/Library/FileOrganizationService.cs b/MediaBrowser.Api/Library/FileOrganizationService.cs index c45552baa..36a9af772 100644 --- a/MediaBrowser.Api/Library/FileOrganizationService.cs +++ b/MediaBrowser.Api/Library/FileOrganizationService.cs @@ -1,9 +1,11 @@ -using MediaBrowser.Controller.FileOrganization; +using System.Collections.Generic; +using MediaBrowser.Controller.FileOrganization; using MediaBrowser.Controller.Net; using MediaBrowser.Model.FileOrganization; using MediaBrowser.Model.Querying; using ServiceStack; using System.Threading.Tasks; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Api.Library { @@ -95,11 +97,8 @@ namespace MediaBrowser.Api.Library [Route("/Library/FileOrganizations/SmartMatches", "DELETE", Summary = "Deletes a smart match entry")] public class DeleteSmartMatchEntry { - [ApiMember(Name = "Name", Description = "Name", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] - public string Name { get; set; } - - [ApiMember(Name = "MatchString", Description = "SmartMatch String", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "DELETE")] - public string MatchString { get; set; } + [ApiMember(Name = "Entries", Description = "SmartMatch Entry", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "DELETE")] + public List Entries { get; set; } } [Authenticated(Roles = "Admin")] @@ -172,7 +171,10 @@ namespace MediaBrowser.Api.Library public void Post(DeleteSmartMatchEntry request) { - _iFileOrganizationService.DeleteSmartMatchEntry(request.Name, request.MatchString); + request.Entries.ForEach(entry => + { + _iFileOrganizationService.DeleteSmartMatchEntry(entry.Name, entry.Value); + }); } } } From d48ba8dbc1e875558f2f5f79aad8f62407054cb7 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 01:39:23 -0500 Subject: [PATCH 3/3] update smart match tab --- MediaBrowser.Api/Library/FileOrganizationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Api/Library/FileOrganizationService.cs b/MediaBrowser.Api/Library/FileOrganizationService.cs index 36a9af772..1224fa957 100644 --- a/MediaBrowser.Api/Library/FileOrganizationService.cs +++ b/MediaBrowser.Api/Library/FileOrganizationService.cs @@ -94,10 +94,10 @@ namespace MediaBrowser.Api.Library public int? Limit { get; set; } } - [Route("/Library/FileOrganizations/SmartMatches", "DELETE", Summary = "Deletes a smart match entry")] + [Route("/Library/FileOrganizations/SmartMatches/Delete", "POST", Summary = "Deletes a smart match entry")] public class DeleteSmartMatchEntry { - [ApiMember(Name = "Entries", Description = "SmartMatch Entry", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "DELETE")] + [ApiMember(Name = "Entries", Description = "SmartMatch Entry", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] public List Entries { get; set; } }