aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-11 22:54:31 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-11 22:54:31 -0500
commitea92065df0321039b4a6433e9f5d2a7269d720a6 (patch)
treef757d6ee2154e31e3ce10c286d175189146235af /MediaBrowser.Server.Implementations
parent306c5041f032a539612522d9acdd59596b075719 (diff)
sync updates
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs14
-rw-r--r--MediaBrowser.Server.Implementations/Library/UserManager.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Server/server.json1
-rw-r--r--MediaBrowser.Server.Implementations/Sync/SyncManager.cs10
4 files changed, 26 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
index 4e9899301..cd4d23f5c 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
@@ -129,6 +129,20 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
if (tokenInfo != null)
{
info.UserId = tokenInfo.UserId;
+
+ // TODO: Remove these checks for IsNullOrWhiteSpace
+ if (string.IsNullOrWhiteSpace(info.Client))
+ {
+ info.Client = tokenInfo.AppName;
+ }
+ if (string.IsNullOrWhiteSpace(info.Device))
+ {
+ info.Device = tokenInfo.DeviceName;
+ }
+ if (string.IsNullOrWhiteSpace(info.DeviceId))
+ {
+ info.DeviceId = tokenInfo.DeviceId;
+ }
}
httpReq.Items["OriginalAuthenticationInfo"] = tokenInfo;
}
diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/MediaBrowser.Server.Implementations/Library/UserManager.cs
index 88ba3b7bf..8858abc10 100644
--- a/MediaBrowser.Server.Implementations/Library/UserManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/UserManager.cs
@@ -410,7 +410,7 @@ namespace MediaBrowser.Server.Implementations.Library
dto.HasPassword = !IsPasswordEmpty(offlinePasswordHash);
// Hash the pin with the device Id to create a unique result for this device
- dto.OfflinePassword = GetSha1String(offlinePasswordHash + deviceId);
+ dto.OfflinePassword = GetSha1String((offlinePasswordHash + deviceId).ToLower());
dto.ServerName = _appHost.FriendlyName;
diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json
index c7ebbb48c..dc80778da 100644
--- a/MediaBrowser.Server.Implementations/Localization/Server/server.json
+++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json
@@ -1114,6 +1114,7 @@
"MessageApplicationUpdated": "Media Browser Server has been updated",
"AuthenticationSucceededWithUserName": "{0} successfully authenticated",
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
+ "UserDownloadingItemWithValues": "{0} is downloading {1}",
"UserStartedPlayingItemWithValues": "{0} has started playing {1}",
"UserStoppedPlayingItemWithValues": "{0} has stopped playing {1}",
"AppDeviceValues": "App: {0}, Device: {1}",
diff --git a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs
index 78821f950..00b28ad8a 100644
--- a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs
+++ b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs
@@ -439,6 +439,16 @@ namespace MediaBrowser.Server.Implementations.Sync
return true;
}
+ if (item is Person)
+ {
+ return false;
+ }
+
+ if (item is Year)
+ {
+ return false;
+ }
+
if (string.Equals(item.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase) ||
string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase) ||
string.Equals(item.MediaType, MediaType.Photo, StringComparison.OrdinalIgnoreCase) ||