start library scan after database clean

pull/702/head
Luke Pulverenti 9 years ago
parent 86925d5be0
commit 4fc3753f64

@ -17,6 +17,7 @@ using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Localization; using MediaBrowser.Controller.Localization;
using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Net;
using MediaBrowser.Server.Implementations.ScheduledTasks;
namespace MediaBrowser.Server.Implementations.Persistence namespace MediaBrowser.Server.Implementations.Persistence
{ {
@ -29,11 +30,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
private readonly IFileSystem _fileSystem; private readonly IFileSystem _fileSystem;
private readonly IHttpServer _httpServer; private readonly IHttpServer _httpServer;
private readonly ILocalizationManager _localization; private readonly ILocalizationManager _localization;
private readonly ITaskManager _taskManager;
public const int MigrationVersion = 12; public const int MigrationVersion = 12;
public static bool EnableUnavailableMessage = false; public static bool EnableUnavailableMessage = false;
public CleanDatabaseScheduledTask(ILibraryManager libraryManager, IItemRepository itemRepo, ILogger logger, IServerConfigurationManager config, IFileSystem fileSystem, IHttpServer httpServer, ILocalizationManager localization) public CleanDatabaseScheduledTask(ILibraryManager libraryManager, IItemRepository itemRepo, ILogger logger, IServerConfigurationManager config, IFileSystem fileSystem, IHttpServer httpServer, ILocalizationManager localization, ITaskManager taskManager)
{ {
_libraryManager = libraryManager; _libraryManager = libraryManager;
_itemRepo = itemRepo; _itemRepo = itemRepo;
@ -42,6 +44,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
_fileSystem = fileSystem; _fileSystem = fileSystem;
_httpServer = httpServer; _httpServer = httpServer;
_localization = localization; _localization = localization;
_taskManager = taskManager;
} }
public string Name public string Name
@ -98,6 +101,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
{ {
EnableUnavailableMessage = false; EnableUnavailableMessage = false;
_httpServer.GlobalResponse = null; _httpServer.GlobalResponse = null;
_taskManager.QueueScheduledTask<RefreshMediaLibraryTask>();
} }
} }

Loading…
Cancel
Save