aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/LiveTv
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-10-07 02:16:08 -0400
committerGitHub <noreply@github.com>2017-10-07 02:16:08 -0400
commitb7b1dbed5b28f614d759a3811444dbb8a7dacadc (patch)
treed6d866ce6e3d2ad10ddd32a52157ae280b12753d /Emby.Server.Implementations/LiveTv
parent8eeca98fef6dd314764882b0ea1121361ec11e46 (diff)
parentbe1ed79cf633b5e9d8728ca50fe6e98d514f0ad6 (diff)
Merge pull request #2945 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/LiveTv')
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs5
-rw-r--r--Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs10
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs8
3 files changed, 14 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
index 149f69e5b3..d6f5e0d9fe 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
@@ -272,11 +272,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
private bool EncodeVideo(MediaSourceInfo mediaSource)
{
- if (string.Equals(_liveTvOptions.RecordedVideoCodec, "copy", StringComparison.OrdinalIgnoreCase))
- {
- return false;
- }
-
var mediaStreams = mediaSource.MediaStreams ?? new List<MediaStream>();
return !mediaStreams.Any(i => i.Type == MediaStreamType.Video && string.Equals(i.Codec, "h264", StringComparison.OrdinalIgnoreCase) && !i.IsInterlaced);
}
diff --git a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
index 8ea98879a6..95ec1dee0d 100644
--- a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
+++ b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
@@ -110,7 +110,15 @@ namespace Emby.Server.Implementations.LiveTv.Listings
var tempFolder = Path.Combine(_config.ApplicationPaths.TempDirectory, Guid.NewGuid().ToString());
_fileSystem.CreateDirectory(tempFolder);
- _zipClient.ExtractAllFromGz(stream, tempFolder, true);
+ try
+ {
+ _zipClient.ExtractAllFromGz(stream, tempFolder, true);
+ }
+ catch
+ {
+ // If the extraction fails just return the original file, it could be a gz
+ return file;
+ }
return _fileSystem.GetFiles(tempFolder, true)
.Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase))
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
index bb11dac5f1..cfdaaed101 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
@@ -299,6 +299,8 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
int? videoBitrate = null;
int? audioBitrate = null;
+ var isHd = channelInfo.IsHD ?? true;
+
if (string.Equals(profile, "mobile", StringComparison.OrdinalIgnoreCase))
{
width = 1280;
@@ -350,7 +352,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
else
{
// This is for android tv's 1200 condition. Remove once not needed anymore so that we can avoid possible side effects of dummying up this data
- if ((channelInfo.IsHD ?? true))
+ if (isHd)
{
width = 1920;
height = 1080;
@@ -367,9 +369,9 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
if (!videoBitrate.HasValue)
{
- videoBitrate = (channelInfo.IsHD ?? true) ? 15000000 : 2000000;
+ videoBitrate = isHd ? 15000000 : 2000000;
}
- audioBitrate = (channelInfo.IsHD ?? true) ? 448000 : 192000;
+ audioBitrate = isHd ? 448000 : 192000;
}
// normalize