add support for version placeholder in download links

This commit is contained in:
2025-04-21 18:39:47 +02:00
parent d68dd09ad2
commit b11ad06287
5 changed files with 15 additions and 15 deletions

View File

@@ -41,7 +41,7 @@ internal static class SharedFunctions
{
try
{
var result = await factory.ResolveSourceUrl(action);
var result = await factory.ResolveSourceUrl(action, null);
failed = string.IsNullOrWhiteSpace(result);
}
catch (Exception ex)
@@ -130,7 +130,7 @@ internal static class SharedFunctions
{
Task.Run(async () =>
{
action.SourceUrl = await factory.ResolveSourceUrl(action);
action.SourceUrl = await factory.ResolveSourceUrl(action, null);
}).Wait();
}
catch (Exception)
@@ -239,7 +239,7 @@ internal static class SharedFunctions
if (string.IsNullOrWhiteSpace(action.SourceUrl))
sb.Append($"|{action.SourceTag}");
else
sb.Append($"|[{action.SourceTag}]({action.SourceUrl})");
sb.Append($"|[{action.SourceTag}]({action.GetSourceUrl(installInfos.Version)})");
sb.Append($"|{action.Side.ToString()}");
sb.Append($"|{action.SourceType}");
@@ -283,7 +283,7 @@ internal static class SharedFunctions
var cellTag = ws.Cells[cr, cc++];
cellTag.Value = string.IsNullOrWhiteSpace(action.SourceTag)? "direct link" : action.SourceTag;
if (!string.IsNullOrWhiteSpace(action.SourceUrl))
cellTag.SetHyperlink(new Uri(action.SourceUrl));
cellTag.SetHyperlink(new Uri(action.GetSourceUrl(installInfos.Version)));
ws.Cells[cr, cc++].Value = action.Side.ToString();
ws.Cells[cr, cc++].Value = action.SourceType;