|
|
@ -21,12 +21,11 @@ public class ExportSetupViewModel : DialogScreen
|
|
|
|
|
|
|
|
|
|
|
|
public IReadOnlyList<Channel>? Channels { get; set; }
|
|
|
|
public IReadOnlyList<Channel>? Channels { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsSingleChannel => Channels is null || Channels.Count == 1;
|
|
|
|
public bool IsSingleChannel => Channels?.Count == 1;
|
|
|
|
|
|
|
|
|
|
|
|
public string? OutputPath { get; set; }
|
|
|
|
public string? OutputPath { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public IReadOnlyList<ExportFormat> AvailableFormats =>
|
|
|
|
public IReadOnlyList<ExportFormat> AvailableFormats { get; } = Enum.GetValues<ExportFormat>();
|
|
|
|
Enum.GetValues(typeof(ExportFormat)).Cast<ExportFormat>().ToArray();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ExportFormat SelectedFormat { get; set; }
|
|
|
|
public ExportFormat SelectedFormat { get; set; }
|
|
|
|
|
|
|
|
|
|
|
@ -96,12 +95,11 @@ public class ExportSetupViewModel : DialogScreen
|
|
|
|
_settingsService.LastShouldDownloadMedia = ShouldDownloadMedia;
|
|
|
|
_settingsService.LastShouldDownloadMedia = ShouldDownloadMedia;
|
|
|
|
|
|
|
|
|
|
|
|
// If single channel - prompt file path
|
|
|
|
// If single channel - prompt file path
|
|
|
|
if (Channels is not null && IsSingleChannel)
|
|
|
|
if (IsSingleChannel)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var channel = Channels.Single();
|
|
|
|
|
|
|
|
var defaultFileName = ExportRequest.GetDefaultOutputFileName(
|
|
|
|
var defaultFileName = ExportRequest.GetDefaultOutputFileName(
|
|
|
|
Guild!,
|
|
|
|
Guild!,
|
|
|
|
channel,
|
|
|
|
Channels!.Single(),
|
|
|
|
SelectedFormat,
|
|
|
|
SelectedFormat,
|
|
|
|
After?.Pipe(Snowflake.FromDate),
|
|
|
|
After?.Pipe(Snowflake.FromDate),
|
|
|
|
Before?.Pipe(Snowflake.FromDate)
|
|
|
|
Before?.Pipe(Snowflake.FromDate)
|
|
|
|