Compare commits

..

13 Commits

Author SHA1 Message Date
Joshua M. Boniface
dbbf97e588 Fix version in spec 2020-04-13 00:24:43 -04:00
Joshua M. Boniface
4e9df69ffd Merge pull request #2847 from mark-monteiro/fix-build
Fix compilation error in HttpListenerHost
2020-04-12 21:35:43 -04:00
Mark Monteiro
7f38ef4c3c Fix compilation error in HttpListenerHost 2020-04-12 20:49:54 -04:00
Joshua M. Boniface
16549dead9 Bump version to 10.5.4 2020-04-12 19:24:56 -04:00
Joshua M. Boniface
9bd1a9d19c Merge pull request #2715 from nyanmisaka/libfdk-aac
Prefer to use libfdk_aac encoder for better audio quality when it is available

(cherry picked from commit bf92694f8b)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
2020-04-12 19:19:00 -04:00
Joshua M. Boniface
67194994f9 Merge pull request #2783 from JustAMan/better-cancel-msg
Add logging of URL being processed when logging an error

(cherry picked from commit 2be6550db4)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
2020-04-12 19:18:22 -04:00
Vasily
c249e15f48 Merge pull request #2782 from JustAMan/fix-ssa-delivery
Fix support for attachments with baseURL set

(cherry picked from commit 6386b9b1b9)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
2020-04-12 16:51:11 -04:00
Anthony Lavado
48ba5a9a30 Merge pull request #2779 from KristupasSavickas/fix-docker-arm-ffmpeg-path
Fix ffmpeg path on ARM docker image

(cherry picked from commit 6d98c0b62a)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
2020-04-12 16:50:27 -04:00
Bond-009
dd13f8d16a Merge pull request #2821 from nyanmisaka/mpeg4
Fix MPEG4 broken on VAAPI

(cherry picked from commit 84dba64644)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
2020-04-12 15:53:12 -04:00
dkanada
b43a8a56dc Merge pull request #2796 from JustAMan/fix-transcode-reasons
Make codec check in profile examine profile type first

(cherry picked from commit aeedd06f51)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
2020-04-12 15:52:39 -04:00
Bond-009
3ec18f085e Merge pull request #2785 from nyanmisaka/mpge4-profile15
Fix MPEG4 packback error regression on vaapi

(cherry picked from commit b16b58bc57)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
2020-04-12 15:51:47 -04:00
dkanada
f2728b5a92 Merge pull request #2758 from Bond-009/plugininstalled
Remove PluginInstalled

(cherry picked from commit 0cd7cd611e)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
2020-04-12 15:50:09 -04:00
Bond-009
ee47a75f9f Merge pull request #2721 from PrplHaz4/patch-2
Separate Channels permissions from All Libraries

(cherry picked from commit 3a98ad8255)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
2020-04-12 15:49:32 -04:00
15 changed files with 63 additions and 96 deletions

View File

