2017-09-05 12:49:02 -07:00
|
|
|
|
using System;
|
|
|
|
|
using MediaBrowser.Controller.Library;
|
2013-03-07 22:08:27 -07:00
|
|
|
|
using MediaBrowser.Controller.Plugins;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
2016-11-03 15:06:00 -07:00
|
|
|
|
namespace Emby.Server.Implementations.EntryPoints
|
2013-03-07 22:08:27 -07:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class RefreshUsersMetadata
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class RefreshUsersMetadata : IServerEntryPoint
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The _user manager
|
|
|
|
|
/// </summary>
|
|
|
|
|
private readonly IUserManager _userManager;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of the <see cref="RefreshUsersMetadata" /> class.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="userManager">The user manager.</param>
|
|
|
|
|
public RefreshUsersMetadata(IUserManager userManager)
|
|
|
|
|
{
|
|
|
|
|
_userManager = userManager;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Runs this instance.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public async void Run()
|
|
|
|
|
{
|
|
|
|
|
await _userManager.RefreshUsersMetadata(CancellationToken.None).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
2017-09-05 12:49:02 -07:00
|
|
|
|
GC.SuppressFinalize(this);
|
2013-03-07 22:08:27 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|