fix: UI 출력 형식 카탈로그 확장 + 멀티홉 노출 2홉 제한
구버전 앱에서 새 변환이 드롭다운에 안 보이던 문제 — AllFormats(UI 화이트리스트)에 데이터/벡터/영상/오디오 형식이 없었음. 추가. - AllFormats에 csv/json/xlsx/svg + 영상(mp4/webm/mkv/mov/avi) + 오디오(mp3/aac/m4a/opus/ogg/flac/wav) 16종 추가 - OutputsForInput 노출 maxHops 3→2: html→png→gif→mp4 같은 카테고리 횡단 과도 노출 차단 (실제 변환 FindBestPath는 3홉 유지) - 테스트 38개 통과
This commit is contained in:
parent
47a4a961e2
commit
df07eb9bdd
2 changed files with 19 additions and 1 deletions
|
|
@ -824,6 +824,22 @@ public partial class MainWindow : Wpf.Ui.Controls.FluentWindow
|
|||
new(".html", "HTML", "HTML", "FsFmtHtml"),
|
||||
new(".md", "Markdown", "MD", "FsFmtOther"),
|
||||
new(".txt", "텍스트", "TXT", "FsFmtOther"),
|
||||
new(".csv", "CSV", "CSV", "FsFmtOther"),
|
||||
new(".json", "JSON", "JSON", "FsFmtOther"),
|
||||
new(".xlsx", "Excel", "XLSX", "FsFmtOther"),
|
||||
new(".svg", "SVG", "SVG", "FsFmtOther"),
|
||||
new(".mp4", "MP4", "MP4", "FsFmtOther"),
|
||||
new(".webm", "WebM", "WEBM", "FsFmtOther"),
|
||||
new(".mkv", "MKV", "MKV", "FsFmtOther"),
|
||||
new(".mov", "MOV", "MOV", "FsFmtOther"),
|
||||
new(".avi", "AVI", "AVI", "FsFmtOther"),
|
||||
new(".mp3", "MP3", "MP3", "FsFmtOther"),
|
||||
new(".aac", "AAC", "AAC", "FsFmtOther"),
|
||||
new(".m4a", "M4A", "M4A", "FsFmtOther"),
|
||||
new(".opus", "Opus", "OPUS", "FsFmtOther"),
|
||||
new(".ogg", "OGG", "OGG", "FsFmtOther"),
|
||||
new(".flac", "FLAC", "FLAC", "FsFmtOther"),
|
||||
new(".wav", "WAV", "WAV", "FsFmtOther"),
|
||||
};
|
||||
|
||||
private bool _suppressFormatChanged;
|
||||
|
|
|
|||
|
|
@ -58,8 +58,10 @@ public sealed class ProviderRegistry
|
|||
{
|
||||
// 그래프 reachability(transitive closure)로 멀티홉 변환까지 노출한다 (예: json→xlsx, svg→jpg).
|
||||
// 동일 포맷(self-edge: txt→txt AI, png→png 압축)은 '다른 형식으로 변환' 목록에서 제외.
|
||||
// UI 노출용은 2홉으로 제한 — 3홉은 html→png→gif→mp4 같이 카테고리를 넘나드는 과도한 변환을 만든다.
|
||||
// (실제 변환 FindBestPath는 options.MaxHops(기본 3)를 그대로 써서 사용자가 명시하면 더 깊은 경로도 수행)
|
||||
var input = ConversionPair.Normalize(inputExtension);
|
||||
return _graph.ReachableOutputs(input, maxHops: 3, allowLossy: true)
|
||||
return _graph.ReachableOutputs(input, maxHops: 2, allowLossy: true)
|
||||
.Where(o => !string.Equals(o, input, StringComparison.OrdinalIgnoreCase))
|
||||
.OrderBy(e => e, StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue