update xmltv parsing

This commit is contained in:
Luke Pulverenti 2017-10-07 02:13:37 -04:00
parent e19b8f81c7
commit 0fbb5ab434

View File

@ -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))