From 483f021e2944a494d1b8a870262528c5503cff2c Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 7 Feb 2020 23:01:36 +0000 Subject: [PATCH] Updated to 3.1 --- .../Ombi.Api.CouchPotato.csproj | 1 + src/Ombi.Api.Discord/Ombi.Api.Discord.csproj | 1 + src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj | 1 + src/Ombi.Api.Emby/Ombi.Api.Emby.csproj | 1 + src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj | 1 + src/Ombi.Api.Github/Ombi.Api.Github.csproj | 1 + src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj | 1 + src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj | 1 + src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj | 1 + .../Ombi.Api.Mattermost.csproj | 1 + .../Ombi.Api.MusicBrainz.csproj | 1 + .../Ombi.Api.Notifications.csproj | 1 + src/Ombi.Api.Plex/Ombi.Api.Plex.csproj | 1 + .../Ombi.Api.Pushbullet.csproj | 1 + src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj | 1 + src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj | 3 ++- src/Ombi.Api.Service/Ombi.Api.Service.csproj | 3 ++- src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj | 1 + src/Ombi.Api.Slack/Ombi.Api.Slack.csproj | 1 + src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj | 1 + src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj | 1 + src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj | 1 + src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj | 1 + src/Ombi.Api/Ombi.Api.csproj | 3 ++- src/Ombi.Core.Tests/Ombi.Core.Tests.csproj | 2 +- src/Ombi.Core/Engine/MovieRequestEngine.cs | 12 ++++++------ src/Ombi.Core/Ombi.Core.csproj | 5 +++-- src/Ombi.Core/Senders/TvSender.cs | 1 - src/Ombi.DependencyInjection/IocExtensions.cs | 2 -- .../Ombi.DependencyInjection.csproj | 7 ++++--- .../Ombi.Helpers.Tests.csproj | 4 ++-- src/Ombi.Helpers/Ombi.Helpers.csproj | 5 +++-- src/Ombi.Hubs/Ombi.Hubs.csproj | 1 + src/Ombi.Mapping/Ombi.Mapping.csproj | 1 + .../Ombi.Notifications.Templates.csproj | 1 + .../Ombi.Notifications.Tests.csproj | 2 +- .../Ombi.Notifications.csproj | 3 ++- .../Ombi.Schedule.Tests.csproj | 8 +------- .../Jobs/Lidarr/LidarrAvailabilityChecker.cs | 4 ++-- src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs | 4 ++-- src/Ombi.Schedule/Ombi.Schedule.csproj | 1 + src/Ombi.Schedule/OmbiScheduler.cs | 2 -- .../Ombi.Settings.Tests.csproj | 2 +- src/Ombi.Settings/Ombi.Settings.csproj | 3 ++- src/Ombi.Store/Ombi.Store.csproj | 13 ++++++++----- src/Ombi.Test.Common/Ombi.Test.Common.csproj | 1 + src/Ombi.Tests/Ombi.Tests.csproj | 2 +- .../Ombi.Api.TheMovieDb.csproj | 1 + src/Ombi.Updater/Ombi.Updater.csproj | 18 +++++++++--------- src/Ombi/Controllers/V1/JobController.cs | 11 +++++++---- src/Ombi/Controllers/V1/SettingsController.cs | 3 ++- src/Ombi/Controllers/V2/SystemController.cs | 18 +++++++++++------- src/Ombi/Ombi.csproj | 17 +++++++++-------- 53 files changed, 110 insertions(+), 74 deletions(-) diff --git a/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj b/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj index 3c31ecb84..809404bd4 100644 --- a/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj +++ b/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj b/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj index 84f215437..5c67fe577 100644 --- a/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj +++ b/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj b/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj index 3c31ecb84..809404bd4 100644 --- a/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj +++ b/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj b/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj index 24c86a86f..2bb0c6352 100644 --- a/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj +++ b/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj b/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj index 84f215437..5c67fe577 100644 --- a/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj +++ b/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.Github/Ombi.Api.Github.csproj b/src/Ombi.Api.Github/Ombi.Api.Github.csproj index 3c31ecb84..809404bd4 100644 --- a/src/Ombi.Api.Github/Ombi.Api.Github.csproj +++ b/src/Ombi.Api.Github/Ombi.Api.Github.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj b/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj index 7c02a2978..79414ab00 100644 --- a/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj +++ b/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj b/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj index 3c31ecb84..809404bd4 100644 --- a/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj +++ b/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj b/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj index 3c31ecb84..809404bd4 100644 --- a/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj +++ b/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj b/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj index 1b93a9b39..2192220e6 100644 --- a/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj +++ b/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj b/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj index e5ffec654..8b408314a 100644 --- a/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj +++ b/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj b/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj index 07a764ec0..002e44260 100644 --- a/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj +++ b/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj b/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj index d1a2a1c65..e5f5b3394 100644 --- a/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj +++ b/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj b/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj index 84f215437..5c67fe577 100644 --- a/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj +++ b/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj b/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj index 7c02a2978..79414ab00 100644 --- a/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj +++ b/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj b/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj index 2efedfad6..4fc0becae 100644 --- a/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj +++ b/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj @@ -6,10 +6,11 @@ 3.0.0.0 + 8.0 - + diff --git a/src/Ombi.Api.Service/Ombi.Api.Service.csproj b/src/Ombi.Api.Service/Ombi.Api.Service.csproj index 1e466b24d..2a434c8cd 100644 --- a/src/Ombi.Api.Service/Ombi.Api.Service.csproj +++ b/src/Ombi.Api.Service/Ombi.Api.Service.csproj @@ -8,10 +8,11 @@ Ombi.Api.Service Ombi.Api.Service + 8.0 - + diff --git a/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj b/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj index 3c31ecb84..809404bd4 100644 --- a/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj +++ b/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj b/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj index 84f215437..5c67fe577 100644 --- a/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj +++ b/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj b/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj index 84f215437..5c67fe577 100644 --- a/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj +++ b/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj b/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj index 3c31ecb84..809404bd4 100644 --- a/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj +++ b/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj b/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj index 99ed0f20e..f7a2a3766 100644 --- a/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj +++ b/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj b/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj index 24c86a86f..2bb0c6352 100644 --- a/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj +++ b/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Api/Ombi.Api.csproj b/src/Ombi.Api/Ombi.Api.csproj index 4e9843866..34e051c00 100644 --- a/src/Ombi.Api/Ombi.Api.csproj +++ b/src/Ombi.Api/Ombi.Api.csproj @@ -6,10 +6,11 @@ 3.0.0.0 + 8.0 - + diff --git a/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj b/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj index 89ff21a7c..a629080a4 100644 --- a/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj +++ b/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + netcoreapp3.1 diff --git a/src/Ombi.Core/Engine/MovieRequestEngine.cs b/src/Ombi.Core/Engine/MovieRequestEngine.cs index 934690242..ce7d1d1d4 100644 --- a/src/Ombi.Core/Engine/MovieRequestEngine.cs +++ b/src/Ombi.Core/Engine/MovieRequestEngine.cs @@ -226,12 +226,12 @@ namespace Ombi.Core.Engine //var secondProp = TypeDescriptor.GetProperties(propType).Find(properties[1], true); } - allRequests = sortOrder.Equals("asc", StringComparison.InvariantCultureIgnoreCase) - ? allRequests.OrderBy(x => prop.GetValue(x)) - : allRequests.OrderByDescending(x => prop.GetValue(x)); - var total = await allRequests.CountAsync(); - var requests = await allRequests.Skip(position).Take(count) - .ToListAsync(); + // TODO fix this so we execute this on the server + var requests = sortOrder.Equals("asc", StringComparison.InvariantCultureIgnoreCase) + ? allRequests.ToList().OrderBy(x => x.RequestedDate).ToList() + : allRequests.ToList().OrderByDescending(x => prop.GetValue(x)).ToList(); + var total = requests.Count(); + requests = requests.Skip(position).Take(count).ToList(); await CheckForSubscription(shouldHide, requests); return new RequestsViewModel diff --git a/src/Ombi.Core/Ombi.Core.csproj b/src/Ombi.Core/Ombi.Core.csproj index 7d4598d9c..99c531183 100644 --- a/src/Ombi.Core/Ombi.Core.csproj +++ b/src/Ombi.Core/Ombi.Core.csproj @@ -6,13 +6,14 @@ 3.0.0.0 + 8.0 - - + + diff --git a/src/Ombi.Core/Senders/TvSender.cs b/src/Ombi.Core/Senders/TvSender.cs index 5cf28fa8a..91c38428a 100644 --- a/src/Ombi.Core/Senders/TvSender.cs +++ b/src/Ombi.Core/Senders/TvSender.cs @@ -16,7 +16,6 @@ using Ombi.Settings.Settings.Models.External; using Ombi.Store.Entities; using Ombi.Store.Entities.Requests; using Ombi.Store.Repository; -using Remotion.Linq.Parsing.Structure.IntermediateModel; namespace Ombi.Core.Senders { diff --git a/src/Ombi.DependencyInjection/IocExtensions.cs b/src/Ombi.DependencyInjection/IocExtensions.cs index 66e0a05e6..aabd02353 100644 --- a/src/Ombi.DependencyInjection/IocExtensions.cs +++ b/src/Ombi.DependencyInjection/IocExtensions.cs @@ -1,7 +1,6 @@ using System.Diagnostics.CodeAnalysis; using System.Security.Principal; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection; using Ombi.Api.Discord; @@ -61,7 +60,6 @@ using Ombi.Schedule.Jobs.Lidarr; using Ombi.Schedule.Jobs.Plex.Interfaces; using Ombi.Schedule.Jobs.SickRage; using Ombi.Schedule.Processor; -using Ombi.Store.Entities; using Quartz.Spi; using Ombi.Api.MusicBrainz; using Ombi.Api.Twilio; diff --git a/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj b/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj index 636e96a3c..1cdd1e649 100644 --- a/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj +++ b/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj @@ -6,12 +6,13 @@ 3.0.0.0 + 8.0 - - - + + + diff --git a/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj b/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj index 45f2f537e..1046f9e68 100644 --- a/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj +++ b/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj @@ -1,7 +1,7 @@ - + - netcoreapp3.0 + netcoreapp3.1 false diff --git a/src/Ombi.Helpers/Ombi.Helpers.csproj b/src/Ombi.Helpers/Ombi.Helpers.csproj index bade3fd90..cd33b9455 100644 --- a/src/Ombi.Helpers/Ombi.Helpers.csproj +++ b/src/Ombi.Helpers/Ombi.Helpers.csproj @@ -6,12 +6,13 @@ 3.0.0.0 + 8.0 - - + + diff --git a/src/Ombi.Hubs/Ombi.Hubs.csproj b/src/Ombi.Hubs/Ombi.Hubs.csproj index 69a439574..ae2e158ad 100644 --- a/src/Ombi.Hubs/Ombi.Hubs.csproj +++ b/src/Ombi.Hubs/Ombi.Hubs.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Mapping/Ombi.Mapping.csproj b/src/Ombi.Mapping/Ombi.Mapping.csproj index 94c8c42d7..2f5172663 100644 --- a/src/Ombi.Mapping/Ombi.Mapping.csproj +++ b/src/Ombi.Mapping/Ombi.Mapping.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj b/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj index a02def1dc..6a296fa24 100644 --- a/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj +++ b/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj b/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj index 8ce8ab43b..ecbcbdae2 100644 --- a/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj +++ b/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + netcoreapp3.1 diff --git a/src/Ombi.Notifications/Ombi.Notifications.csproj b/src/Ombi.Notifications/Ombi.Notifications.csproj index c613f5b61..f4b3febeb 100644 --- a/src/Ombi.Notifications/Ombi.Notifications.csproj +++ b/src/Ombi.Notifications/Ombi.Notifications.csproj @@ -6,11 +6,12 @@ 3.0.0.0 + 8.0 - + diff --git a/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj b/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj index 70a456b6a..2964f71b9 100644 --- a/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj +++ b/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + netcoreapp3.1 @@ -18,10 +18,4 @@ - - - ..\..\..\..\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.signalr.core\1.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Core.dll - - - diff --git a/src/Ombi.Schedule/Jobs/Lidarr/LidarrAvailabilityChecker.cs b/src/Ombi.Schedule/Jobs/Lidarr/LidarrAvailabilityChecker.cs index 10518a51e..99b27fec7 100644 --- a/src/Ombi.Schedule/Jobs/Lidarr/LidarrAvailabilityChecker.cs +++ b/src/Ombi.Schedule/Jobs/Lidarr/LidarrAvailabilityChecker.cs @@ -19,7 +19,7 @@ namespace Ombi.Schedule.Jobs.Lidarr { public class LidarrAvailabilityChecker : ILidarrAvailabilityChecker { - public LidarrAvailabilityChecker(IMusicRequestRepository requests, IRepository albums, ILogger log, + public LidarrAvailabilityChecker(IMusicRequestRepository requests, IExternalRepository albums, ILogger log, INotificationHelper notification, IHubContext notificationHub) { _cachedAlbums = albums; @@ -30,7 +30,7 @@ namespace Ombi.Schedule.Jobs.Lidarr } private readonly IMusicRequestRepository _requestRepository; - private readonly IRepository _cachedAlbums; + private readonly IExternalRepository _cachedAlbums; private readonly ILogger _logger; private readonly INotificationHelper _notificationService; private readonly IHubContext _notification; diff --git a/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs b/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs index 10daef789..a24914e99 100644 --- a/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs +++ b/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs @@ -83,12 +83,12 @@ namespace Ombi.Schedule.Jobs.Ombi { // Ensure we check that we have not linked this item to a request var allMovies = _plexRepo.GetAll().Where(x => - x.Type == PlexMediaTypeEntity.Movie && !x.RequestId.HasValue && (!x.TheMovieDbId.HasValue() || !x.ImdbId.HasValue())); + x.Type == PlexMediaTypeEntity.Movie && x.RequestId == null && (x.TheMovieDbId == null || x.ImdbId == null)); await StartPlexMovies(allMovies); // Now Tv var allTv = _plexRepo.GetAll().Where(x => - x.Type == PlexMediaTypeEntity.Show && !x.RequestId.HasValue && (!x.TheMovieDbId.HasValue() || !x.ImdbId.HasValue() || !x.TvDbId.HasValue())); + x.Type == PlexMediaTypeEntity.Show && x.RequestId == null && (x.TheMovieDbId == null || x.ImdbId == null || x.TvDbId == null)); await StartPlexTv(allTv); } diff --git a/src/Ombi.Schedule/Ombi.Schedule.csproj b/src/Ombi.Schedule/Ombi.Schedule.csproj index c66cd9b25..a6d992c0e 100644 --- a/src/Ombi.Schedule/Ombi.Schedule.csproj +++ b/src/Ombi.Schedule/Ombi.Schedule.csproj @@ -6,6 +6,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Schedule/OmbiScheduler.cs b/src/Ombi.Schedule/OmbiScheduler.cs index 71f20ad91..6ccdecb45 100644 --- a/src/Ombi.Schedule/OmbiScheduler.cs +++ b/src/Ombi.Schedule/OmbiScheduler.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; using Ombi.Core.Notifications; using Ombi.Core.Settings; using Ombi.Helpers; @@ -16,7 +15,6 @@ using Ombi.Schedule.Jobs.Radarr; using Ombi.Schedule.Jobs.SickRage; using Ombi.Schedule.Jobs.Sonarr; using Ombi.Settings.Settings.Models; -using Quartz; using Quartz.Spi; namespace Ombi.Schedule diff --git a/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj b/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj index ad99af008..d55c38004 100644 --- a/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj +++ b/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj @@ -1,6 +1,6 @@  - netcoreapp3.0 + netcoreapp3.1 false diff --git a/src/Ombi.Settings/Ombi.Settings.csproj b/src/Ombi.Settings/Ombi.Settings.csproj index 96f01a823..1012f01e0 100644 --- a/src/Ombi.Settings/Ombi.Settings.csproj +++ b/src/Ombi.Settings/Ombi.Settings.csproj @@ -6,10 +6,11 @@ 3.0.0.0 + 8.0 - + diff --git a/src/Ombi.Store/Ombi.Store.csproj b/src/Ombi.Store/Ombi.Store.csproj index b33052157..dade5a1b9 100644 --- a/src/Ombi.Store/Ombi.Store.csproj +++ b/src/Ombi.Store/Ombi.Store.csproj @@ -7,15 +7,18 @@ true + 8.0 - - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - + diff --git a/src/Ombi.Test.Common/Ombi.Test.Common.csproj b/src/Ombi.Test.Common/Ombi.Test.Common.csproj index d43dad1b2..3c328ec19 100644 --- a/src/Ombi.Test.Common/Ombi.Test.Common.csproj +++ b/src/Ombi.Test.Common/Ombi.Test.Common.csproj @@ -2,6 +2,7 @@ netstandard2.1 + 8.0 diff --git a/src/Ombi.Tests/Ombi.Tests.csproj b/src/Ombi.Tests/Ombi.Tests.csproj index a2ac1aac6..25fdd3ebe 100644 --- a/src/Ombi.Tests/Ombi.Tests.csproj +++ b/src/Ombi.Tests/Ombi.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + netcoreapp3.1 false diff --git a/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj b/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj index 8ed3686b7..c3713684c 100644 --- a/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj +++ b/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj @@ -7,6 +7,7 @@ 3.0.0.0 + 8.0 diff --git a/src/Ombi.Updater/Ombi.Updater.csproj b/src/Ombi.Updater/Ombi.Updater.csproj index 68adbb762..1a305bb14 100644 --- a/src/Ombi.Updater/Ombi.Updater.csproj +++ b/src/Ombi.Updater/Ombi.Updater.csproj @@ -3,7 +3,7 @@ Exe win10-x64;win10-x86;osx-x64;ubuntu-x64;debian.8-x64;centos.7-x64;linux-x64;linux-arm;linux-arm64; - netcoreapp3.0 + netcoreapp3.1 3.0.0.0 3.0.0.0 @@ -12,14 +12,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Ombi/Controllers/V1/JobController.cs b/src/Ombi/Controllers/V1/JobController.cs index f8f3609e8..668a4ccf4 100644 --- a/src/Ombi/Controllers/V1/JobController.cs +++ b/src/Ombi/Controllers/V1/JobController.cs @@ -67,11 +67,14 @@ namespace Ombi.Controllers.V1 var val = await _memCache.GetOrAdd(CacheKeys.Update, async () => { var productArray = _updater.GetVersion(); - var version = productArray[0]; - var branch = productArray[1]; - var updateAvailable = await _updater.UpdateAvailable(branch, version); + if (productArray.Length > 1) + { + var version = productArray[0]; + var branch = productArray[1]; + var updateAvailable = await _updater.UpdateAvailable(branch, version); + } - return updateAvailable; + return true; }); return val; } diff --git a/src/Ombi/Controllers/V1/SettingsController.cs b/src/Ombi/Controllers/V1/SettingsController.cs index ea65e63cb..ada2d65b7 100644 --- a/src/Ombi/Controllers/V1/SettingsController.cs +++ b/src/Ombi/Controllers/V1/SettingsController.cs @@ -1118,7 +1118,8 @@ namespace Ombi.Controllers.V1 // Make sure we do not display the newsletter templates = templates.Where(x => x.NotificationType != NotificationType.Newsletter); } - return templates.OrderBy(x => x.NotificationType.ToString()).ToList(); + var tem = templates.ToList(); + return tem.OrderBy(x => x.NotificationType.ToString()).ToList(); } private async Task Get() diff --git a/src/Ombi/Controllers/V2/SystemController.cs b/src/Ombi/Controllers/V2/SystemController.cs index ab1e89578..590c2f2cd 100644 --- a/src/Ombi/Controllers/V2/SystemController.cs +++ b/src/Ombi/Controllers/V2/SystemController.cs @@ -33,18 +33,22 @@ namespace Ombi.Controllers.V2 public async Task ReadLogFile(string logFileName, CancellationToken token) { var logFile = Path.Combine(_hosting.ContentRootPath, "Logs", logFileName); - await using var fs = new FileStream(logFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - using StreamReader reader = new StreamReader(fs); - return Ok(await reader.ReadToEndAsync()); + using (var fs = new FileStream(logFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + using (StreamReader reader = new StreamReader(fs)) + { + return Ok(await reader.ReadToEndAsync()); + } } - + [HttpGet("logs/download/{logFileName}")] public IActionResult Download(string logFileName, CancellationToken token) { var logFile = Path.Combine(_hosting.ContentRootPath, "Logs", logFileName); - using var fs = new FileStream(logFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - using StreamReader reader = new StreamReader(fs); - return File(reader.BaseStream, "application/octet-stream", logFileName); + using (var fs = new FileStream(logFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + using (StreamReader reader = new StreamReader(fs)) + { + return File(reader.BaseStream, "application/octet-stream", logFileName); + } } } } \ No newline at end of file diff --git a/src/Ombi/Ombi.csproj b/src/Ombi/Ombi.csproj index 883dad833..125325b0b 100644 --- a/src/Ombi/Ombi.csproj +++ b/src/Ombi/Ombi.csproj @@ -1,6 +1,6 @@  - netcoreapp3.0 + netcoreapp3.1 win10-x64;win10-x86;osx-x64;linux-x64;linux-arm;linux-arm64; false Latest @@ -58,22 +58,23 @@ + - - + + - + - + - - - + + +