Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

Rotate and Flip groups: no target an older Filee could run them with

SeoJCalive13e82d8d8e91
diff --git a/src/Filee.Core/Presets/BuiltInData.cs b/src/Filee.Core/Presets/BuiltInData.cs
index 089fe66d..65d9a91e 100644
--- a/src/Filee.Core/Presets/BuiltInData.cs
+++ b/src/Filee.Core/Presets/BuiltInData.cs
@@ -179,12 +179,12 @@ public static class BuiltInData
Tool("flip-vertical", "preset.flip_vertical", "{name}_flipped", i => i.Flip = ImageFlip.Vertical),
new()
{
- Id = "rotate", NameKey = "preset.group_rotate", TargetFormat = SameAsSource, Kind = PresetKind.Group,
+ Id = "rotate", NameKey = "preset.group_rotate", TargetFormat = Preset.GroupTarget, Kind = PresetKind.Group,
SubPresetIds = ["rotate-left", "rotate-right", "rotate-180"],
},
new()
{
- Id = "flip", NameKey = "preset.group_flip", TargetFormat = SameAsSource, Kind = PresetKind.Group,
+ Id = "flip", NameKey = "preset.group_flip", TargetFormat = Preset.GroupTarget, Kind = PresetKind.Group,
SubPresetIds = ["flip-horizontal", "flip-vertical"],
},
];
diff --git a/tests/Filee.Core.Tests/SmallParsersTests.cs b/tests/Filee.Core.Tests/SmallParsersTests.cs
index d67cdd56..8dac552e 100644
--- a/tests/Filee.Core.Tests/SmallParsersTests.cs
+++ b/tests/Filee.Core.Tests/SmallParsersTests.cs
@@ -90,6 +90,11 @@ public class BuiltInDataTests
public void Preset_targets_are_known_formats()
{
foreach (var preset in BuiltInData.CreatePresets())
- Assert.True(preset.TargetFormat == BuiltInData.SameAsSource || FormatRegistry.FindById(preset.TargetFormat) is not null, preset.Id);
+ {
+ if (preset.IsGroup)
+ Assert.Equal(Preset.GroupTarget, preset.TargetFormat); // none an older Filee could run it with
+ else
+ Assert.True(preset.TargetFormat == BuiltInData.SameAsSource || FormatRegistry.FindById(preset.TargetFormat) is not null, preset.Id);
+ }
}
}