we can export!!

This commit is contained in:
Alex
2025-08-27 23:03:30 -07:00
parent 54ea7f09a0
commit 5c6e144e8a
6 changed files with 139 additions and 19 deletions
+16 -1
View File
@@ -132,6 +132,14 @@ public partial class Export : Panel
// enabled export worker count is in good range
int.TryParse(NumThreads.Text, out var thr) && 1 <= thr && thr <= Environment.ProcessorCount
);
var ffmpegAvail = Utils.IsFFMpegAvailable();
Console.WriteLine($"FFMpeg available: {ffmpegAvail}");
if (!ffmpegAvail)
RadioLeaveAudioWAV.IsChecked = true;
RadioLeaveAudioWAV.IsEnabled = ffmpegAvail;
RadioShouldAudioConvert.IsEnabled = ffmpegAvail;
NoFFMpegMessage.IsVisible = !ffmpegAvail;
}
private void UIExportingMode(bool isExporting)
@@ -149,7 +157,13 @@ public partial class Export : Panel
{
UIExportingMode(true);
string path = await Utils.BeginDirSelection("Choose your export path...");
var path = await Utils.BeginDirSelection("Choose your export path...", Settings.I!.ExportPath);
if (string.IsNullOrEmpty(path))
{
UIExportingMode(false);
return;
}
Settings.I!.ExportPath = path;
var options = await Dispatcher.UIThread.InvokeAsync(() =>
{
@@ -176,6 +190,7 @@ public partial class Export : Panel
{
await Dispatcher.UIThread.InvokeAsync(() => row.SetStatus(ExportStatus.Working));
Exporter.Run(path, row.Song, options);
await Dispatcher.UIThread.InvokeAsync(() => row.SetStatus(ExportStatus.Finished));
}
);