diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Social/SharingManager.cs')
| -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 2ffd33ca4..95f0ece0c 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; |
