aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-01-20 12:53:48 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-01-20 12:53:48 -0500
commit8d668095bb663c51083b97eb61b09811cb97575b (patch)
tree9af9be874268835f37a4a367eae7b31fe99ab95a /Emby.Server.Implementations
parentfe1630aec43fca7b1450659704269e0cc6f3cb40 (diff)
add IsRemote property
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/Data/SqliteItemRepository.cs6
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs39
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs3
3 files changed, 43 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 5809d84fd..af1594cf7 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -3617,10 +3617,12 @@ namespace Emby.Server.Implementations.Data
var index = 0;
foreach (var type in query.TrailerTypes)
{
- clauses.Add("TrailerTypes like @TrailerTypes" + index);
+ var paramName = "@TrailerTypes" + index;
+
+ clauses.Add("TrailerTypes like " + paramName);
if (statement != null)
{
- statement.TryBind("@TrailerTypes" + index, "%" + type + "%");
+ statement.TryBind(paramName, "%" + type + "%");
}
index++;
}
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
index 5e55b893f..beb08cc25 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
@@ -240,14 +240,49 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
try
{
- _logger.Info("Killing ffmpeg recording process for {0}", _targetPath);
+ _logger.Info("Stopping ffmpeg recording process for {0}", _targetPath);
//process.Kill();
_process.StandardInput.WriteLine("q");
}
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);
}
}
}
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
index 7954b86ba..449a4104f 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
@@ -160,7 +160,8 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
Id = channel.Path.GetMD5().ToString("N"),
IsInfiniteStream = true,
- SupportsDirectStream = false
+ SupportsDirectStream = false,
+ IsRemote = true
};
return new List<MediaSourceInfo> { mediaSource };