aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/HttpServer/HttpListenerHost.cs13
-rw-r--r--Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs10
-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
5 files changed, 26 insertions, 20 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
index 737d4ceea..1d3d4f1e5 100644
--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -725,12 +725,13 @@ namespace Emby.Server.Implementations.HttpServer
Summary = route.Summary
});
- //routes.Add(new RouteAttribute(DoubleNormalizeEmbyRoutePath(route.Path), route.Verbs)
- //{
- // Notes = route.Notes,
- // Priority = route.Priority,
- // Summary = route.Summary
- //});
+ // needed because apps add /emby, and some users also add /emby, thereby double prefixing
+ routes.Add(new RouteAttribute(DoubleNormalizeEmbyRoutePath(route.Path), route.Verbs)
+ {
+ Notes = route.Notes,
+ Priority = route.Priority,
+ Summary = route.Summary
+ });
}
return routes.ToArray(routes.Count);
diff --git a/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs
index 4852c3c6a..7aa4c299f 100644
--- a/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs
@@ -12,7 +12,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Books
/// </summary>
public class BookResolver : MediaBrowser.Controller.Resolvers.ItemResolver<Book>
{
- private readonly string[] _validExtensions = {".pdf", ".epub", ".mobi", ".cbr", ".cbz"};
+ private readonly string[] _validExtensions = { ".pdf", ".epub", ".mobi", ".cbr", ".cbz", ".azw3" };
/// <summary>
///
@@ -26,7 +26,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Books
// Only process items that are in a collection folder containing books
if (!string.Equals(collectionType, CollectionType.Books, StringComparison.OrdinalIgnoreCase))
return null;
-
+
if (args.IsDirectory)
{
return GetBook(args);
@@ -69,9 +69,9 @@ namespace Emby.Server.Implementations.Library.Resolvers.Books
return null;
return new Book
- {
- Path = bookFiles[0].FullName
- };
+ {
+ Path = bookFiles[0].FullName
+ };
}
}
}
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
index 149f69e5b..d6f5e0d9f 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 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))
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
index bb11dac5f..cfdaaed10 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