aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-07 02:13:37 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-07 02:13:37 -0400
commit0fbb5ab4346cdf62e7cde7e216ba4d998b0582e8 (patch)
treeb963ee01190b7063098f9c501db9feb0c81c8089
parente19b8f81c7c9273edaa48c80588b83d8ecffc2f7 (diff)
update xmltv parsing
-rw-r--r--Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
index 8ea98879a..95ec1dee0 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))