mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-28 02:21:00 +01:00
update components
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user