docs: #359 fixing performance issues resulted from the last commit
This commit is contained in:
parent
ac33d018ba
commit
14143e87d4
@ -93,45 +93,11 @@ namespace RMuseum.Models.Artifact
|
||||
/// <param name="size">
|
||||
/// thumb, norm, orig
|
||||
/// </param>
|
||||
private string GetExternalImageUrlPart(string size = "norm")
|
||||
public string GetExternalImageUrlPart(string size = "norm")
|
||||
{
|
||||
return $"{FolderName}/{size}/{OriginalFileName}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ganjoor Thumbnail Image Url
|
||||
/// </summary>
|
||||
public string GanjoorThumbnailImageUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"https://i.ganjoor.net/images/{GetExternalImageUrlPart("thumb")}";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ganjoor Normal Size Image Url
|
||||
/// </summary>
|
||||
public string GanjoorNormalSizeImageUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"https://i.ganjoor.net/images/{GetExternalImageUrlPart("norm")}";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ganjoor Original Size Image Url (Warning: high possibility of 404 error because of file deletion)
|
||||
/// </summary>
|
||||
public string GanjoorOriginalImageUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"https://i.ganjoor.net/images/{GetExternalImageUrlPart("orig")}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// duplicated a picture record (Id is missing so you should store this to get a new Id)
|
||||
/// </summary>
|
||||
|
||||
@ -1452,7 +1452,8 @@ namespace RMuseum.Services.Implementation
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// get poem images by id (some fields are intentionally field with blank or null)
|
||||
/// get poem images by id (some fields are intentionally field with blank or null),
|
||||
/// EntityImageId : the most important data field, image url is {WebServiceUrl.Url}/api/images/thumb/{EntityImageId}.jpg or {WebServiceUrl.Url}/api/images/norm/{EntityImageId}.jpg
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
@ -1472,7 +1473,7 @@ namespace RMuseum.Services.Implementation
|
||||
select new PoemRelatedImage()
|
||||
{
|
||||
PoemRelatedImageType = PoemRelatedImageType.MuseumLink,
|
||||
ThumbnailImageUrl = link.Item.Images.First().GanjoorThumbnailImageUrl,
|
||||
ThumbnailImageUrl = $"https://i.ganjoor.net/images/{link.Item.Images.First().FolderName}/thumb/{link.Item.Images.First().OriginalFileName}",
|
||||
TargetPageUrl = link.LinkToOriginalSource ? link.OriginalSourceUrl : $"https://museum.ganjoor.net/items/{link.Artifact.FriendlyUrl}/{link.Item.FriendlyUrl}",
|
||||
AltText = $"{link.Artifact.Name} » {link.Item.Name}",
|
||||
IsTextOriginalSource = link.IsTextOriginalSource
|
||||
@ -1491,7 +1492,7 @@ namespace RMuseum.Services.Implementation
|
||||
select new PoemRelatedImage()
|
||||
{
|
||||
PoemRelatedImageType = PoemRelatedImageType.ExternalLink,
|
||||
ThumbnailImageUrl = link.Item.Images.First().GanjoorThumbnailImageUrl,
|
||||
ThumbnailImageUrl = $"https://i.ganjoor.net/images/{link.Item.Images.First().FolderName}/thumb/{link.Item.Images.First().OriginalFileName}",
|
||||
TargetPageUrl = link.PinterestUrl,
|
||||
AltText = link.AltText,
|
||||
IsTextOriginalSource = false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user