mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Don't trigger SceneMapping update and Housekeeping right on the startup event.
This commit is contained in:
@@ -124,7 +124,7 @@ namespace NzbDrone.Core.Test.DataAugmentation.Scene
|
|||||||
.Returns(Builder<SceneMapping>.CreateListOfSize(1).Build());
|
.Returns(Builder<SceneMapping>.CreateListOfSize(1).Build());
|
||||||
|
|
||||||
|
|
||||||
Subject.HandleAsync(new ApplicationStartedEvent());
|
Subject.Execute(new UpdateSceneMappingCommand());
|
||||||
|
|
||||||
Mocker.GetMock<ISceneMappingRepository>()
|
Mocker.GetMock<ISceneMappingRepository>()
|
||||||
.Verify(v => v.All(), Times.Once());
|
.Verify(v => v.All(), Times.Once());
|
||||||
|
@@ -21,7 +21,6 @@ namespace NzbDrone.Core.DataAugmentation.Scene
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class SceneMappingService : ISceneMappingService,
|
public class SceneMappingService : ISceneMappingService,
|
||||||
IHandleAsync<ApplicationStartedEvent>,
|
|
||||||
IHandle<SeriesRefreshStartingEvent>,
|
IHandle<SeriesRefreshStartingEvent>,
|
||||||
IExecute<UpdateSceneMappingCommand>
|
IExecute<UpdateSceneMappingCommand>
|
||||||
{
|
{
|
||||||
@@ -204,11 +203,6 @@ namespace NzbDrone.Core.DataAugmentation.Scene
|
|||||||
return titles.Where(title => title.All(c => c <= 255)).ToList();
|
return titles.Where(title => title.All(c => c <= 255)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleAsync(ApplicationStartedEvent message)
|
|
||||||
{
|
|
||||||
UpdateMappings();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Handle(SeriesRefreshStartingEvent message)
|
public void Handle(SeriesRefreshStartingEvent message)
|
||||||
{
|
{
|
||||||
UpdateMappings();
|
UpdateMappings();
|
||||||
|
@@ -8,8 +8,7 @@ using NzbDrone.Core.Datastore;
|
|||||||
|
|
||||||
namespace NzbDrone.Core.Housekeeping
|
namespace NzbDrone.Core.Housekeeping
|
||||||
{
|
{
|
||||||
public class HousekeepingService : IExecute<HousekeepingCommand>,
|
public class HousekeepingService : IExecute<HousekeepingCommand>
|
||||||
IHandleAsync<ApplicationStartedEvent>
|
|
||||||
{
|
{
|
||||||
private readonly IEnumerable<IHousekeepingTask> _housekeepers;
|
private readonly IEnumerable<IHousekeepingTask> _housekeepers;
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
@@ -50,10 +49,5 @@ namespace NzbDrone.Core.Housekeeping
|
|||||||
{
|
{
|
||||||
Clean();
|
Clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleAsync(ApplicationStartedEvent message)
|
|
||||||
{
|
|
||||||
Clean();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user