Skip to content

Commit

Permalink
Merge pull request #2635 from wabbajack-tools/rename-validated-images
Browse files Browse the repository at this point in the history
Rename compressed images on validation to a name that doesn't use the hash of the original file
  • Loading branch information
tr4wzified authored Oct 25, 2024
2 parents 9ee1fa3 + 9b0920d commit e32c57c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Wabbajack.CLI/Verbs/ValidateLists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public async Task<int> Run(AbsolutePath reports, AbsolutePath otherArchives)
var height = standardWidth * image.Height / image.Width;
image.Mutate(x => x
.Resize(standardWidth, height));
largeImage = validatedList.RepositoryName.ToRelativePath().Combine(hash.ToHex()+"_large").WithExtension(Ext.Webp);
largeImage = validatedList.RepositoryName.ToRelativePath().Combine(validatedList.Links.MachineURL + "_large").WithExtension(Ext.Webp);
await image.SaveAsync(largeImage.RelativeTo(reports).ToString(), new WebpEncoder {Quality = 85}, cancellationToken: token);
}

Expand All @@ -280,7 +280,7 @@ public async Task<int> Run(AbsolutePath reports, AbsolutePath otherArchives)
var height = standardWidth * image.Height / image.Width;
image.Mutate(x => x
.Resize(standardWidth, height));
smallImage = validatedList.RepositoryName.ToRelativePath().Combine(hash.ToHex()+"_small").WithExtension(Ext.Webp);
smallImage = validatedList.RepositoryName.ToRelativePath().Combine(validatedList.Links.MachineURL + "_small").WithExtension(Ext.Webp);
await image.SaveAsync(smallImage.RelativeTo(reports).ToString(), new WebpEncoder {Quality = 75}, cancellationToken: token);
}

Expand Down

0 comments on commit e32c57c

Please sign in to comment.