diff options
| author | Nyanmisaka <nst799610810@gmail.com> | 2020-09-04 02:55:57 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-04 02:55:57 +0800 |
| commit | 4cb0a57e4645aba8e5e65c7d086091b9161c6c09 (patch) | |
| tree | 25e77817485d70cac8ec3e11a785b08b69d0c60b /Emby.Server.Implementations/IO/LibraryMonitorStartup.cs | |
| parent | 54349fc94597824714f623b8c31583fc044274aa (diff) | |
| parent | 53703566b5e1239bbab308031d94df34a4d168aa (diff) | |
Merge branch 'master' into tonemap
Diffstat (limited to 'Emby.Server.Implementations/IO/LibraryMonitorStartup.cs')
| -rw-r--r-- | Emby.Server.Implementations/IO/LibraryMonitorStartup.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/IO/LibraryMonitorStartup.cs b/Emby.Server.Implementations/IO/LibraryMonitorStartup.cs new file mode 100644 index 000000000..c51cf0545 --- /dev/null +++ b/Emby.Server.Implementations/IO/LibraryMonitorStartup.cs @@ -0,0 +1,35 @@ +using System.Threading.Tasks; +using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Plugins; + +namespace Emby.Server.Implementations.IO +{ + /// <summary> + /// <see cref="IServerEntryPoint" /> which is responsible for starting the library monitor. + /// </summary> + public sealed class LibraryMonitorStartup : IServerEntryPoint + { + private readonly ILibraryMonitor _monitor; + + /// <summary> + /// Initializes a new instance of the <see cref="LibraryMonitorStartup"/> class. + /// </summary> + /// <param name="monitor">The library monitor.</param> + public LibraryMonitorStartup(ILibraryMonitor monitor) + { + _monitor = monitor; + } + + /// <inheritdoc /> + public Task RunAsync() + { + _monitor.Start(); + return Task.CompletedTask; + } + + /// <inheritdoc /> + public void Dispose() + { + } + } +} |
