diff --git a/.azuredevops/pipelines/templates/build-steps.yml b/.azuredevops/pipelines/templates/build-steps.yml index 86f7fc21c..111424222 100644 --- a/.azuredevops/pipelines/templates/build-steps.yml +++ b/.azuredevops/pipelines/templates/build-steps.yml @@ -5,7 +5,7 @@ steps: displayName: 'Use .NET Core sdk ' inputs: packageType: 'sdk' - version: '3.x' + version: '5.x' - task: Yarn@3 displayName: 'Install UI Dependancies' @@ -18,7 +18,7 @@ steps: inputs: projectDirectory: '$(UiLocation)' arguments: 'run build' - + - task: PublishPipelineArtifact@1 inputs: targetPath: '$(UiLocation)dist' @@ -31,4 +31,4 @@ steps: command: 'custom' projects: '$(TestProject)' custom: 'test' - continueOnError: false + continueOnError: false diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index ad72212cf..2f63fa4a4 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -3,13 +3,13 @@ steps: displayName: 'Use .NET Core sdk ' inputs: packageType: 'sdk' - version: '3.x' + version: '5.x' - task: DotNetCoreInstaller@1 displayName: 'Use .NET Core sdk for versioning' inputs: packageType: 'sdk' - version: '2.1.x' + version: '3.1.x' - task: PowerShell@2 displayName: 'Set Version' @@ -24,23 +24,23 @@ steps: inputs: command: 'publish' publishWebProjects: true - arguments: '-c $(BuildConfiguration) -r "$(runtime)" -o $(Build.ArtifactStagingDirectory)/$(runtime)' + arguments: '-c $(BuildConfiguration) -r "$(runtime)" -o $(Build.ArtifactStagingDirectory)/$(runtime) --self-contained true -p:PublishSingleFile=true' zipAfterPublish: false modifyOutputPath: false - + - task: DownloadPipelineArtifact@2 inputs: buildType: 'current' artifactName: 'angular_dist' targetPath: '$(Build.ArtifactStagingDirectory)/angular_dist' - + - task: CopyFiles@2 displayName: 'Copy Angular App $(runtime)' inputs: SourceFolder: '$(Build.ArtifactStagingDirectory)/angular_dist' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/$(runtime)/ClientApp/dist' - + - task: ArchiveFiles@2 displayName: 'Zip $(runtime)' inputs: @@ -49,7 +49,7 @@ steps: archiveType: $(compression) archiveFile: '$(Build.ArtifactStagingDirectory)/$(runtime).$(format)' replaceExistingArchive: true - + - task: PublishPipelineArtifact@1 inputs: targetPath: '$(Build.ArtifactStagingDirectory)/$(runtime).$(format)' diff --git a/.azuredevops/pipelines/templates/variables.yml b/.azuredevops/pipelines/templates/variables.yml index 507746641..c33cd7999 100644 --- a/.azuredevops/pipelines/templates/variables.yml +++ b/.azuredevops/pipelines/templates/variables.yml @@ -12,7 +12,7 @@ variables: value: "**/*.Tests.csproj" - name: "NetCoreVersion" - value: "3.1" + value: "5.0" - name: "PublishLocation" value: "$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp$(NetCoreVersion)" diff --git a/src/Ombi.Api.CloudService/Ombi.Api.CloudService.csproj b/src/Ombi.Api.CloudService/Ombi.Api.CloudService.csproj index 3c31ecb84..d92fd7c6d 100644 --- a/src/Ombi.Api.CloudService/Ombi.Api.CloudService.csproj +++ b/src/Ombi.Api.CloudService/Ombi.Api.CloudService.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 diff --git a/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj b/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj index 809404bd4..bdd16edf8 100644 --- a/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj +++ b/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 8.0 diff --git a/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj b/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj index 5c67fe577..f76114f83 100644 --- a/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj +++ b/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj b/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj index 809404bd4..bdd16edf8 100644 --- a/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj +++ b/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 8.0 diff --git a/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj b/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj index 2bb0c6352..5457b0290 100644 --- a/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj +++ b/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj b/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj index 5c67fe577..f76114f83 100644 --- a/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj +++ b/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.Github/Ombi.Api.Github.csproj b/src/Ombi.Api.Github/Ombi.Api.Github.csproj index 809404bd4..bdd16edf8 100644 --- a/src/Ombi.Api.Github/Ombi.Api.Github.csproj +++ b/src/Ombi.Api.Github/Ombi.Api.Github.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 8.0 diff --git a/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj b/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj index 79414ab00..5f1d62c66 100644 --- a/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj +++ b/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj b/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj index 809404bd4..bdd16edf8 100644 --- a/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj +++ b/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 8.0 diff --git a/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj b/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj index 809404bd4..bdd16edf8 100644 --- a/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj +++ b/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 8.0 diff --git a/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj b/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj index 2192220e6..344b2e504 100644 --- a/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj +++ b/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 @@ -10,7 +10,7 @@ - + diff --git a/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj b/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj index 8b408314a..c703166d5 100644 --- a/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj +++ b/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 8.0 diff --git a/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj b/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj index 002e44260..349da09d9 100644 --- a/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj +++ b/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 8.0 diff --git a/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj b/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj index 5c67fe577..f76114f83 100644 --- a/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj +++ b/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.Plex/PlexApi.cs b/src/Ombi.Api.Plex/PlexApi.cs index eaafcd75f..0d6356457 100644 --- a/src/Ombi.Api.Plex/PlexApi.cs +++ b/src/Ombi.Api.Plex/PlexApi.cs @@ -135,16 +135,15 @@ namespace Ombi.Api.Plex } /// - // 192.168.1.69:32400/library/metadata/3662/allLeaves - // The metadata ratingkey should be in the Cache - // Search for it and then call the above with the Directory.RatingKey - // THEN! We need the episode metadata using result.Vide.Key ("/library/metadata/3664") - // We then have the GUID which contains the TVDB ID plus the season and episode number: guid="com.plexapp.agents.thetvdb://269586/2/8?lang=en" + /// 192.168.1.69:32400/library/metadata/3662/allLeaves + /// The metadata ratingkey should be in the Cache + /// Search for it and then call the above with the Directory.RatingKey + /// THEN! We need the episode metadata using result.Vide.Key ("/library/metadata/3664") + /// We then have the GUID which contains the TVDB ID plus the season and episode number: guid="com.plexapp.agents.thetvdb://269586/2/8?lang=en" /// /// /// /// - /// public async Task GetEpisodeMetaData(string authToken, string plexFullHost, int ratingKey) { var request = new Request($"/library/metadata/{ratingKey}", plexFullHost, HttpMethod.Get); @@ -308,7 +307,7 @@ namespace Ombi.Api.Plex } private async Task CheckInstallId(PlexSettings s) { - if (s.InstallId == null || s.InstallId == Guid.Empty) + if (s?.InstallId == Guid.Empty || s.InstallId == Guid.Empty) { s.InstallId = Guid.NewGuid(); await _plexSettings.SaveSettingsAsync(s); diff --git a/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj b/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj index 5c67fe577..f76114f83 100644 --- a/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj +++ b/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj b/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj index 79414ab00..5f1d62c66 100644 --- a/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj +++ b/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj b/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj index 07b8c609f..23cb45a6e 100644 --- a/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj +++ b/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 @@ -10,7 +10,7 @@ - + diff --git a/src/Ombi.Api.Service/Ombi.Api.Service.csproj b/src/Ombi.Api.Service/Ombi.Api.Service.csproj index 18ae372a2..11769e131 100644 --- a/src/Ombi.Api.Service/Ombi.Api.Service.csproj +++ b/src/Ombi.Api.Service/Ombi.Api.Service.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 @@ -12,7 +12,7 @@ - + diff --git a/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj b/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj index 809404bd4..bdd16edf8 100644 --- a/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj +++ b/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 8.0 diff --git a/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj b/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj index 5c67fe577..f76114f83 100644 --- a/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj +++ b/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj b/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj index 5c67fe577..f76114f83 100644 --- a/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj +++ b/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj b/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj index 809404bd4..bdd16edf8 100644 --- a/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj +++ b/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 8.0 diff --git a/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj b/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj index f7a2a3766..5cd35f0ac 100644 --- a/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj +++ b/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj b/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj index 2bb0c6352..5457b0290 100644 --- a/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj +++ b/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api.Twilio/Ombi.Api.Twilio.csproj b/src/Ombi.Api.Twilio/Ombi.Api.Twilio.csproj index dd350ff91..7a6146493 100644 --- a/src/Ombi.Api.Twilio/Ombi.Api.Twilio.csproj +++ b/src/Ombi.Api.Twilio/Ombi.Api.Twilio.csproj @@ -1,7 +1,7 @@ - + - netstandard2.1 + net5.0 diff --git a/src/Ombi.Api.Webhook/Ombi.Api.Webhook.csproj b/src/Ombi.Api.Webhook/Ombi.Api.Webhook.csproj index 84f215437..d258a95b2 100644 --- a/src/Ombi.Api.Webhook/Ombi.Api.Webhook.csproj +++ b/src/Ombi.Api.Webhook/Ombi.Api.Webhook.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Api/HttpRequestExtensions.cs b/src/Ombi.Api/HttpRequestExtensions.cs index fa2ded97d..a08180362 100644 --- a/src/Ombi.Api/HttpRequestExtensions.cs +++ b/src/Ombi.Api/HttpRequestExtensions.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; namespace Ombi.Api { - public static class HttpRequestExtnesions + public static class HttpRequestExtensions { public static async Task Clone(this HttpRequestMessage request) { @@ -14,9 +14,9 @@ namespace Ombi.Api Content = await request.Content.Clone(), Version = request.Version }; - foreach (KeyValuePair prop in request.Properties) + foreach (KeyValuePair prop in request.Options) { - clone.Properties.Add(prop); + clone.Options.TryAdd(prop.Key, prop.Value); } foreach (KeyValuePair> header in request.Headers) { diff --git a/src/Ombi.Api/Ombi.Api.csproj b/src/Ombi.Api/Ombi.Api.csproj index a6af5851f..98da29c2a 100644 --- a/src/Ombi.Api/Ombi.Api.csproj +++ b/src/Ombi.Api/Ombi.Api.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 @@ -10,8 +10,8 @@ - - + + diff --git a/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj b/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj index 2be1554de..c86ed0c94 100644 --- a/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj +++ b/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj @@ -1,13 +1,14 @@  - netcoreapp3.1 + net5.0 true true + @@ -16,7 +17,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Ombi.Core/Engine/Demo/DemoMovieSearchEngine.cs b/src/Ombi.Core/Engine/Demo/DemoMovieSearchEngine.cs index 86582fb4d..f392bf7ad 100644 --- a/src/Ombi.Core/Engine/Demo/DemoMovieSearchEngine.cs +++ b/src/Ombi.Core/Engine/Demo/DemoMovieSearchEngine.cs @@ -50,7 +50,7 @@ namespace Ombi.Core.Engine.Demo return null; } - public async Task> NowPlayingMovies() + new public async Task> NowPlayingMovies() { var rand = new Random(); var responses = new List(); @@ -72,18 +72,18 @@ namespace Ombi.Core.Engine.Demo return responses; } - public async Task> PopularMovies() + new public async Task> PopularMovies() { return await NowPlayingMovies(); } - public async Task> TopRatedMovies() + new public async Task> TopRatedMovies() { return await NowPlayingMovies(); } - public async Task> UpcomingMovies() + new public async Task> UpcomingMovies() { return await NowPlayingMovies(); diff --git a/src/Ombi.Core/Engine/Demo/DemoTvSearchEngine.cs b/src/Ombi.Core/Engine/Demo/DemoTvSearchEngine.cs index dd117fb53..343fb400a 100644 --- a/src/Ombi.Core/Engine/Demo/DemoTvSearchEngine.cs +++ b/src/Ombi.Core/Engine/Demo/DemoTvSearchEngine.cs @@ -35,7 +35,7 @@ namespace Ombi.Core.Engine.Demo private readonly DemoLists _demoLists; - public async Task> Search(string search) + new public async Task> Search(string search) { var searchResult = await TvMazeApi.Search(search); diff --git a/src/Ombi.Core/Engine/V2/CalendarEngine.cs b/src/Ombi.Core/Engine/V2/CalendarEngine.cs index 4b3618780..4a5814e1a 100644 --- a/src/Ombi.Core/Engine/V2/CalendarEngine.cs +++ b/src/Ombi.Core/Engine/V2/CalendarEngine.cs @@ -27,7 +27,7 @@ namespace Ombi.Core.Engine.V2 private readonly IMovieRequestRepository _movieRepo; private readonly ITvRequestRepository _tvRepo; - public async Task> GetCalendarData() + public Task> GetCalendarData() { var viewModel = new List(); var movies = _movieRepo.GetAll().Where(x => @@ -78,7 +78,7 @@ namespace Ombi.Core.Engine.V2 }); } - return viewModel; + return Task.FromResult(viewModel); } private string GetBackgroundColor(BaseRequest req) diff --git a/src/Ombi.Core/Models/Search/V2/MovieCollectionsViewModel.cs b/src/Ombi.Core/Models/Search/V2/MovieCollectionsViewModel.cs index ace5ce76c..47870c18b 100644 --- a/src/Ombi.Core/Models/Search/V2/MovieCollectionsViewModel.cs +++ b/src/Ombi.Core/Models/Search/V2/MovieCollectionsViewModel.cs @@ -13,7 +13,6 @@ namespace Ombi.Core.Models.Search.V2 public class MovieCollection : SearchViewModel { - public int Id { get; set; } public string Overview { get; set; } public string PosterPath { get; set; } public string Title { get; set; } diff --git a/src/Ombi.Core/Ombi.Core.csproj b/src/Ombi.Core/Ombi.Core.csproj index 4f987cea3..8acbaceb0 100644 --- a/src/Ombi.Core/Ombi.Core.csproj +++ b/src/Ombi.Core/Ombi.Core.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 @@ -12,10 +12,10 @@ - - + + - + diff --git a/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj b/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj index 9dfb38770..bbfe532eb 100644 --- a/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj +++ b/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 @@ -10,9 +10,9 @@ - + - + diff --git a/src/Ombi.HealthChecks/Ombi.HealthChecks.csproj b/src/Ombi.HealthChecks/Ombi.HealthChecks.csproj index 57c2ef059..5171c9c36 100644 --- a/src/Ombi.HealthChecks/Ombi.HealthChecks.csproj +++ b/src/Ombi.HealthChecks/Ombi.HealthChecks.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 diff --git a/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj b/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj index 7fd44f346..1989f69d8 100644 --- a/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj +++ b/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj @@ -1,15 +1,16 @@  - netcoreapp3.1 + net5.0 false + - + diff --git a/src/Ombi.Helpers/Ombi.Helpers.csproj b/src/Ombi.Helpers/Ombi.Helpers.csproj index 6b129146e..48969ac1a 100644 --- a/src/Ombi.Helpers/Ombi.Helpers.csproj +++ b/src/Ombi.Helpers/Ombi.Helpers.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 @@ -11,10 +11,10 @@ - - - - + + + + diff --git a/src/Ombi.Hubs/Ombi.Hubs.csproj b/src/Ombi.Hubs/Ombi.Hubs.csproj index ae2e158ad..1f994b552 100644 --- a/src/Ombi.Hubs/Ombi.Hubs.csproj +++ b/src/Ombi.Hubs/Ombi.Hubs.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 8.0 diff --git a/src/Ombi.Mapping/Ombi.Mapping.csproj b/src/Ombi.Mapping/Ombi.Mapping.csproj index 0b8645b08..cd0ee4724 100644 --- a/src/Ombi.Mapping/Ombi.Mapping.csproj +++ b/src/Ombi.Mapping/Ombi.Mapping.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj b/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj index 6a296fa24..35adcf7af 100644 --- a/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj +++ b/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj b/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj index d73f6c745..469611ac8 100644 --- a/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj +++ b/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj @@ -1,14 +1,15 @@  - netcoreapp3.1 + net5.0 - + + diff --git a/src/Ombi.Notifications/Agents/DiscordNotification.cs b/src/Ombi.Notifications/Agents/DiscordNotification.cs index 71d0e298c..dda10f210 100644 --- a/src/Ombi.Notifications/Agents/DiscordNotification.cs +++ b/src/Ombi.Notifications/Agents/DiscordNotification.cs @@ -144,7 +144,8 @@ namespace Ombi.Notifications.Agents "Available" => "51283", "Denied" => "13959168", "Processing Request" => "37354", - "Pending Approval" => "16754470" + "Pending Approval" => "16754470", + _ => throw new ArgumentOutOfRangeException(nameof(color)) }; } } diff --git a/src/Ombi.Notifications/Ombi.Notifications.csproj b/src/Ombi.Notifications/Ombi.Notifications.csproj index 93afe0c14..798026b47 100644 --- a/src/Ombi.Notifications/Ombi.Notifications.csproj +++ b/src/Ombi.Notifications/Ombi.Notifications.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj b/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj index 217d4997d..003c240f1 100644 --- a/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj +++ b/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj @@ -1,17 +1,18 @@  - netcoreapp3.1 + net5.0 - + + - + diff --git a/src/Ombi.Schedule/Jobs/Couchpotato/CouchPotatoSync.cs b/src/Ombi.Schedule/Jobs/Couchpotato/CouchPotatoSync.cs index d30091226..98a0c0910 100644 --- a/src/Ombi.Schedule/Jobs/Couchpotato/CouchPotatoSync.cs +++ b/src/Ombi.Schedule/Jobs/Couchpotato/CouchPotatoSync.cs @@ -80,7 +80,7 @@ namespace Ombi.Schedule.Jobs.Couchpotato // Let's remove the old cached data using (var tran = await _ctx.Database.BeginTransactionAsync()) { - await _ctx.Database.ExecuteSqlCommandAsync("DELETE FROM CouchPotatoCache"); + await _ctx.Database.ExecuteSqlRawAsync("DELETE FROM CouchPotatoCache"); tran.Commit(); } diff --git a/src/Ombi.Schedule/Jobs/Lidarr/LidarrAlbumSync.cs b/src/Ombi.Schedule/Jobs/Lidarr/LidarrAlbumSync.cs index a8ed89b18..9530cf5a1 100644 --- a/src/Ombi.Schedule/Jobs/Lidarr/LidarrAlbumSync.cs +++ b/src/Ombi.Schedule/Jobs/Lidarr/LidarrAlbumSync.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.SignalR; using Microsoft.EntityFrameworkCore; @@ -53,7 +54,7 @@ namespace Ombi.Schedule.Jobs.Lidarr // Let's remove the old cached data using (var tran = await _ctx.Database.BeginTransactionAsync()) { - await _ctx.Database.ExecuteSqlCommandAsync("DELETE FROM LidarrAlbumCache"); + await _ctx.Database.ExecuteSqlRawAsync("DELETE FROM LidarrAlbumCache"); tran.Commit(); } diff --git a/src/Ombi.Schedule/Jobs/Lidarr/LidarrArtistSync.cs b/src/Ombi.Schedule/Jobs/Lidarr/LidarrArtistSync.cs index 47289f61a..edcd6cbe6 100644 --- a/src/Ombi.Schedule/Jobs/Lidarr/LidarrArtistSync.cs +++ b/src/Ombi.Schedule/Jobs/Lidarr/LidarrArtistSync.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.SignalR; using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Internal; using Microsoft.Extensions.Logging; using Ombi.Api.Lidarr; using Ombi.Core.Settings; @@ -53,7 +53,7 @@ namespace Ombi.Schedule.Jobs.Lidarr // Let's remove the old cached data using (var tran = await _ctx.Database.BeginTransactionAsync()) { - await _ctx.Database.ExecuteSqlCommandAsync("DELETE FROM LidarrArtistCache"); + await _ctx.Database.ExecuteSqlRawAsync("DELETE FROM LidarrArtistCache"); tran.Commit(); } diff --git a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs index 32e2dd1da..d1fdd0788 100644 --- a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs +++ b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs @@ -16,7 +16,6 @@ using Ombi.Api.CouchPotato.Models; using Ombi.Api.Lidarr; using Ombi.Api.Lidarr.Models; using Ombi.Api.TheMovieDb; -using Ombi.Api.TheMovieDb; using Ombi.Api.TheMovieDb.Models; using Ombi.Api.TvMaze; using Ombi.Core.Settings; @@ -649,7 +648,9 @@ namespace Ombi.Schedule.Jobs.Ombi { releaseDate = $"({DateTime.Parse(info.ReleaseDate).Year})"; } +#pragma warning disable RCS1075 // Avoid empty catch clause that catches System.Exception. catch (Exception) +#pragma warning restore RCS1075 // Avoid empty catch clause that catches System.Exception. { // Swallow, couldn't parse the date } diff --git a/src/Ombi.Schedule/Jobs/SickRage/SickRageSync.cs b/src/Ombi.Schedule/Jobs/SickRage/SickRageSync.cs index 5956ee34b..a223a0cfa 100644 --- a/src/Ombi.Schedule/Jobs/SickRage/SickRageSync.cs +++ b/src/Ombi.Schedule/Jobs/SickRage/SickRageSync.cs @@ -48,7 +48,7 @@ namespace Ombi.Schedule.Jobs.SickRage var ids = srShows.Select(x => x.tvdbid); using (var tran = await _ctx.Database.BeginTransactionAsync()) { - await _ctx.Database.ExecuteSqlCommandAsync("DELETE FROM SickRageCache"); + await _ctx.Database.ExecuteSqlRawAsync("DELETE FROM SickRageCache"); tran.Commit(); } @@ -57,7 +57,7 @@ namespace Ombi.Schedule.Jobs.SickRage await _ctx.SickRageCache.AddRangeAsync(entites); var episodesToAdd = new List(); - await _ctx.Database.ExecuteSqlCommandAsync("DELETE FROM SickRageEpisodeCache"); + await _ctx.Database.ExecuteSqlRawAsync("DELETE FROM SickRageEpisodeCache"); foreach (var s in srShows) { var seasons = await _api.GetSeasonList(s.tvdbid, settings.ApiKey, settings.FullUri); diff --git a/src/Ombi.Schedule/Ombi.Schedule.csproj b/src/Ombi.Schedule/Ombi.Schedule.csproj index 41d15d503..ac63d5b2f 100644 --- a/src/Ombi.Schedule/Ombi.Schedule.csproj +++ b/src/Ombi.Schedule/Ombi.Schedule.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj b/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj index a8674b9f2..4e86eb9fe 100644 --- a/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj +++ b/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj @@ -1,6 +1,6 @@  - netcoreapp3.1 + net5.0 false @@ -8,7 +8,8 @@ - + + diff --git a/src/Ombi.Settings/Ombi.Settings.csproj b/src/Ombi.Settings/Ombi.Settings.csproj index 8f2d80251..dc015ef9f 100644 --- a/src/Ombi.Settings/Ombi.Settings.csproj +++ b/src/Ombi.Settings/Ombi.Settings.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 @@ -10,9 +10,9 @@ - + - + diff --git a/src/Ombi.Store/Context/Sqlite/ExternalSqliteContext.cs b/src/Ombi.Store/Context/Sqlite/ExternalSqliteContext.cs index c85084d4a..f442531bc 100644 --- a/src/Ombi.Store/Context/Sqlite/ExternalSqliteContext.cs +++ b/src/Ombi.Store/Context/Sqlite/ExternalSqliteContext.cs @@ -27,7 +27,9 @@ namespace Ombi.Store.Context.Sqlite Database.ExecuteSqlRaw(@"INSERT OR IGNORE INTO __EFMigrationsHistory (MigrationId,ProductVersion) VALUES('20191103205133_Inital', '2.2.6-servicing-10079'); "); } +#pragma warning disable RCS1075 // Avoid empty catch clause that catches System.Exception. catch (Exception) +#pragma warning restore RCS1075 // Avoid empty catch clause that catches System.Exception. { // ignored } diff --git a/src/Ombi.Store/Ombi.Store.csproj b/src/Ombi.Store/Ombi.Store.csproj index 9d6bc3e92..883819763 100644 --- a/src/Ombi.Store/Ombi.Store.csproj +++ b/src/Ombi.Store/Ombi.Store.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 3.0.0.0 3.0.0.0 @@ -11,15 +11,15 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + diff --git a/src/Ombi.Store/Repository/Requests/ITvRequestRepository.cs b/src/Ombi.Store/Repository/Requests/ITvRequestRepository.cs index 8c2c838e7..396ec9dfb 100644 --- a/src/Ombi.Store/Repository/Requests/ITvRequestRepository.cs +++ b/src/Ombi.Store/Repository/Requests/ITvRequestRepository.cs @@ -9,10 +9,7 @@ namespace Ombi.Store.Repository.Requests public interface ITvRequestRepository : IRepository { OmbiContext Db { get; } - Task Add(TvRequests request); Task AddChild(ChildRequests request); - Task Delete(TvRequests request); - Task DeleteRange(IEnumerable request); Task DeleteChild(ChildRequests request); IQueryable Get(); IQueryable GetLite(); diff --git a/src/Ombi.Test.Common/Ombi.Test.Common.csproj b/src/Ombi.Test.Common/Ombi.Test.Common.csproj index f8da0ff6d..ecc1edfd4 100644 --- a/src/Ombi.Test.Common/Ombi.Test.Common.csproj +++ b/src/Ombi.Test.Common/Ombi.Test.Common.csproj @@ -1,14 +1,14 @@  - netstandard2.1 + net5.0 8.0 - + diff --git a/src/Ombi.Tests/Ombi.Tests.csproj b/src/Ombi.Tests/Ombi.Tests.csproj index f4346de50..97970530e 100644 --- a/src/Ombi.Tests/Ombi.Tests.csproj +++ b/src/Ombi.Tests/Ombi.Tests.csproj @@ -1,19 +1,20 @@  - netcoreapp3.1 + net5.0 false - + + - + diff --git a/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj b/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj index 2f8b0ce3b..d0611a8a9 100644 --- a/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj +++ b/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net5.0 Ombi.Api.TheMovieDb 3.0.0.0 3.0.0.0 diff --git a/src/Ombi.Updater/Ombi.Updater.csproj b/src/Ombi.Updater/Ombi.Updater.csproj index b23f3297a..7e959f6ec 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.1 + net5.0 3.0.0.0 3.0.0.0 @@ -12,14 +12,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts index c9b2f94fe..6d95241c5 100644 --- a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts +++ b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts @@ -136,7 +136,7 @@ export class MyNavComponent implements OnInit { if (hour >= 12 && hour < 18) { this.welcomeText = 'NavigationBar.AfternoonWelcome'; } - if (hour >= 18 && hour < 23) { + if (hour >= 18 && hour < 24) { this.welcomeText = 'NavigationBar.EveningWelcome'; } } diff --git a/src/Ombi/Controllers/V1/External/EmbyController.cs b/src/Ombi/Controllers/V1/External/EmbyController.cs index 4b201fe7c..29ad84eb2 100644 --- a/src/Ombi/Controllers/V1/External/EmbyController.cs +++ b/src/Ombi/Controllers/V1/External/EmbyController.cs @@ -19,11 +19,7 @@ namespace Ombi.Controllers.V1.External [Produces("application/json")] public class EmbyController : Controller { - /// - /// - /// - /// - /// + public EmbyController(IEmbyApiFactory emby, ISettingsService embySettings) { EmbyApi = emby; diff --git a/src/Ombi/Controllers/V1/SettingsController.cs b/src/Ombi/Controllers/V1/SettingsController.cs index 8cef872f4..1d340b4cd 100644 --- a/src/Ombi/Controllers/V1/SettingsController.cs +++ b/src/Ombi/Controllers/V1/SettingsController.cs @@ -183,7 +183,7 @@ namespace Ombi.Controllers.V1 [HttpPost("plex")] public async Task PlexSettings([FromBody]PlexSettings plex) { - if (plex.InstallId == null || plex.InstallId == Guid.Empty) + if (plex?.InstallId == Guid.Empty || plex.InstallId == Guid.Empty) { plex.InstallId = Guid.NewGuid(); } diff --git a/src/Ombi/Controllers/V1/TokenController.cs b/src/Ombi/Controllers/V1/TokenController.cs index ad6e8ca23..66013ecf5 100644 --- a/src/Ombi/Controllers/V1/TokenController.cs +++ b/src/Ombi/Controllers/V1/TokenController.cs @@ -135,7 +135,7 @@ namespace Ombi.Controllers.V1 new Claim("Id", user.Id) }; claims.AddRange(roles.Select(role => new Claim("role", role))); - if(user.Email.HasValue()) + if (user.Email.HasValue()) { claims.Add(new Claim("Email", user.Email)); } @@ -158,14 +158,8 @@ namespace Ombi.Controllers.V1 } user.LastLoggedIn = DateTime.UtcNow; - try - { - await _userManager.UpdateAsync(user); - } - catch (Exception) - { - - } + + await _userManager.UpdateAsync(user); return new JsonResult(new { diff --git a/src/Ombi/Extensions/StartupExtensions.cs b/src/Ombi/Extensions/StartupExtensions.cs index cc90155e7..d14dc2e9e 100644 --- a/src/Ombi/Extensions/StartupExtensions.cs +++ b/src/Ombi/Extensions/StartupExtensions.cs @@ -48,7 +48,7 @@ namespace Ombi Type = SecuritySchemeType.ApiKey }); c.CustomSchemaIds(x => x.FullName); - var basePath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); + var basePath = Path.GetDirectoryName(AppContext.BaseDirectory); var xmlPath = Path.Combine(basePath, "Swagger.xml"); try { diff --git a/src/Ombi/Ombi.csproj b/src/Ombi/Ombi.csproj index 7fd6ce5a9..6925e8903 100644 --- a/src/Ombi/Ombi.csproj +++ b/src/Ombi/Ombi.csproj @@ -1,6 +1,6 @@  - netcoreapp3.1 + net5.0 win10-x64;win10-x86;osx-x64;linux-x64;linux-arm;linux-arm64; false Latest @@ -20,22 +20,11 @@ false - - bin\Debug\netcoreapp2.2\Swagger.xml - 1701;1702;1705;1591; - - - - - bin\Release\netcoreapp2.2\Swagger.xml - 1701;1702;1705;1591; - TRACE;RELEASE;NETCOREAPP2_0 - @@ -62,23 +51,21 @@ - + - - + + - - - - - + + + @@ -98,13 +85,6 @@ - - - Always - - - - diff --git a/src/Ombi/databasea.json b/src/Ombi/databasea.json new file mode 100644 index 000000000..7c77dd61a --- /dev/null +++ b/src/Ombi/databasea.json @@ -0,0 +1,14 @@ +{ + "OmbiDatabase": { + "Type": "MySQL", + "ConnectionString": "Server=192.168.68.118;Database=app.ombi.io;User=ombi" + }, + "SettingsDatabase": { + "Type": "MySQL", + "ConnectionString": "Server=192.168.68.118;Database=app.ombi.io;User=ombi" + }, + "ExternalDatabase": { + "Type": "MySQL", + "ConnectionString": "Server=192.168.68.118;Database=app.ombi.io;User=ombi" + } + } \ No newline at end of file