From 10cfb3c43c06e39b61929fea1d398801e555274b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 14 Feb 2015 14:36:40 -0500 Subject: sync updates --- MediaBrowser.Server.Implementations/Library/UserManager.cs | 6 ++++-- MediaBrowser.Server.Implementations/Library/UserViewManager.cs | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library') diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/MediaBrowser.Server.Implementations/Library/UserManager.cs index 8858abc10..59fecc857 100644 --- a/MediaBrowser.Server.Implementations/Library/UserManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserManager.cs @@ -402,15 +402,17 @@ namespace MediaBrowser.Server.Implementations.Library return dto; } - public UserDto GetOfflineUserDto(User user, string deviceId) + public UserDto GetOfflineUserDto(User user) { var dto = GetUserDto(user); var offlinePasswordHash = GetLocalPasswordHash(user); dto.HasPassword = !IsPasswordEmpty(offlinePasswordHash); + dto.OfflinePasswordSalt = Guid.NewGuid().ToString("N"); + // Hash the pin with the device Id to create a unique result for this device - dto.OfflinePassword = GetSha1String((offlinePasswordHash + deviceId).ToLower()); + dto.OfflinePassword = GetSha1String((offlinePasswordHash + dto.OfflinePasswordSalt).ToLower()); dto.ServerName = _appHost.FriendlyName; diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs index 2ec9e8a4f..9ef5a856e 100644 --- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs @@ -86,7 +86,8 @@ namespace MediaBrowser.Server.Implementations.Library list.Add(await GetUserView(CollectionType.Movies, string.Empty, cancellationToken).ConfigureAwait(false)); } - if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.Games, StringComparison.OrdinalIgnoreCase))) + if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.Games, StringComparison.OrdinalIgnoreCase)) + || _config.Configuration.EnableLegacyCollections) { list.Add(await GetUserView(CollectionType.Games, string.Empty, cancellationToken).ConfigureAwait(false)); } -- cgit v1.2.3