From a35f62a4a4fb8281c9eb660b16d836a15248a0bf Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 15 Sep 2014 23:33:30 -0400 Subject: fixes #295 - Add play to vlc option --- MediaBrowser.Server.Implementations/Connect/ConnectManager.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Connect') diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs index 0f2d2e3d5c..6479b6f9d2 100644 --- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs +++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs @@ -133,9 +133,8 @@ namespace MediaBrowser.Server.Implementations.Connect } catch (HttpException ex) { - var webEx = (WebException) ex.InnerException; - - if (webEx == null || (webEx.Status != WebExceptionStatus.ProtocolError && ((HttpWebResponse)webEx.Response).StatusCode != HttpStatusCode.NotFound)) + if (!ex.StatusCode.HasValue || ex.StatusCode.Value != HttpStatusCode.NotFound || + ex.StatusCode.Value != HttpStatusCode.Unauthorized) { throw; } -- cgit v1.2.3