add socket error message
This commit is contained in:
parent
caebcf82c0
commit
e62270df35
|
@ -407,6 +407,11 @@ namespace MediaBrowser.Api
|
|||
{
|
||||
try
|
||||
{
|
||||
if (job.TranscodingThrottler != null)
|
||||
{
|
||||
job.TranscodingThrottler.Stop();
|
||||
}
|
||||
|
||||
Logger.Info("Killing ffmpeg process for {0}", job.Path);
|
||||
|
||||
//process.Kill();
|
||||
|
@ -578,6 +583,8 @@ namespace MediaBrowser.Api
|
|||
public long? TranscodingPositionTicks { get; set; }
|
||||
public long? DownloadPositionTicks { get; set; }
|
||||
|
||||
public TranscodingThrottler TranscodingThrottler { get; set; }
|
||||
|
||||
public void DisposeKillTimer()
|
||||
{
|
||||
if (KillTimer != null)
|
||||
|
|
|
@ -1123,7 +1123,7 @@ namespace MediaBrowser.Api.Playback
|
|||
{
|
||||
if (state.RunTimeTicks.Value >= TimeSpan.FromMinutes(5).Ticks && state.IsInputVideo)
|
||||
{
|
||||
state.TranscodingThrottler = new TranscodingThrottler(transcodingJob, Logger);
|
||||
transcodingJob.TranscodingThrottler = state.TranscodingThrottler = new TranscodingThrottler(transcodingJob, Logger);
|
||||
state.TranscodingThrottler.Start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,6 +139,12 @@ namespace MediaBrowser.Api.Playback
|
|||
return false;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
DisposeTimer();
|
||||
UnpauseTranscoding();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
DisposeTimer();
|
||||
|
|
|
@ -56,7 +56,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp
|
|||
|
||||
void socket_OnError(object sender, SocketHttpListener.ErrorEventArgs e)
|
||||
{
|
||||
EventHelper.FireEventIfNotNull(Closed, this, EventArgs.Empty, _logger);
|
||||
_logger.Error("Error in SharpWebSocket: {0}", e.Message ?? string.Empty);
|
||||
//EventHelper.FireEventIfNotNull(Closed, this, EventArgs.Empty, _logger);
|
||||
}
|
||||
|
||||
void socket_OnClose(object sender, SocketHttpListener.CloseEventArgs e)
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||
{
|
||||
get
|
||||
{
|
||||
return _isActive;
|
||||
return HasOpenSockets;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MediaBrowser.Server.Implementations.UserViews
|
|||
|
||||
public Stream BuildThumbCollage(IEnumerable<string> paths, string text, int width, int height)
|
||||
{
|
||||
using (var wand = BuildThumbCollageWandWithText(paths, text, width, height))
|
||||
using (var wand = BuildThumbCollageWand(paths, width, height))
|
||||
{
|
||||
return DynamicImageHelpers.GetStream(wand, _appPaths);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user