Merge pull request #2219 from Bond-009/subtitle

Fix JSON subtitle writer
This commit is contained in:
dkanada 2020-01-06 14:43:07 +09:00 committed by GitHub
commit f48269a319
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
using (var writer = new Utf8JsonWriter(stream))
{
var trackevents = info.TrackEvents;
writer.WriteStartObject();
writer.WriteStartArray("TrackEvents");
for (int i = 0; i < trackevents.Count; i++)
@ -33,7 +34,10 @@ namespace MediaBrowser.MediaEncoding.Subtitles
writer.WriteEndObject();
}
writer.WriteEndArray();
writer.WriteEndObject();
writer.Flush();
}
}
}