mirror of https://github.com/jellyfin/jellyfin.git
add IsRemote property
This commit is contained in:
parent
fe1630aec4
commit
8d668095bb
|
@ -3617,10 +3617,12 @@ namespace Emby.Server.Implementations.Data
|
||||||
var index = 0;
|
var index = 0;
|
||||||
foreach (var type in query.TrailerTypes)
|
foreach (var type in query.TrailerTypes)
|
||||||
{
|
{
|
||||||
clauses.Add("TrailerTypes like @TrailerTypes" + index);
|
var paramName = "@TrailerTypes" + index;
|
||||||
|
|
||||||
|
clauses.Add("TrailerTypes like " + paramName);
|
||||||
if (statement != null)
|
if (statement != null)
|
||||||
{
|
{
|
||||||
statement.TryBind("@TrailerTypes" + index, "%" + type + "%");
|
statement.TryBind(paramName, "%" + type + "%");
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,14 +240,49 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_logger.Info("Killing ffmpeg recording process for {0}", _targetPath);
|
_logger.Info("Stopping ffmpeg recording process for {0}", _targetPath);
|
||||||
|
|
||||||
//process.Kill();
|
//process.Kill();
|
||||||
_process.StandardInput.WriteLine("q");
|
_process.StandardInput.WriteLine("q");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.ErrorException("Error killing transcoding job for {0}", ex, _targetPath);
|
_logger.ErrorException("Error stopping recording transcoding job for {0}", ex, _targetPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_hasExited)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_logger.Info("Calling recording process.WaitForExit for {0}", _targetPath);
|
||||||
|
|
||||||
|
if (_process.WaitForExit(5000))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.ErrorException("Error waiting for recording process to exit for {0}", ex, _targetPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_hasExited)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_logger.Info("Killing ffmpeg recording process for {0}", _targetPath);
|
||||||
|
|
||||||
|
_process.Kill();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.ErrorException("Error killing recording transcoding job for {0}", ex, _targetPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,8 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||||
|
|
||||||
Id = channel.Path.GetMD5().ToString("N"),
|
Id = channel.Path.GetMD5().ToString("N"),
|
||||||
IsInfiniteStream = true,
|
IsInfiniteStream = true,
|
||||||
SupportsDirectStream = false
|
SupportsDirectStream = false,
|
||||||
|
IsRemote = true
|
||||||
};
|
};
|
||||||
|
|
||||||
return new List<MediaSourceInfo> { mediaSource };
|
return new List<MediaSourceInfo> { mediaSource };
|
||||||
|
|
|
@ -68,7 +68,8 @@ namespace MediaBrowser.Controller.Channels
|
||||||
Id = id,
|
Id = id,
|
||||||
ReadAtNativeFramerate = ReadAtNativeFramerate,
|
ReadAtNativeFramerate = ReadAtNativeFramerate,
|
||||||
SupportsDirectStream = false,
|
SupportsDirectStream = false,
|
||||||
SupportsDirectPlay = SupportsDirectPlay
|
SupportsDirectPlay = SupportsDirectPlay,
|
||||||
|
IsRemote = true
|
||||||
};
|
};
|
||||||
|
|
||||||
var bitrate = (AudioBitrate ?? 0) + (VideoBitrate ?? 0);
|
var bitrate = (AudioBitrate ?? 0) + (VideoBitrate ?? 0);
|
||||||
|
|
|
@ -1250,8 +1250,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
lock (_runningProcesses)
|
lock (_runningProcesses)
|
||||||
{
|
{
|
||||||
proceses = _runningProcesses.ToList();
|
proceses = _runningProcesses.ToList();
|
||||||
}
|
|
||||||
_runningProcesses.Clear();
|
_runningProcesses.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var process in proceses)
|
foreach (var process in proceses)
|
||||||
{
|
{
|
||||||
|
@ -1321,16 +1321,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (_mediaEncoder._runningProcesses)
|
|
||||||
{
|
|
||||||
_mediaEncoder._runningProcesses.Remove(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
DisposeProcess(process);
|
DisposeProcess(process);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DisposeProcess(IProcess process)
|
private void DisposeProcess(IProcess process)
|
||||||
{
|
{
|
||||||
|
lock (_mediaEncoder._runningProcesses)
|
||||||
|
{
|
||||||
|
_mediaEncoder._runningProcesses.Remove(this);
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
process.Dispose();
|
process.Dispose();
|
||||||
|
|
|
@ -21,6 +21,11 @@ namespace MediaBrowser.Model.Dto
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Differentiate internet url vs local network
|
||||||
|
/// </summary>
|
||||||
|
public bool IsRemote { get; set; }
|
||||||
|
|
||||||
public string ETag { get; set; }
|
public string ETag { get; set; }
|
||||||
public long? RunTimeTicks { get; set; }
|
public long? RunTimeTicks { get; set; }
|
||||||
public bool ReadAtNativeFramerate { get; set; }
|
public bool ReadAtNativeFramerate { get; set; }
|
||||||
|
|
|
@ -92,6 +92,11 @@ namespace MediaBrowser.Model.Entities
|
||||||
{
|
{
|
||||||
attributes.Add(StringHelper.FirstToUpper(Language));
|
attributes.Add(StringHelper.FirstToUpper(Language));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
attributes.Add("Und");
|
||||||
|
}
|
||||||
|
|
||||||
if (IsDefault)
|
if (IsDefault)
|
||||||
{
|
{
|
||||||
attributes.Add("Default");
|
attributes.Add("Default");
|
||||||
|
|
Loading…
Reference in New Issue