mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
TimerProvider will test every 1 minute to see if it matches a schedule for updating season or entire series.
Countdown now shows a real value from RSS Sync. CentralDispatch updated to start RSSSyncTimer when run.
This commit is contained in:
parent
fd4cf86694
commit
0fc75e8907
4 changed files with 75 additions and 13 deletions
|
@ -70,15 +70,21 @@ namespace NzbDrone.Core
|
|||
_kernel.Bind<INotificationProvider>().To<NotificationProvider>().InSingletonScope();
|
||||
_kernel.Bind<ILogProvider>().To<LogProvider>().InSingletonScope();
|
||||
_kernel.Bind<IMediaFileProvider>().To<MediaFileProvider>().InSingletonScope();
|
||||
_kernel.Bind<ITimerProvider>().To<TimerProvider>().InSingletonScope();
|
||||
_kernel.Bind<IRepository>().ToMethod(c => new SimpleRepository(dbProvider, SimpleRepositoryOptions.RunMigrations)).InSingletonScope();
|
||||
|
||||
_kernel.Bind<IRepository>().ToConstant(logRepository).WhenInjectedInto<SubsonicTarget>().InSingletonScope();
|
||||
_kernel.Bind<IRepository>().ToConstant(logRepository).WhenInjectedInto<LogProvider>().InSingletonScope();
|
||||
|
||||
|
||||
ForceMigration(_kernel.Get<IRepository>());
|
||||
SetupIndexers(_kernel.Get<IRepository>()); //Setup the default set of indexers on start-up
|
||||
SetupDefaultQualityProfiles(_kernel.Get<IRepository>()); //Setup the default QualityProfiles on start-up
|
||||
|
||||
//Get the Timers going
|
||||
var config = _kernel.Get<IConfigProvider>();
|
||||
var timer = _kernel.Get<ITimerProvider>();
|
||||
timer.SetRssSyncTimer(Convert.ToInt32(config.GetValue("SyncFrequency", "15", true)));
|
||||
timer.StartRssSyncTimer();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue