From 25914ddf39290c23972656ccbc97f7be4f30cdfe Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 24 Dec 2021 12:31:18 -0600 Subject: [PATCH] Fixed: Workaround net6 object serialization issues --- src/Lidarr.Api.V1/Blocklist/BlocklistController.cs | 2 +- src/Lidarr.Api.V1/History/HistoryController.cs | 2 +- src/Lidarr.Api.V1/ProviderControllerBase.cs | 2 +- src/Lidarr.Api.V1/Queue/QueueActionController.cs | 4 ++-- src/Lidarr.Api.V1/Queue/QueueController.cs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Lidarr.Api.V1/Blocklist/BlocklistController.cs b/src/Lidarr.Api.V1/Blocklist/BlocklistController.cs index aa482dc6d..a924dba33 100644 --- a/src/Lidarr.Api.V1/Blocklist/BlocklistController.cs +++ b/src/Lidarr.Api.V1/Blocklist/BlocklistController.cs @@ -37,7 +37,7 @@ namespace Lidarr.Api.V1.Blocklist { _blocklistService.Delete(resource.Ids); - return new object(); + return new { }; } } } diff --git a/src/Lidarr.Api.V1/History/HistoryController.cs b/src/Lidarr.Api.V1/History/HistoryController.cs index a287c6dff..f1c5a11f9 100644 --- a/src/Lidarr.Api.V1/History/HistoryController.cs +++ b/src/Lidarr.Api.V1/History/HistoryController.cs @@ -109,7 +109,7 @@ namespace Lidarr.Api.V1.History public object MarkAsFailed([FromBody] int id) { _failedDownloadService.MarkAsFailed(id); - return new object(); + return new { }; } } } diff --git a/src/Lidarr.Api.V1/ProviderControllerBase.cs b/src/Lidarr.Api.V1/ProviderControllerBase.cs index b4d6ceb7e..02bd4da83 100644 --- a/src/Lidarr.Api.V1/ProviderControllerBase.cs +++ b/src/Lidarr.Api.V1/ProviderControllerBase.cs @@ -105,7 +105,7 @@ namespace Lidarr.Api.V1 public object DeleteProvider(int id) { _providerFactory.Delete(id); - return new object(); + return new { }; } [HttpGet("schema")] diff --git a/src/Lidarr.Api.V1/Queue/QueueActionController.cs b/src/Lidarr.Api.V1/Queue/QueueActionController.cs index 64121c64b..5c79d6045 100644 --- a/src/Lidarr.Api.V1/Queue/QueueActionController.cs +++ b/src/Lidarr.Api.V1/Queue/QueueActionController.cs @@ -31,7 +31,7 @@ namespace Lidarr.Api.V1.Queue _downloadService.DownloadReport(pendingRelease.RemoteAlbum); - return new object(); + return new { }; } [HttpPost("grab/bulk")] @@ -49,7 +49,7 @@ namespace Lidarr.Api.V1.Queue _downloadService.DownloadReport(pendingRelease.RemoteAlbum); } - return new object(); + return new { }; } } } diff --git a/src/Lidarr.Api.V1/Queue/QueueController.cs b/src/Lidarr.Api.V1/Queue/QueueController.cs index a9c2bea77..8dfd46f68 100644 --- a/src/Lidarr.Api.V1/Queue/QueueController.cs +++ b/src/Lidarr.Api.V1/Queue/QueueController.cs @@ -86,7 +86,7 @@ namespace Lidarr.Api.V1.Queue _trackedDownloadService.StopTracking(trackedDownloadIds); - return new object(); + return new { }; } [HttpGet]