commit
2906764298
|
@ -282,11 +282,6 @@ namespace Emby.Server.Core.IO
|
|||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
private void StartWatchingPath(string path)
|
||||
{
|
||||
// Creating a FileSystemWatcher over the LAN can take hundreds of milliseconds, so wrap it in a Task to do them all in parallel
|
||||
Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!_fileSystem.DirectoryExists(path))
|
||||
{
|
||||
|
@ -295,6 +290,17 @@ namespace Emby.Server.Core.IO
|
|||
return;
|
||||
}
|
||||
|
||||
// Already being watched
|
||||
if (_fileSystemWatchers.ContainsKey(path))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Creating a FileSystemWatcher over the LAN can take hundreds of milliseconds, so wrap it in a Task to do them all in parallel
|
||||
Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var newWatcher = new FileSystemWatcher(path, "*")
|
||||
{
|
||||
IncludeSubdirectories = true
|
||||
|
@ -326,7 +332,6 @@ namespace Emby.Server.Core.IO
|
|||
}
|
||||
else
|
||||
{
|
||||
Logger.Info("Unable to add directory watcher for {0}. It already exists in the dictionary.", path);
|
||||
newWatcher.Dispose();
|
||||
}
|
||||
|
||||
|
|
|
@ -2112,7 +2112,7 @@ namespace Emby.Server.Implementations.LiveTv
|
|||
|
||||
if (timer == null)
|
||||
{
|
||||
throw new ResourceNotFoundException(string.Format("Timer with Id {0} not found", id));
|
||||
throw new ResourceNotFoundException(string.Format("SeriesTimer with Id {0} not found", id));
|
||||
}
|
||||
|
||||
var service = GetService(timer.ServiceName);
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
throw;
|
||||
}
|
||||
|
||||
var waitForSegments = state.SegmentLength >= 10 ? 2 : 2;
|
||||
var waitForSegments = state.SegmentLength >= 10 ? 2 : 3;
|
||||
await WaitForMinimumSegmentCount(playlist, waitForSegments, cancellationTokenSource.Token).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user