diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-04-11 10:13:50 -0400 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2016-04-11 10:13:50 -0400 |
| commit | aa65c1d06e08afbe32eb1a883f9fdc073972231c (patch) | |
| tree | 95fc493d1f5dfc0984970034116b43a1d6c207de /MediaBrowser.Server.Implementations | |
| parent | 412c35efef957c9bbabfd93241638336e662e6fe (diff) | |
| parent | baca0d6244185facf899c15ce39e5e858c6f7df3 (diff) | |
Merge pull request #1642 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Connect/ConnectManager.cs | 20 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs | 9 |
2 files changed, 24 insertions, 5 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs index e308acef0..f3d545492 100644 --- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs +++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs @@ -24,6 +24,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using CommonIO; +using MediaBrowser.Common.Extensions; namespace MediaBrowser.Server.Implementations.Connect { @@ -555,9 +556,22 @@ namespace MediaBrowser.Server.Implementations.Connect } catch (HttpException ex) { - if (!ex.StatusCode.HasValue || - ex.StatusCode.Value != HttpStatusCode.NotFound || - !Validator.EmailIsValid(connectUsername)) + if (!ex.StatusCode.HasValue) + { + throw; + } + + // If they entered a username, then whatever the error is just throw it, for example, user not found + if (!Validator.EmailIsValid(connectUsername)) + { + if (ex.StatusCode.Value == HttpStatusCode.NotFound) + { + throw new ResourceNotFoundException(); + } + throw; + } + + if (ex.StatusCode.Value != HttpStatusCode.NotFound) { throw; } diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs index 9e68ce4ef..c7a5e3b18 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs @@ -335,12 +335,17 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications private bool FilterItem(BaseItem item) { - if (!item.IsFolder && item.LocationType == LocationType.Virtual) + if (item.IsFolder) { return false; } - if (item is IItemByName && !(item is MusicArtist)) + if (item.LocationType == LocationType.Virtual) + { + return false; + } + + if (item is IItemByName) { return false; } |
