Make FileSystem readonly
This commit is contained in:
parent
21c2acc520
commit
bba049c987
|
@ -17,7 +17,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
{
|
{
|
||||||
private readonly IStreamHelper _streamHelper;
|
private readonly IStreamHelper _streamHelper;
|
||||||
private ILogger Logger { get; set; }
|
private ILogger Logger { get; set; }
|
||||||
public IFileSystem FileSystem { get; }
|
private readonly IFileSystem _fileSystem;
|
||||||
|
|
||||||
private string RangeHeader { get; set; }
|
private string RangeHeader { get; set; }
|
||||||
private bool IsHeadRequest { get; set; }
|
private bool IsHeadRequest { get; set; }
|
||||||
|
@ -54,10 +54,10 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
}
|
}
|
||||||
|
|
||||||
_streamHelper = streamHelper;
|
_streamHelper = streamHelper;
|
||||||
|
_fileSystem = fileSystem;
|
||||||
|
|
||||||
Path = path;
|
Path = path;
|
||||||
Logger = logger;
|
Logger = logger;
|
||||||
FileSystem = fileSystem;
|
|
||||||
RangeHeader = rangeHeader;
|
RangeHeader = rangeHeader;
|
||||||
|
|
||||||
Headers[HeaderNames.ContentType] = contentType;
|
Headers[HeaderNames.ContentType] = contentType;
|
||||||
|
@ -181,7 +181,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
await response.TransmitFile(path, offset, count, FileShare, FileSystem, _streamHelper, cancellationToken).ConfigureAwait(false);
|
await response.TransmitFile(path, offset, count, FileShare, _fileSystem, _streamHelper, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user