mirror of https://github.com/jellyfin/jellyfin.git
combine movie fixes
This commit is contained in:
parent
0fb581cfbb
commit
74adff0d8d
|
@ -5,7 +5,6 @@ using MediaBrowser.Controller.Configuration;
|
|||
using MediaBrowser.Controller.Devices;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Controller.Net;
|
||||
using MediaBrowser.Model.IO;
|
||||
|
@ -518,25 +517,14 @@ namespace MediaBrowser.Api.Playback.Dash
|
|||
|
||||
private async Task WaitForSegment(string playlist, string segment, CancellationToken cancellationToken)
|
||||
{
|
||||
var tmpPath = playlist + ".tmp";
|
||||
|
||||
var segmentFilename = Path.GetFileName(segment);
|
||||
|
||||
Logger.Debug("Waiting for {0} in {1}", segmentFilename, playlist);
|
||||
|
||||
while (true)
|
||||
{
|
||||
FileStream fileStream;
|
||||
try
|
||||
{
|
||||
fileStream = FileSystem.GetFileStream(tmpPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, true);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
fileStream = FileSystem.GetFileStream(playlist, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, true);
|
||||
}
|
||||
// Need to use FileShare.ReadWrite because we're reading the file at the same time it's being written
|
||||
using (fileStream)
|
||||
using (var fileStream = GetPlaylistFileStream(playlist))
|
||||
{
|
||||
using (var reader = new StreamReader(fileStream))
|
||||
{
|
||||
|
|
|
@ -186,7 +186,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
while (true)
|
||||
{
|
||||
// Need to use FileShare.ReadWrite because we're reading the file at the same time it's being written
|
||||
using (var fileStream = FileSystem.GetFileStream(playlist, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, true))
|
||||
using (var fileStream = GetPlaylistFileStream(playlist))
|
||||
{
|
||||
using (var reader = new StreamReader(fileStream))
|
||||
{
|
||||
|
@ -212,6 +212,20 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
}
|
||||
}
|
||||
|
||||
protected Stream GetPlaylistFileStream(string path)
|
||||
{
|
||||
var tmpPath = path + ".tmp";
|
||||
|
||||
try
|
||||
{
|
||||
return FileSystem.GetFileStream(tmpPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, true);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
return FileSystem.GetFileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, true);
|
||||
}
|
||||
}
|
||||
|
||||
protected override string GetCommandLineArguments(string outputPath, StreamState state, bool isEncoding)
|
||||
{
|
||||
var hlsVideoRequest = state.VideoRequest as GetHlsVideoStream;
|
||||
|
|
|
@ -4,7 +4,6 @@ using MediaBrowser.Controller.Configuration;
|
|||
using MediaBrowser.Controller.Devices;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Controller.Net;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
|
@ -300,7 +299,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
|
||||
var segmentFilename = Path.GetFileName(segmentPath);
|
||||
|
||||
using (var fileStream = FileSystem.GetFileStream(playlistPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, true))
|
||||
using (var fileStream = GetPlaylistFileStream(playlistPath))
|
||||
{
|
||||
using (var reader = new StreamReader(fileStream))
|
||||
{
|
||||
|
|
|
@ -168,6 +168,7 @@
|
|||
"MessageNothingHere": "Nothing here.",
|
||||
"MessagePleaseEnsureInternetMetadata": "Please ensure downloading of internet metadata is enabled.",
|
||||
"TabSuggested": "Suggested",
|
||||
"TabSuggestions": "Suggestions",
|
||||
"TabLatest": "Latest",
|
||||
"TabUpcoming": "Upcoming",
|
||||
"TabShows": "Shows",
|
||||
|
|
|
@ -451,7 +451,6 @@ namespace MediaBrowser.WebDashboard.Api
|
|||
"moviegenres.js",
|
||||
"moviecollections.js",
|
||||
"movies.js",
|
||||
"movieslatest.js",
|
||||
"moviepeople.js",
|
||||
"moviesrecommended.js",
|
||||
"moviestudios.js",
|
||||
|
|
|
@ -556,9 +556,6 @@
|
|||
<Content Include="dashboard-ui\metadatasubtitles.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\movieslatest.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\musicalbumartists.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
@ -889,9 +886,6 @@
|
|||
<Content Include="dashboard-ui\scripts\metadatasubtitles.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\movieslatest.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\musicalbumartists.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
Loading…
Reference in New Issue