diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-01-08 23:57:27 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-05-06 14:12:43 +0200 |
| commit | ddb04dc12b8bdf33c2020cb1c539664463e61bc3 (patch) | |
| tree | 85df78a91653216062cdd9cf52963baa141242fb /Jellyfin.Api/Helpers/HlsHelpers.cs | |
| parent | 95b1cf532b577aa744d5301af4eeb78d08da3ba8 (diff) | |
Use new ReadAllLines extensions
Diffstat (limited to 'Jellyfin.Api/Helpers/HlsHelpers.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/HlsHelpers.cs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Jellyfin.Api/Helpers/HlsHelpers.cs b/Jellyfin.Api/Helpers/HlsHelpers.cs index 18e23fb5c..d0666034e 100644 --- a/Jellyfin.Api/Helpers/HlsHelpers.cs +++ b/Jellyfin.Api/Helpers/HlsHelpers.cs @@ -118,10 +118,7 @@ namespace Jellyfin.Api.Helpers /// <returns>The playlist text as a string.</returns> public static string GetLivePlaylistText(string path, StreamState state) { - using var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - using var reader = new StreamReader(stream); - - var text = reader.ReadToEnd(); + var text = File.ReadAllText(path); var segmentFormat = EncodingHelper.GetSegmentFileExtension(state.Request.SegmentContainer).TrimStart('.'); if (string.Equals(segmentFormat, "mp4", StringComparison.OrdinalIgnoreCase)) |
