aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/ApiEntryPoint.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/ApiEntryPoint.cs')
-rw-r--r--MediaBrowser.Api/ApiEntryPoint.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index 018d8a92e..785cc395c 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -29,12 +29,16 @@ namespace MediaBrowser.Api
/// <value>The logger.</value>
private ILogger Logger { get; set; }
+ /// <summary>
+ /// The application paths
+ /// </summary>
private readonly IServerApplicationPaths AppPaths;
-
+
/// <summary>
/// Initializes a new instance of the <see cref="ApiEntryPoint" /> class.
/// </summary>
/// <param name="logger">The logger.</param>
+ /// <param name="appPaths">The application paths.</param>
public ApiEntryPoint(ILogger logger, IServerApplicationPaths appPaths)
{
Logger = logger;
@@ -52,6 +56,10 @@ namespace MediaBrowser.Api
{
DeleteEncodedMediaCache();
}
+ catch (DirectoryNotFoundException)
+ {
+ // Don't clutter the log
+ }
catch (IOException ex)
{
Logger.ErrorException("Error deleting encoded media cache", ex);
@@ -88,7 +96,7 @@ namespace MediaBrowser.Api
{
var jobCount = _activeTranscodingJobs.Count;
- Parallel.ForEach(_activeTranscodingJobs, KillTranscodingJob);
+ Parallel.ForEach(_activeTranscodingJobs.ToList(), KillTranscodingJob);
// Try to allow for some time to kill the ffmpeg processes and delete the partial stream files
if (jobCount > 0)