jellyfin/MediaBrowser.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs
abeloin 68cf16416b Linux fixes:
-Copy PropertyChanged.Fody.dll to Tools/Fody in MediaBrowser.Model.csproj
-Check if root for WebSocketServer.FlashAccessPolicyEnabled (port < 1024)
-Check resolution value !=0 before SetResolution
-Catch _userManager.RefreshUsersMetadata exception when running MB3 for the first time
-Fix _appHost.Init() missing argument
-FFmpeg: set default and execute permission(766) to ffmpeg and ffprobe
-FFmpeg: Detect the OS type and download the correct version 
-Rename MediaBrowser.WebDashboard/dashboard-ui/scripts/Itemdetailpage.js to itemdetailpage.js
2013-12-25 14:26:49 -05:00

53 lines
1.5 KiB
C#

using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Plugins;
using System.Threading;
namespace MediaBrowser.Server.Implementations.EntryPoints
{
/// <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()
{
#if __MonoCS__
try
{
await _userManager.RefreshUsersMetadata(CancellationToken.None).ConfigureAwait(false);
}
catch
{
System.Console.WriteLine("RefreshUsersMetadata task error: No users? First time running?");
}
#else
await _userManager.RefreshUsersMetadata(CancellationToken.None).ConfigureAwait(false);
#endif
}
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public void Dispose()
{
}
}
}