From bd741e053f5bc764ce95180bba23370fdad1041b Mon Sep 17 00:00:00 2001 From: Jamie Rees Date: Wed, 18 Apr 2018 15:15:44 +0100 Subject: [PATCH] Fixed #2169 --- src/Ombi.DependencyInjection/IocExtensions.cs | 1 - src/Ombi.Schedule/JobSetup.cs | 4 +- .../Plex/Interfaces/IPlexRecentlyAddedSync.cs | 9 ----- .../Jobs/Plex/PlexRecentlyAddedSync.cs | 40 ------------------- .../app/settings/jobs/jobs.component.html | 2 +- 5 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 src/Ombi.Schedule/Jobs/Plex/Interfaces/IPlexRecentlyAddedSync.cs delete mode 100644 src/Ombi.Schedule/Jobs/Plex/PlexRecentlyAddedSync.cs diff --git a/src/Ombi.DependencyInjection/IocExtensions.cs b/src/Ombi.DependencyInjection/IocExtensions.cs index e2f667465..92ecf8282 100644 --- a/src/Ombi.DependencyInjection/IocExtensions.cs +++ b/src/Ombi.DependencyInjection/IocExtensions.cs @@ -175,7 +175,6 @@ namespace Ombi.DependencyInjection services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); } } } diff --git a/src/Ombi.Schedule/JobSetup.cs b/src/Ombi.Schedule/JobSetup.cs index 1e78d226c..6626ef933 100644 --- a/src/Ombi.Schedule/JobSetup.cs +++ b/src/Ombi.Schedule/JobSetup.cs @@ -19,7 +19,7 @@ namespace Ombi.Schedule IOmbiAutomaticUpdater updater, IEmbyContentSync embySync, IPlexUserImporter userImporter, IEmbyUserImporter embyUserImporter, ISonarrSync cache, ICouchPotatoSync cpCache, ISettingsService jobsettings, ISickRageSync srSync, IRefreshMetadata refresh, - INewsletterJob newsletter, IPlexRecentlyAddedSync recentlyAddedSync) + INewsletterJob newsletter) { _plexContentSync = plexContentSync; _radarrSync = radarrSync; @@ -33,7 +33,6 @@ namespace Ombi.Schedule _srSync = srSync; _refreshMetadata = refresh; _newsletter = newsletter; - _plexRecentlyAddedSync = recentlyAddedSync; } private readonly IPlexContentSync _plexContentSync; @@ -48,7 +47,6 @@ namespace Ombi.Schedule private readonly ISettingsService _jobSettings; private readonly IRefreshMetadata _refreshMetadata; private readonly INewsletterJob _newsletter; - private readonly IPlexRecentlyAddedSync _plexRecentlyAddedSync; public void Setup() { diff --git a/src/Ombi.Schedule/Jobs/Plex/Interfaces/IPlexRecentlyAddedSync.cs b/src/Ombi.Schedule/Jobs/Plex/Interfaces/IPlexRecentlyAddedSync.cs deleted file mode 100644 index 6616f29bc..000000000 --- a/src/Ombi.Schedule/Jobs/Plex/Interfaces/IPlexRecentlyAddedSync.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Threading.Tasks; - -namespace Ombi.Schedule.Jobs.Plex -{ - public interface IPlexRecentlyAddedSync : IBaseJob - { - Task Start(); - } -} \ No newline at end of file diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexRecentlyAddedSync.cs b/src/Ombi.Schedule/Jobs/Plex/PlexRecentlyAddedSync.cs deleted file mode 100644 index dfcb9cac1..000000000 --- a/src/Ombi.Schedule/Jobs/Plex/PlexRecentlyAddedSync.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Threading.Tasks; -using Ombi.Api.Plex; - -namespace Ombi.Schedule.Jobs.Plex -{ - public class PlexRecentlyAddedSync : IPlexRecentlyAddedSync - { - public PlexRecentlyAddedSync(IPlexContentSync contentSync) - { - _sync = contentSync; - } - - private readonly IPlexContentSync _sync; - - public async Task Start() - { - await _sync.CacheContent(true); - } - - private bool _disposed; - protected virtual void Dispose(bool disposing) - { - if (_disposed) - return; - - if (disposing) - { - _sync?.Dispose(); - } - _disposed = true; - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } -} \ No newline at end of file diff --git a/src/Ombi/ClientApp/app/settings/jobs/jobs.component.html b/src/Ombi/ClientApp/app/settings/jobs/jobs.component.html index 72b78a64d..8b9eb89f5 100644 --- a/src/Ombi/ClientApp/app/settings/jobs/jobs.component.html +++ b/src/Ombi/ClientApp/app/settings/jobs/jobs.component.html @@ -59,7 +59,7 @@
- + The Plex Sync is required