mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 00:35:26 +03:00
Async stream handling: Use interface instead of Func<Stream,Task>
No functional changes
This commit is contained in:
@@ -704,9 +704,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
throw error;
|
||||
}
|
||||
|
||||
public object GetAsyncStreamWriter(Func<Stream, Task> streamWriter, IDictionary<string, string> responseHeaders = null)
|
||||
public object GetAsyncStreamWriter(IAsyncStreamSource streamSource)
|
||||
{
|
||||
return new AsyncStreamWriterFunc(streamWriter, responseHeaders);
|
||||
if (streamSource as IHttpResult != null)
|
||||
{
|
||||
return new AsyncStreamWriterEx(streamSource);
|
||||
}
|
||||
|
||||
return new AsyncStreamWriter(streamSource);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user