Skip to content

Commit

Permalink
Add asset key to syndication links in StarsAtomItem.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed May 23, 2024
1 parent f861a8c commit 5d4441f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Stars.Data/Model/Atom/StarsAtomItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,16 @@ private static IEnumerable<SyndicationLink> GetFunctionalLinks(IDictionary<strin
List<SyndicationLink> links = new List<SyndicationLink>();

var overviews = assets.Where(a => a.Value.Roles.Contains("overview") || a.Value.Roles.Contains("thumbnail") || a.Value.Roles.Contains("legend"));
links.AddRange(overviews.Select(o => new SyndicationLink(GetAssetUri(stacObjectUri, o.Value),
foreach (var o in overviews)
{
var link = new SyndicationLink(GetAssetUri(stacObjectUri, o.Value),
GetRelationshipFromRoles(o.Value.Roles),
GetTitleFromRoles(o),
o.Value.MediaType.ToString(),
Convert.ToInt64(o.Value.FileExtension().Size))));
Convert.ToInt64(o.Value.FileExtension().Size));
link.AttributeExtensions.Add(new XmlQualifiedName("asset"), o.Key);
links.Add(link);
}

return links;
}
Expand Down

0 comments on commit 5d4441f

Please sign in to comment.