diff --git a/src/Ombi.Api.Sonarr/Models/SonarrProfile.cs b/src/Ombi.Api.Sonarr/Models/SonarrProfile.cs index 179459c43..51249d79b 100644 --- a/src/Ombi.Api.Sonarr/Models/SonarrProfile.cs +++ b/src/Ombi.Api.Sonarr/Models/SonarrProfile.cs @@ -5,8 +5,6 @@ namespace Ombi.Api.Sonarr.Models public class SonarrProfile { public string name { get; set; } - public Cutoff cutoff { get; set; } - public List items { get; set; } public int id { get; set; } } } \ No newline at end of file diff --git a/src/Ombi.Core/Senders/TvSender.cs b/src/Ombi.Core/Senders/TvSender.cs index 22f6aadcd..1daa1bf0f 100644 --- a/src/Ombi.Core/Senders/TvSender.cs +++ b/src/Ombi.Core/Senders/TvSender.cs @@ -157,7 +157,6 @@ namespace Ombi.Core.Senders } int qualityToUse; - var sonarrV3 = s.V3; var languageProfileId = s.LanguageProfile; string rootFolderPath; string seriesType; @@ -265,13 +264,11 @@ namespace Ombi.Core.Senders ignoreEpisodesWithFiles = false, // There shouldn't be any episodes with files, this is a new season ignoreEpisodesWithoutFiles = false, // We want all missing searchForMissingEpisodes = false // we want dont want to search yet. We want to make sure everything is unmonitored/monitored correctly. - } - }; + }, + languageProfileId = languageProfileId + }; - if (sonarrV3) - { - newSeries.languageProfileId = languageProfileId; - } + // Montitor the correct seasons, // If we have that season in the model then it's monitored! diff --git a/src/Ombi.Helpers/MediaCacheService.cs b/src/Ombi.Helpers/MediaCacheService.cs index 8d244f4b3..27e9bb6d5 100644 --- a/src/Ombi.Helpers/MediaCacheService.cs +++ b/src/Ombi.Helpers/MediaCacheService.cs @@ -13,7 +13,7 @@ namespace Ombi.Helpers } public class MediaCacheService : CacheService, IMediaCacheService { - private const string CacheKey = "MediaCacheServiceKeys"; + private const string _cacheKey = "MediaCacheServiceKeys"; public MediaCacheService(IMemoryCache memoryCache) : base(memoryCache) { @@ -43,19 +43,19 @@ namespace Ombi.Helpers private void UpdateLocalCache(string cacheKey) { - var mediaServiceCache = _memoryCache.Get>(CacheKey); + var mediaServiceCache = _memoryCache.Get>(_cacheKey); if (mediaServiceCache == null) { mediaServiceCache = new List(); } mediaServiceCache.Add(cacheKey); - _memoryCache.Remove(CacheKey); - _memoryCache.Set(CacheKey, mediaServiceCache); + _memoryCache.Remove(_cacheKey); + _memoryCache.Set(_cacheKey, mediaServiceCache); } public Task Purge() { - var keys = _memoryCache.Get>(CacheKey); + var keys = _memoryCache.Get>(_cacheKey); if (keys == null) { return Task.CompletedTask; diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs index 32620abd4..d5aac7379 100644 --- a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs +++ b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs @@ -124,7 +124,6 @@ namespace Ombi.Schedule.Jobs.Plex { await NotifyClient("Plex Sync - Checking if any requests are now available"); Logger.LogInformation("Kicking off Plex Availability Checker"); - await _mediaCacheService.Purge(); await OmbiQuartz.TriggerJob(nameof(IPlexAvailabilityChecker), "Plex"); } var processedCont = processedContent?.Content?.Count() ?? 0; @@ -133,6 +132,7 @@ namespace Ombi.Schedule.Jobs.Plex await NotifyClient(recentlyAddedSearch ? $"Plex Recently Added Sync Finished, We processed {processedCont}, and {processedEp} Episodes" : "Plex Content Sync Finished"); + await _mediaCacheService.Purge(); } private async Task StartTheCache(PlexSettings plexSettings, bool recentlyAddedSearch) diff --git a/src/Ombi.Schedule/Jobs/Sonarr/SonarrSync.cs b/src/Ombi.Schedule/Jobs/Sonarr/SonarrSync.cs index 834c45883..0de749308 100644 --- a/src/Ombi.Schedule/Jobs/Sonarr/SonarrSync.cs +++ b/src/Ombi.Schedule/Jobs/Sonarr/SonarrSync.cs @@ -23,7 +23,7 @@ namespace Ombi.Schedule.Jobs.Sonarr { public class SonarrSync : ISonarrSync { - public SonarrSync(ISettingsService s, ISonarrApi api, ILogger l, ExternalContext ctx, + public SonarrSync(ISettingsService s, ISonarrV3Api api, ILogger l, ExternalContext ctx, IMovieDbApi movieDbApi) { _settings = s; @@ -35,7 +35,7 @@ namespace Ombi.Schedule.Jobs.Sonarr } private readonly ISettingsService _settings; - private readonly ISonarrApi _api; + private readonly ISonarrV3Api _api; private readonly ILogger _log; private readonly ExternalContext _ctx; private readonly IMovieDbApi _movieDbApi; @@ -74,8 +74,6 @@ namespace Ombi.Schedule.Jobs.Sonarr } }); - var existingSeries = await _ctx.SonarrCache.Select(x => x.TvDbId).ToListAsync(); - var sonarrCacheToSave = new HashSet(); foreach (var id in ids) { diff --git a/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs b/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs index 2dc612f7e..c367cb48e 100644 --- a/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs +++ b/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs @@ -18,7 +18,6 @@ public string QualityProfileAnime { get; set; } public string RootPathAnime { get; set; } public bool AddOnly { get; set; } - public bool V3 { get; set; } public int LanguageProfile { get; set; } public int LanguageProfileAnime { get; set; } public bool ScanForAvailability { get; set; } diff --git a/src/Ombi/.vscode/settings.json b/src/Ombi/.vscode/settings.json index 0ac92f4ba..d0eaf2fe6 100644 --- a/src/Ombi/.vscode/settings.json +++ b/src/Ombi/.vscode/settings.json @@ -22,7 +22,8 @@ "emby", "availability-rules", "details", - "requests" + "requests", + "sonarr" ], "rpc.enabled": true } diff --git a/src/Ombi/ClientApp/src/app/discover/components/recently-requested-list/recently-requested-list.component.html b/src/Ombi/ClientApp/src/app/discover/components/recently-requested-list/recently-requested-list.component.html index f1b2a8057..f73b74752 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/recently-requested-list/recently-requested-list.component.html +++ b/src/Ombi/ClientApp/src/app/discover/components/recently-requested-list/recently-requested-list.component.html @@ -1,5 +1,11 @@ - - - - - \ No newline at end of file +
+
+ + + + + +
+
\ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/interfaces/ISettings.ts b/src/Ombi/ClientApp/src/app/interfaces/ISettings.ts index 4594d2a2f..1c66fff92 100644 --- a/src/Ombi/ClientApp/src/app/interfaces/ISettings.ts +++ b/src/Ombi/ClientApp/src/app/interfaces/ISettings.ts @@ -142,7 +142,6 @@ export interface ISonarrSettings extends IExternalSettings { rootPathAnime: string; fullRootPath: string; addOnly: boolean; - v3: boolean; languageProfile: number; languageProfileAnime: number; scanForAvailability: boolean; diff --git a/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-advanced-options/tv-advanced-options.component.ts b/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-advanced-options/tv-advanced-options.component.ts index 97e15f774..51d5e3230 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-advanced-options/tv-advanced-options.component.ts +++ b/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-advanced-options/tv-advanced-options.component.ts @@ -45,7 +45,6 @@ export class TvAdvancedOptionsComponent implements OnInit { this.setRootFolderOverrides(); }); - if (settings.v3) { this.sonarrService .getV3LanguageProfiles(settings) .subscribe((profiles: ILanguageProfiles[]) => { @@ -53,7 +52,6 @@ export class TvAdvancedOptionsComponent implements OnInit { this.data.languages = profiles; this.setLanguageOverride(); }); - } }); } diff --git a/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.html b/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.html index 8bef41ca7..b6c9cb7cd 100644 --- a/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.html +++ b/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.html @@ -10,9 +10,6 @@
Enable
-
- V3 -
Advanced
@@ -120,8 +117,8 @@ -
-