aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Social
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-06-19 12:53:43 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-06-19 12:53:43 -0400
commit7627c6707d6fa9bc88e3f7343b66889a5fc184c7 (patch)
treecd99555d2384d1b152587daeb1686d1ac81a713a /MediaBrowser.Server.Implementations/Social
parent759f5a856064450acdb4c26839d6d890afb99a17 (diff)
update components
Diffstat (limited to 'MediaBrowser.Server.Implementations/Social')
-rw-r--r--MediaBrowser.Server.Implementations/Social/SharingManager.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/Social/SharingManager.cs b/MediaBrowser.Server.Implementations/Social/SharingManager.cs
index 2ffd33ca47..95f0ece0c2 100644
--- a/MediaBrowser.Server.Implementations/Social/SharingManager.cs
+++ b/MediaBrowser.Server.Implementations/Social/SharingManager.cs
@@ -43,7 +43,7 @@ namespace MediaBrowser.Server.Implementations.Social
throw new ResourceNotFoundException();
}
- var externalUrl = _appHost.GetSystemInfo().WanAddress;
+ var externalUrl = (await _appHost.GetSystemInfo().ConfigureAwait(false)).WanAddress;
if (string.IsNullOrWhiteSpace(externalUrl))
{
@@ -58,7 +58,7 @@ namespace MediaBrowser.Server.Implementations.Social
UserId = userId
};
- AddShareInfo(info);
+ AddShareInfo(info, externalUrl);
await _repository.CreateShare(info).ConfigureAwait(false);
@@ -74,15 +74,13 @@ namespace MediaBrowser.Server.Implementations.Social
{
var info = _repository.GetShareInfo(id);
- AddShareInfo(info);
+ AddShareInfo(info, _appHost.GetSystemInfo().Result.WanAddress);
return info;
}
- private void AddShareInfo(SocialShareInfo info)
+ private void AddShareInfo(SocialShareInfo info, string externalUrl)
{
- var externalUrl = _appHost.GetSystemInfo().WanAddress;
-
info.ImageUrl = externalUrl + "/Social/Shares/Public/" + info.Id + "/Image";
info.Url = externalUrl + "/emby/web/shared.html?id=" + info.Id;