diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-06-25 11:12:39 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-06-25 11:12:39 -0400 |
| commit | 22fc0b442ac093e55058723782adf845f4465925 (patch) | |
| tree | ffb83ee65ed107a227df1b67692c8faa028dad39 /MediaBrowser.Api/BaseApiService.cs | |
| parent | a55d156fd65e297b044d8ad898b1e04f659e4e60 (diff) | |
add short overview
Diffstat (limited to 'MediaBrowser.Api/BaseApiService.cs')
| -rw-r--r-- | MediaBrowser.Api/BaseApiService.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs index ca5b8b63a..569e12530 100644 --- a/MediaBrowser.Api/BaseApiService.cs +++ b/MediaBrowser.Api/BaseApiService.cs @@ -88,9 +88,14 @@ namespace MediaBrowser.Api { var auth = AuthorizationRequestFilterAttribute.GetAuthorization(Request); - return sessionManager.Sessions.First(i => string.Equals(i.DeviceId, auth.DeviceId) && - string.Equals(i.Client, auth.Client) && - string.Equals(i.ApplicationVersion, auth.Version)); + var session = sessionManager.GetSession(auth.DeviceId, auth.Client, auth.Version); + + if (session == null) + { + throw new ArgumentException("Session not found."); + } + + return session; } /// <summary> |
