diff options
| author | Anthony Lavado <anthony@lavado.ca> | 2020-08-08 13:22:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-08 13:22:36 -0400 |
| commit | b9fdbaeef326a06ba824cbb78a91f58afc535aab (patch) | |
| tree | 915b3f9e787cde081af88465bf9c3f20228be3f3 /MediaBrowser.Api/Playback/StaticRemoteStreamWriter.cs | |
| parent | 7e49358ba9c1fcf12f9e7b30601a9df568a65242 (diff) | |
| parent | a15be774ac606ec71f3ab0849a56ae08b8cc2f4d (diff) | |
Merge pull request #3812 from jellyfin/api-migration
Merge API Migration into master
Diffstat (limited to 'MediaBrowser.Api/Playback/StaticRemoteStreamWriter.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/StaticRemoteStreamWriter.cs | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/MediaBrowser.Api/Playback/StaticRemoteStreamWriter.cs b/MediaBrowser.Api/Playback/StaticRemoteStreamWriter.cs deleted file mode 100644 index 7e2e337ad..000000000 --- a/MediaBrowser.Api/Playback/StaticRemoteStreamWriter.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using MediaBrowser.Common.Net; -using MediaBrowser.Model.Services; - -namespace MediaBrowser.Api.Playback -{ - /// <summary> - /// Class StaticRemoteStreamWriter. - /// </summary> - public class StaticRemoteStreamWriter : IAsyncStreamWriter, IHasHeaders - { - /// <summary> - /// The _input stream. - /// </summary> - private readonly HttpResponseInfo _response; - - /// <summary> - /// The _options. - /// </summary> - private readonly IDictionary<string, string> _options = new Dictionary<string, string>(); - - public StaticRemoteStreamWriter(HttpResponseInfo response) - { - _response = response; - } - - /// <summary> - /// Gets the options. - /// </summary> - /// <value>The options.</value> - public IDictionary<string, string> Headers => _options; - - public async Task WriteToAsync(Stream responseStream, CancellationToken cancellationToken) - { - using (_response) - { - await _response.Content.CopyToAsync(responseStream, 81920, cancellationToken).ConfigureAwait(false); - } - } - } -} |
