aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-05-29 19:51:33 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-05-29 19:51:33 -0400
commit4e04d31c7d13c2cec4f633ceab57acd8dae7ddc5 (patch)
treed9229ad616053f199d65d8f0f543a466d65a1d4e /MediaBrowser.Server.Implementations
parent81a90a49b371051aaa066c5ac8d0a0c44e6d5065 (diff)
consolidate slideout panels
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Library/UserDataManager.cs8
-rw-r--r--MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json7
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/SqliteDisplayPreferencesRepository.cs10
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionManager.cs14
4 files changed, 28 insertions, 11 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/UserDataManager.cs b/MediaBrowser.Server.Implementations/Library/UserDataManager.cs
index 8cbb2eb1a..ae737d244 100644
--- a/MediaBrowser.Server.Implementations/Library/UserDataManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/UserDataManager.cs
@@ -1,5 +1,4 @@
-using System.Collections.Generic;
-using MediaBrowser.Common.Events;
+using MediaBrowser.Common.Events;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
@@ -10,6 +9,7 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging;
using System;
using System.Collections.Concurrent;
+using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -262,5 +262,9 @@ namespace MediaBrowser.Server.Implementations.Library
return playedToCompletion;
}
+ public UserItemData GetUserData(string userId, string key)
+ {
+ return GetUserData(new Guid(userId), key);
+ }
}
}
diff --git a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json
index 0c52d21c9..c48de8797 100644
--- a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json
+++ b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json
@@ -723,7 +723,7 @@
"MessageInvitationSentToNewUser": "An email has been sent to {0} inviting them to sign up with Emby.",
"HeaderConnectionFailure": "Connection Failure",
"MessageUnableToConnectToServer": "We're unable to connect to the selected server right now. Please ensure it is running and try again.",
- "ButtonSelectServer": "Select server",
+ "ButtonSelectServer": "Select Server",
"MessagePluginConfigurationRequiresLocalAccess": "To configure this plugin please sign in to your local server directly.",
"MessageLoggedOutParentalControl": "Access is currently restricted. Please try again later.",
"DefaultErrorMessage": "There was an error processing the request. Please try again later.",
@@ -787,5 +787,8 @@
"MessagePleaseSignInLocalNetwork": "Before proceeding, please ensure that you're connected to your local network using a Wifi or LAN connection.",
"ButtonUnlockWithPurchase": "Unlock with Purchase",
"MessageLiveTvGuideRequiresUnlock": "The Live TV Guide is currently limited to {0} channels. Click the unlock button to learn how to enjoy the full experience.",
- "OptionEnableFullscreen": "Enable Fullscreen"
+ "OptionEnableFullscreen": "Enable Fullscreen",
+ "ButtonServer": "Server",
+ "HeaderAdmin": "Admin",
+ "HeaderLibrary": "Library"
}
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteDisplayPreferencesRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteDisplayPreferencesRepository.cs
index c9ab43e63..45e0304c1 100644
--- a/MediaBrowser.Server.Implementations/Persistence/SqliteDisplayPreferencesRepository.cs
+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteDisplayPreferencesRepository.cs
@@ -309,5 +309,15 @@ namespace MediaBrowser.Server.Implementations.Persistence
_connection = null;
}
}
+
+ public Task SaveDisplayPreferences(DisplayPreferences displayPreferences, string userId, string client, CancellationToken cancellationToken)
+ {
+ return SaveDisplayPreferences(displayPreferences, new Guid(userId), client, cancellationToken);
+ }
+
+ public DisplayPreferences GetDisplayPreferences(string displayPreferencesId, string userId, string client)
+ {
+ return GetDisplayPreferences(displayPreferencesId, new Guid(userId), client);
+ }
}
} \ No newline at end of file
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
index 757e6938a..1baaa952a 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
@@ -1203,22 +1203,22 @@ namespace MediaBrowser.Server.Implementations.Session
/// <param name="userId">The user identifier.</param>
/// <exception cref="System.UnauthorizedAccessException">Cannot modify additional users without authenticating first.</exception>
/// <exception cref="System.ArgumentException">The requested user is already the primary user of the session.</exception>
- public void AddAdditionalUser(string sessionId, Guid userId)
+ public void AddAdditionalUser(string sessionId, string userId)
{
var session = GetSession(sessionId);
- if (session.UserId.HasValue && session.UserId.Value == userId)
+ if (session.UserId.HasValue && session.UserId.Value == new Guid(userId))
{
throw new ArgumentException("The requested user is already the primary user of the session.");
}
- if (session.AdditionalUsers.All(i => new Guid(i.UserId) != userId))
+ if (session.AdditionalUsers.All(i => new Guid(i.UserId) != new Guid(userId)))
{
var user = _userManager.GetUserById(userId);
session.AdditionalUsers.Add(new SessionUserInfo
{
- UserId = userId.ToString("N"),
+ UserId = userId,
UserName = user.Name
});
}
@@ -1231,16 +1231,16 @@ namespace MediaBrowser.Server.Implementations.Session
/// <param name="userId">The user identifier.</param>
/// <exception cref="System.UnauthorizedAccessException">Cannot modify additional users without authenticating first.</exception>
/// <exception cref="System.ArgumentException">The requested user is already the primary user of the session.</exception>
- public void RemoveAdditionalUser(string sessionId, Guid userId)
+ public void RemoveAdditionalUser(string sessionId, string userId)
{
var session = GetSession(sessionId);
- if (session.UserId.HasValue && session.UserId.Value == userId)
+ if (session.UserId.HasValue && session.UserId.Value == new Guid(userId))
{
throw new ArgumentException("The requested user is already the primary user of the session.");
}
- var user = session.AdditionalUsers.FirstOrDefault(i => new Guid(i.UserId) == userId);
+ var user = session.AdditionalUsers.FirstOrDefault(i => new Guid(i.UserId) == new Guid(userId));
if (user != null)
{