From 75a457debc009e2be26ff503a2d4b657225ab8c9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 30 Oct 2015 13:00:33 -0400 Subject: [PATCH 1/3] update components --- .../Security/PluginSecurityManager.cs | 12 ++++++++++++ MediaBrowser.Common/MediaBrowser.Common.csproj | 1 + .../Security/PaymentRequiredException.cs | 8 ++++++++ .../HttpServer/HttpListenerHost.cs | 9 ++++++--- 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 MediaBrowser.Common/Security/PaymentRequiredException.cs diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs index c17a637fed..1176407ce3 100644 --- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs +++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs @@ -8,8 +8,10 @@ using MediaBrowser.Model.Serialization; using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Model.Net; namespace MediaBrowser.Common.Implementations.Security { @@ -227,6 +229,16 @@ namespace MediaBrowser.Common.Implementations.Security SaveAppStoreInfo(parameters); throw; } + catch (HttpException e) + { + _logger.ErrorException("Error registering appstore purchase {0}", e, parameters ?? "NO PARMS SENT"); + + if (e.StatusCode.HasValue && e.StatusCode.Value == HttpStatusCode.PaymentRequired) + { + throw new PaymentRequiredException(); + } + throw new ApplicationException("Error registering store sale"); + } catch (Exception e) { _logger.ErrorException("Error registering appstore purchase {0}", e, parameters ?? "NO PARMS SENT"); diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index b2f62dd210..ccdb319fee 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -89,6 +89,7 @@ + diff --git a/MediaBrowser.Common/Security/PaymentRequiredException.cs b/MediaBrowser.Common/Security/PaymentRequiredException.cs new file mode 100644 index 0000000000..27b3e69613 --- /dev/null +++ b/MediaBrowser.Common/Security/PaymentRequiredException.cs @@ -0,0 +1,8 @@ +using System; + +namespace MediaBrowser.Common.Security +{ + public class PaymentRequiredException : Exception + { + } +} diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index e8bb40ba11..1ac47016da 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -19,6 +19,7 @@ using System.Linq; using System.Reflection; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Common.Security; namespace MediaBrowser.Server.Implementations.HttpServer { @@ -65,7 +66,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer } public HttpListenerHost(IApplicationHost applicationHost, - ILogManager logManager, + ILogManager logManager, IServerConfigurationManager config, string serviceName, string defaultRedirectPath, params Assembly[] assembliesWithServices) @@ -80,7 +81,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer } public string GlobalResponse { get; set; } - + public override void Configure(Container container) { HostConfig.Instance.DefaultRedirectPath = DefaultRedirectPath; @@ -92,7 +93,9 @@ namespace MediaBrowser.Server.Implementations.HttpServer {typeof (FileNotFoundException), 404}, {typeof (DirectoryNotFoundException), 404}, {typeof (SecurityException), 401}, - {typeof (UnauthorizedAccessException), 500} + {typeof (PaymentRequiredException), 402}, + {typeof (UnauthorizedAccessException), 500}, + {typeof (ApplicationException), 500} }; HostConfig.Instance.DebugMode = true; From 19cf53b87ec0e18a12b40df0d7db73c75f60056c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 30 Oct 2015 13:03:26 -0400 Subject: [PATCH 2/3] add ffmpeg arm --- .../FFMpeg/FFMpegDownloadInfo.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloadInfo.cs b/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloadInfo.cs index 42fc734886..b4d2e5b851 100644 --- a/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloadInfo.cs +++ b/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloadInfo.cs @@ -126,6 +126,11 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg { "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-2.8.0-32bit-static.7z" }; + case Architecture.Arm: + return new[] + { + "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-arm.7z" + }; } break; } From 4d370ff418d6e901777bfb036e9a0cd708ed3e9c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 30 Oct 2015 13:03:52 -0400 Subject: [PATCH 3/3] 3.0.5781.0 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 4b8a8c61de..319a682ef5 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; //[assembly: AssemblyVersion("3.0.*")] -[assembly: AssemblyVersion("3.0.5768.7")] +[assembly: AssemblyVersion("3.0.5781.0")]