diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-06-19 13:42:43 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-19 13:42:43 -0400 |
| commit | 44c3424e16ad6a16e3b052aa4f49f4c4413f4220 (patch) | |
| tree | c8cf8b08f4c16d727a011682a716e3ba74067994 /MediaBrowser.Server.Implementations/Social | |
| parent | 740d1bc8cfca4a3b5191828e2b354922e57e7f99 (diff) | |
| parent | f58a9194881f0c76ecc16a24c189c7aaa74e86f4 (diff) | |
Merge pull request #1861 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/Social')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Social/SharingManager.cs | 10 |
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; |
