aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/FileWriter.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-03-13 15:01:49 -0400
committerGitHub <noreply@github.com>2017-03-13 15:01:49 -0400
commitafb4a08bfe94da3b29d6f962665f93824e94f203 (patch)
treecf21a536f930f54e3847bf243afb130276c3097c /Emby.Server.Implementations/HttpServer/FileWriter.cs
parent7ae1de52b45267e399b6cbbaa423665bb006bf79 (diff)
parenta9b61af1549770b5a3c613c6b552f8bb698e9870 (diff)
Merge pull request #2525 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/FileWriter.cs')
-rw-r--r--Emby.Server.Implementations/HttpServer/FileWriter.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/HttpServer/FileWriter.cs b/Emby.Server.Implementations/HttpServer/FileWriter.cs
index b80a40962..d230a9b91 100644
--- a/Emby.Server.Implementations/HttpServer/FileWriter.cs
+++ b/Emby.Server.Implementations/HttpServer/FileWriter.cs
@@ -27,6 +27,8 @@ namespace Emby.Server.Implementations.HttpServer
private static readonly CultureInfo UsCulture = new CultureInfo("en-US");
public List<Cookie> Cookies { get; private set; }
+ public FileShareMode FileShare { get; set; }
+
/// <summary>
/// The _options
/// </summary>
@@ -69,6 +71,7 @@ namespace Emby.Server.Implementations.HttpServer
SetRangeValues();
}
+ FileShare = FileShareMode.Read;
Cookies = new List<Cookie>();
}
@@ -153,11 +156,11 @@ namespace Emby.Server.Implementations.HttpServer
if (string.IsNullOrWhiteSpace(RangeHeader) || (RangeStart <= 0 && RangeEnd >= TotalContentLength - 1))
{
Logger.Info("Transmit file {0}", Path);
- await response.TransmitFile(Path, 0, 0, cancellationToken).ConfigureAwait(false);
+ await response.TransmitFile(Path, 0, 0, FileShare, cancellationToken).ConfigureAwait(false);
return;
}
- await response.TransmitFile(Path, RangeStart, RangeEnd, cancellationToken).ConfigureAwait(false);
+ await response.TransmitFile(Path, RangeStart, RangeEnd, FileShare, cancellationToken).ConfigureAwait(false);
}
finally
{