@@ -127,6 +127,7 @@
- [xosdy](https://github.com/xosdy)
- [XVicarious](https://github.com/XVicarious)
- [YouKnowBlom](https://github.com/YouKnowBlom)
- [KristupasSavickas](https://github.com/KristupasSavickas)
# Emby Contributors

View File

@@ -2,7 +2,7 @@ ARG DOTNET_VERSION=3.1
ARG FFMPEG_VERSION=latest
FROM node:alpine as web-builder
ARG JELLYFIN_WEB_VERSION=10.5.3
ARG JELLYFIN_WEB_VERSION=10.5.4
RUN apk add curl git \
&& git clone --branch release-10.5.z --single-branch https://github.com/jellyfin/jellyfin-web.git \
&& cd jellyfin-web \

View File

@@ -6,7 +6,7 @@ ARG DOTNET_VERSION=3.1
FROM node:alpine as web-builder
ARG JELLYFIN_WEB_VERSION=10.5.3
ARG JELLYFIN_WEB_VERSION=10.5.4
RUN apk add curl git \
&& git clone --branch release-10.5.z --single-branch https://github.com/jellyfin/jellyfin-web.git \
&& cd jellyfin-web \
@@ -70,4 +70,4 @@ VOLUME /cache /config /media
ENTRYPOINT ["./jellyfin/jellyfin", \
"--datadir", "/config", \
"--cachedir", "/cache", \
"--ffmpeg", "/usr/lib/jellyfin-ffmpeg"]
"--ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"]

View File

@@ -6,7 +6,7 @@ ARG DOTNET_VERSION=3.1
FROM node:alpine as web-builder
ARG JELLYFIN_WEB_VERSION=10.5.3
ARG JELLYFIN_WEB_VERSION=10.5.4
RUN apk add curl git \
&& git clone --branch release-10.5.z --single-branch https://github.com/jellyfin/jellyfin-web.git \
&& cd jellyfin-web \

View File

@@ -1016,48 +1016,12 @@ namespace Emby.Server.Implementations
AuthenticatedAttribute.AuthService = AuthService;
}
private async void PluginInstalled(object sender, GenericEventArgs<PackageVersionInfo> args)
{
string dir = Path.Combine(ApplicationPaths.PluginsPath, args.Argument.name);
var types = Directory.EnumerateFiles(dir, "*.dll", SearchOption.AllDirectories)
.Select(Assembly.LoadFrom)
.SelectMany(x => x.ExportedTypes)
.Where(x => x.IsClass && !x.IsAbstract && !x.IsInterface && !x.IsGenericType)
.ToArray();
int oldLen = _allConcreteTypes.Length;
Array.Resize(ref _allConcreteTypes, oldLen + types.Length);
types.CopyTo(_allConcreteTypes, oldLen);
var plugins = types.Where(x => x.IsAssignableFrom(typeof(IPlugin)))
.Select(CreateInstanceSafe)
.Where(x => x != null)
.Cast<IPlugin>()
.Select(LoadPlugin)
.Where(x => x != null)
.ToArray();
oldLen = _plugins.Length;
Array.Resize(ref _plugins, oldLen + plugins.Length);
plugins.CopyTo(_plugins, oldLen);
var entries = types.Where(x => x.IsAssignableFrom(typeof(IServerEntryPoint)))
.Select(CreateInstanceSafe)
.Where(x => x != null)
.Cast<IServerEntryPoint>()
.ToList();
await Task.WhenAll(StartEntryPoints(entries, true)).ConfigureAwait(false);
await Task.WhenAll(StartEntryPoints(entries, false)).ConfigureAwait(false);
}
/// <summary>
/// Finds the parts.
/// </summary>
public void FindParts()
{
InstallationManager = ServiceProvider.GetService<IInstallationManager>();
InstallationManager.PluginInstalled += PluginInstalled;
if (!ServerConfigurationManager.Configuration.IsPortAuthorized)
{

View File

@@ -223,7 +223,7 @@ namespace Emby.Server.Implementations.HttpServer
}
}
private async Task ErrorHandler(Exception ex, IRequest httpReq, bool logExceptionStackTrace)
private async Task ErrorHandler(Exception ex, IRequest httpReq, bool logExceptionStackTrace, string urlToLog)
{
try
{
@@ -231,11 +231,11 @@ namespace Emby.Server.Implementations.HttpServer
if (logExceptionStackTrace)
{
_logger.LogError(ex, "Error processing request");
_logger.LogError(ex, "Error processing request. URL: {Url}", urlToLog);
}
else
{
_logger.LogError("Error processing request: {Message}", ex.Message);
_logger.LogError("Error processing request: {Message}. URL: {Url}", ex.Message.TrimEnd('.'), urlToLog);
}
var httpRes = httpReq.Response;
@@ -255,7 +255,7 @@ namespace Emby.Server.Implementations.HttpServer
}
catch (Exception errorEx)
{
_logger.LogError(errorEx, "Error this.ProcessRequest(context)(Exception while writing error to the response)");
_logger.LogError(errorEx, "Error this.ProcessRequest(context)(Exception while writing error to the response). URL: {Url}", urlToLog);
}
}
@@ -440,7 +440,7 @@ namespace Emby.Server.Implementations.HttpServer
var stopWatch = new Stopwatch();
stopWatch.Start();
var httpRes = httpReq.Response;
string urlToLog = null;
string urlToLog = GetUrlToLog(urlString);
string remoteIp = httpReq.RemoteIp;
try
@@ -486,8 +486,6 @@ namespace Emby.Server.Implementations.HttpServer
return;
}
urlToLog = GetUrlToLog(urlString);
if (string.Equals(localPath, _baseUrlPrefix + "/", StringComparison.OrdinalIgnoreCase)
|| string.Equals(localPath, _baseUrlPrefix, StringComparison.OrdinalIgnoreCase)
|| string.Equals(localPath, "/", StringComparison.OrdinalIgnoreCase)
@@ -519,22 +517,21 @@ namespace Emby.Server.Implementations.HttpServer
}
else
{
await ErrorHandler(new FileNotFoundException(), httpReq, false).ConfigureAwait(false);
await ErrorHandler(new FileNotFoundException(), httpReq, false, urlToLog).ConfigureAwait(false);
}
}
catch (Exception ex) when (ex is SocketException || ex is IOException || ex is OperationCanceledException)
{
await ErrorHandler(ex, httpReq, false).ConfigureAwait(false);
await ErrorHandler(ex, httpReq, false, urlToLog).ConfigureAwait(false);
}
catch (SecurityException ex)
{
await ErrorHandler(ex, httpReq, false).ConfigureAwait(false);
await ErrorHandler(ex, httpReq, false, urlToLog).ConfigureAwait(false);
}
catch (Exception ex)
{
var logException = !string.Equals(ex.GetType().Name, "SocketException", StringComparison.OrdinalIgnoreCase);
await ErrorHandler(ex, httpReq, logException).ConfigureAwait(false);
await ErrorHandler(ex, httpReq, logException, urlToLog).ConfigureAwait(false);
}
finally
{

View File

@@ -573,8 +573,7 @@ namespace MediaBrowser.Api.Playback
{
attachment.DeliveryUrl = string.Format(
CultureInfo.InvariantCulture,
"{0}/Videos/{1}/{2}/Attachments/{3}",
ServerConfigurationManager.Configuration.BaseUrl,
"/Videos/{0}/{1}/Attachments/{2}",
item.Id,
mediaSource.Id,
attachment.Index);

View File

@@ -213,7 +213,10 @@ namespace MediaBrowser.Api.UserLibrary
request.IncludeItemTypes = "Playlist";
}
bool isInEnabledFolder = user.Policy.EnabledFolders.Any(i => new Guid(i) == item.Id);
bool isInEnabledFolder = user.Policy.EnabledFolders.Any(i => new Guid(i) == item.Id)
// Assume all folders inside an EnabledChannel are enabled
|| user.Policy.EnabledChannels.Any(i => new Guid(i) == item.Id);
var collectionFolders = _libraryManager.GetCollectionFolders(item);
foreach (var collectionFolder in collectionFolders)
{
@@ -225,7 +228,7 @@ namespace MediaBrowser.Api.UserLibrary
}
}
if (!(item is UserRootFolder) && !user.Policy.EnableAllFolders && !isInEnabledFolder)
if (!(item is UserRootFolder) && !user.Policy.EnableAllFolders && !isInEnabledFolder && !user.Policy.EnableAllChannels)
{
Logger.LogWarning("{UserName} is not permitted to access Library {ItemName}.", user.Name, item.Name);
return new QueryResult<BaseItem>

View File

@@ -78,8 +78,7 @@ namespace MediaBrowser.Controller.MediaEncoding
if (!string.IsNullOrEmpty(hwType)
&& encodingOptions.EnableHardwareEncoding
&& codecMap.ContainsKey(hwType)
&& CheckVaapi(state, hwType, encodingOptions))
&& codecMap.ContainsKey(hwType))
{
var preferredEncoder = codecMap[hwType];
@@ -93,23 +92,6 @@ namespace MediaBrowser.Controller.MediaEncoding
return defaultEncoder;
}
private bool CheckVaapi(EncodingJobInfo state, string hwType, EncodingOptions encodingOptions)
{
if (!string.Equals(hwType, "vaapi", StringComparison.OrdinalIgnoreCase))
{
// No vaapi requested, return OK.
return true;
}
if (string.IsNullOrEmpty(encodingOptions.VaapiDevice))
{
// No device specified, return OK.
return true;
}
return IsVaapiSupported(state);
}
private bool IsVaapiSupported(EncodingJobInfo state)
{
var videoStream = state.VideoStream;
@@ -424,7 +406,13 @@ namespace MediaBrowser.Controller.MediaEncoding
if (string.Equals(codec, "aac", StringComparison.OrdinalIgnoreCase))
{
return "aac -strict experimental";
// Use libfdk_aac for better audio quality if using custom build of FFmpeg which has fdk_aac support
if (_mediaEncoder.SupportsEncoder("libfdk_aac"))
{
return "libfdk_aac";
}
return "aac";
}
if (string.Equals(codec, "mp3", StringComparison.OrdinalIgnoreCase))
@@ -1605,7 +1593,7 @@ namespace MediaBrowser.Controller.MediaEncoding
// For VAAPI and CUVID decoder
// these encoders cannot automatically adjust the size of graphical subtitles to fit the output video,
// thus needs to be manually adjusted.
if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase)
if ((IsVaapiSupported(state) && string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase))
|| (videoDecoder ?? string.Empty).IndexOf("cuvid", StringComparison.OrdinalIgnoreCase) != -1)
{
var videoStream = state.VideoStream;
@@ -1636,7 +1624,7 @@ namespace MediaBrowser.Controller.MediaEncoding
var retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}][sub]overlay{3}\"";
// When the input may or may not be hardware VAAPI decodable
if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
if (string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
{
/*
[base]: HW scaling video to OutputSize
@@ -1648,7 +1636,8 @@ namespace MediaBrowser.Controller.MediaEncoding
}
// If we're hardware VAAPI decoding and software encoding, download frames from the decoder first
else if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && !options.EnableHardwareEncoding)
else if (IsVaapiSupported(state) && string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase)
&& string.Equals(outputVideoCodec, "libx264", StringComparison.OrdinalIgnoreCase))
{
/*
[base]: SW scaling video to OutputSize
@@ -1996,14 +1985,14 @@ namespace MediaBrowser.Controller.MediaEncoding
var hasTextSubs = state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
// When the input may or may not be hardware VAAPI decodable
if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
if (string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
{
filters.Add("format=nv12|vaapi");
filters.Add("hwupload");
}
// When the input may or may not be hardware QSV decodable
else if (string.Equals(options.HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
else if (string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
{
if (!hasTextSubs)
{
@@ -2013,24 +2002,29 @@ namespace MediaBrowser.Controller.MediaEncoding
}
// If we're hardware VAAPI decoding and software encoding, download frames from the decoder first
else if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && !options.EnableHardwareEncoding)
else if (IsVaapiSupported(state) && string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase)
&& string.Equals(outputVideoCodec, "libx264", StringComparison.OrdinalIgnoreCase))
{
var codec = videoStream.Codec.ToLowerInvariant();
var pixelFormat = videoStream.PixelFormat.ToLowerInvariant();
var isColorDepth10 = !string.IsNullOrEmpty(videoStream.Profile) && (videoStream.Profile.Contains("Main 10", StringComparison.OrdinalIgnoreCase)
|| videoStream.Profile.Contains("High 10", StringComparison.OrdinalIgnoreCase));
// Assert 10-bit hardware VAAPI decodable
if ((pixelFormat ?? string.Empty).IndexOf("p10", StringComparison.OrdinalIgnoreCase) != -1
&& (string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codec, "vp9", StringComparison.OrdinalIgnoreCase)))
if (isColorDepth10 && (string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codec, "vp9", StringComparison.OrdinalIgnoreCase)))
{
/*
Download data from GPU to CPU as p010le format.
Colorspace conversion is unnecessary here as libx264 will handle it.
If this step is missing, it will fail on AMD but not on intel.
*/
filters.Add("hwdownload");
filters.Add("format=p010le");
filters.Add("format=nv12");
}
// Assert 8-bit hardware VAAPI decodable
else if ((pixelFormat ?? string.Empty).IndexOf("p10", StringComparison.OrdinalIgnoreCase) == -1)
else if (!isColorDepth10)
{
filters.Add("hwdownload");
filters.Add("format=nv12");
@@ -2076,7 +2070,7 @@ namespace MediaBrowser.Controller.MediaEncoding
filters.AddRange(GetScalingFilters(state, inputWidth, inputHeight, threeDFormat, videoDecoder, outputVideoCodec, request.Width, request.Height, request.MaxWidth, request.MaxHeight));
// Add parameters to use VAAPI with burn-in text subttiles (GH issue #642)
if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
if (string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
{
if (state.SubtitleStream != null
&& state.SubtitleStream.IsTextSubtitleStream

View File

@@ -42,6 +42,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
"libvpx",
"libvpx-vp9",
"aac",
"libfdk_aac",
"libmp3lame",
"libopus",
"libvorbis",

View File

@@ -26,12 +26,12 @@ namespace MediaBrowser.Model.Dlna
public bool SupportsVideoCodec(string codec)
{
return ContainerProfile.ContainsContainer(VideoCodec, codec);
return Type == DlnaProfileType.Video && ContainerProfile.ContainsContainer(VideoCodec, codec);
}
public bool SupportsAudioCodec(string codec)
{
return ContainerProfile.ContainsContainer(AudioCodec, codec);
return (Type == DlnaProfileType.Audio || Type == DlnaProfileType.Video) && ContainerProfile.ContainsContainer(AudioCodec, codec);
}
}
}

View File

@@ -1,4 +1,4 @@
using System.Reflection;
[assembly: AssemblyVersion("10.5.3")]
[assembly: AssemblyFileVersion("10.5.3")]
[assembly: AssemblyVersion("10.5.4")]
[assembly: AssemblyFileVersion("10.5.4")]

View File

@@ -1,7 +1,7 @@
---
# We just wrap `build` so this is really it
name: "jellyfin"
version: "10.5.3"
version: "10.5.4"
packages:
- debian-package-x64
- debian-package-armhf

View File

@@ -1,3 +1,9 @@
jellyfin (10.5.4-1) unstable; urgency=medium
* New upstream version 10.5.4; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.5.4
-- Jellyfin Packaging Team <packaging@jellyfin.org> Sun, 12 Apr 2020 15:53:47 -0400
jellyfin (10.5.3-1) unstable; urgency=medium
* New upstream version 10.5.3; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.5.3

View File

@@ -7,7 +7,7 @@
%endif
Name: jellyfin
Version: 10.5.3
Version: 10.5.4
Release: 1%{?dist}
Summary: The Free Software Media Browser
License: GPLv2
@@ -159,6 +159,8 @@ fi
%systemd_postun_with_restart jellyfin.service
%changelog
* Sun Apr 12 2020 Jellyfin Packaging Team <packaging@jellyfin.org>
- New upstream version 10.5.4; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.5.4
* Sun Apr 05 2020 Jellyfin Packaging Team <packaging@jellyfin.org>
- New upstream version 10.5.3; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.5.3
* Sun Mar 22 2020 Jellyfin Packaging Team <packaging@jellyfin.org>