mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 07:18:47 +01:00
fix directory watchers not picking up changes
This commit is contained in:
@@ -69,7 +69,7 @@ namespace MediaBrowser.Server.Implementations.IO
|
||||
// This is an arbitraty amount of time, but delay it because file system writes often trigger events after RemoveTempIgnore has been called.
|
||||
// Seeing long delays in some situations, especially over the network.
|
||||
// Seeing delays up to 40 seconds, but not going to ignore changes for that long.
|
||||
await Task.Delay(20000).ConfigureAwait(false);
|
||||
await Task.Delay(1500).ConfigureAwait(false);
|
||||
|
||||
string val;
|
||||
_tempIgnoredPaths.TryRemove(path, out val);
|
||||
|
||||
@@ -905,6 +905,20 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
public async Task ValidateMediaLibraryInternal(IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
_directoryWatchersFactory().Stop();
|
||||
|
||||
try
|
||||
{
|
||||
await PerformLibraryValidation(progress, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_directoryWatchersFactory().Start();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task PerformLibraryValidation(IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.Info("Validating media library");
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
{
|
||||
class RefreshChannelsScheduledTask : IScheduledTask
|
||||
class RefreshChannelsScheduledTask
|
||||
{
|
||||
private readonly ILiveTvManager _liveTvManager;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user