Explorar o código

Use 'await using Stream' instead of 'using Stream'

David %!s(int64=5) %!d(string=hai) anos
pai
achega
fcbae95d19
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Jellyfin.Api/Controllers/SubtitleController.cs

+ 1 - 1
Jellyfin.Api/Controllers/SubtitleController.cs

@@ -217,7 +217,7 @@ namespace Jellyfin.Api.Controllers
 
             if (string.Equals(format, "vtt", StringComparison.OrdinalIgnoreCase) && addVttTimeMap)
             {
-                using var stream = await EncodeSubtitles(id, mediaSourceId, index, format, startPositionTicks, endPositionTicks, copyTimestamps).ConfigureAwait(false);
+                await using Stream stream = await EncodeSubtitles(id, mediaSourceId, index, format, startPositionTicks, endPositionTicks, copyTimestamps).ConfigureAwait(false);
                 using var reader = new StreamReader(stream);
 
                 var text = await reader.ReadToEndAsync().ConfigureAwait(false);