diff --git a/TwitchDownloaderWPF/Translations/Strings.Designer.cs b/TwitchDownloaderWPF/Translations/Strings.Designer.cs index 9b2a83e4..e44a2f2a 100644 --- a/TwitchDownloaderWPF/Translations/Strings.Designer.cs +++ b/TwitchDownloaderWPF/Translations/Strings.Designer.cs @@ -1121,15 +1121,6 @@ public static string InvalidClipLinkIdMessage { } } - /// - /// Looks up a localized string similar to Invalid Folder Path. - /// - public static string InvalidFolderPath { - get { - return ResourceManager.GetString("InvalidFolderPath", resourceCulture); - } - } - /// /// Looks up a localized string similar to Invalid start or end time. /// @@ -1166,15 +1157,6 @@ public static string InvalidVideoLinkIdMessage { } } - /// - /// Looks up a localized string similar to The folder does not exist. - /// - public static string InvaliFolderPathMessage { - get { - return ResourceManager.GetString("InvaliFolderPathMessage", resourceCulture); - } - } - /// /// Looks up a localized string similar to JSON File:. /// diff --git a/TwitchDownloaderWPF/Translations/Strings.es.resx b/TwitchDownloaderWPF/Translations/Strings.es.resx index 4acc408d..099b9707 100644 --- a/TwitchDownloaderWPF/Translations/Strings.es.resx +++ b/TwitchDownloaderWPF/Translations/Strings.es.resx @@ -680,12 +680,6 @@ ¿TwitchDownloaderWPF no está disponible en tu idioma? ¡Haz clic para saber cómo ayudar a traducir! - - Ruta de carpeta no válida - - - La carpeta no existe - Cancelado diff --git a/TwitchDownloaderWPF/Translations/Strings.fr.resx b/TwitchDownloaderWPF/Translations/Strings.fr.resx index 7c0ea914..6d700ed4 100644 --- a/TwitchDownloaderWPF/Translations/Strings.fr.resx +++ b/TwitchDownloaderWPF/Translations/Strings.fr.resx @@ -680,12 +680,6 @@ TwitchDownloaderWPF n'est pas disponible dans votre langue maternelle ? Cliquez pour apprendre comment aider à traduire ! - - Chemin d'accès au répertoire non valide - - - Le répertoire n'existe pas - Annulé diff --git a/TwitchDownloaderWPF/Translations/Strings.it.resx b/TwitchDownloaderWPF/Translations/Strings.it.resx index dc8b540b..3bf5a98b 100644 --- a/TwitchDownloaderWPF/Translations/Strings.it.resx +++ b/TwitchDownloaderWPF/Translations/Strings.it.resx @@ -680,12 +680,6 @@ TwitchDownloaderWPF non è disponibile nella tua lingua? Fai click per sapere come aiutare o tradutte! - - Percorso della cartella non valido - - - La cartella non esiste - Cancellato diff --git a/TwitchDownloaderWPF/Translations/Strings.ja.resx b/TwitchDownloaderWPF/Translations/Strings.ja.resx index 015c1b67..d4656e38 100644 --- a/TwitchDownloaderWPF/Translations/Strings.ja.resx +++ b/TwitchDownloaderWPF/Translations/Strings.ja.resx @@ -680,12 +680,6 @@ あなたの母国語でTwitchDownloaderWPFが利用できませんか?クリックで翻訳を手伝う方法を学ぶ! - - 不正なフォルダパス - - - フォルダが存在しません - キャンセルされた diff --git a/TwitchDownloaderWPF/Translations/Strings.pl.resx b/TwitchDownloaderWPF/Translations/Strings.pl.resx index fa5d6c37..bfe413bf 100644 --- a/TwitchDownloaderWPF/Translations/Strings.pl.resx +++ b/TwitchDownloaderWPF/Translations/Strings.pl.resx @@ -680,12 +680,6 @@ TwitchDownloaderWPF nie jest dostępny w twoim natywnym języku? Kliknij, aby dowiedzieć się jak nas wspomóc! - - Nieprawidłowa Ścieżka Folderu - - - Folder nie istnieje - Anulowano diff --git a/TwitchDownloaderWPF/Translations/Strings.pt-br.resx b/TwitchDownloaderWPF/Translations/Strings.pt-br.resx index 2b754c6f..897d2e0c 100644 --- a/TwitchDownloaderWPF/Translations/Strings.pt-br.resx +++ b/TwitchDownloaderWPF/Translations/Strings.pt-br.resx @@ -680,12 +680,6 @@ O TwitchDownloaderWPF não está disponível em sua languagem nativa? Clique para aprender como ajudar a traduzir! - - Diretório da Pasta Inválido - - - A pasta não existe - Cancelado diff --git a/TwitchDownloaderWPF/Translations/Strings.resx b/TwitchDownloaderWPF/Translations/Strings.resx index f378f4f2..d76f0dde 100644 --- a/TwitchDownloaderWPF/Translations/Strings.resx +++ b/TwitchDownloaderWPF/Translations/Strings.resx @@ -680,12 +680,6 @@ Is TwitchDownloaderWPF not available in your native language? Click to learn how to help translate! - - Invalid Folder Path - - - The folder does not exist - Canceled diff --git a/TwitchDownloaderWPF/Translations/Strings.ru.resx b/TwitchDownloaderWPF/Translations/Strings.ru.resx index 9e1b0884..53d9218f 100644 --- a/TwitchDownloaderWPF/Translations/Strings.ru.resx +++ b/TwitchDownloaderWPF/Translations/Strings.ru.resx @@ -680,12 +680,6 @@ TwitchDownloaderWPF не доступен на твоем языке? Нажми здесь чтобы узнать как помочь с переводом! - - Неправильный путь к папке - - - Папка не существует - Отменено diff --git a/TwitchDownloaderWPF/Translations/Strings.tr.resx b/TwitchDownloaderWPF/Translations/Strings.tr.resx index b2aa4e33..6646a564 100644 --- a/TwitchDownloaderWPF/Translations/Strings.tr.resx +++ b/TwitchDownloaderWPF/Translations/Strings.tr.resx @@ -681,12 +681,6 @@ TwitchDownloaderWPF ana dilinizde mevcut değil mi? Çeviriye nasıl yardım edeceğinizi öğrenmek için tıklayın! - - Geçersiz Klasör Yolu - - - Klasör mevcut değil - İptal edildi diff --git a/TwitchDownloaderWPF/Translations/Strings.uk.resx b/TwitchDownloaderWPF/Translations/Strings.uk.resx index 10717467..a45c7e4d 100644 --- a/TwitchDownloaderWPF/Translations/Strings.uk.resx +++ b/TwitchDownloaderWPF/Translations/Strings.uk.resx @@ -680,12 +680,6 @@ TwitchDownloaderWPF недоступно на вашій мові? Натисніть тут, щоб дізнатися, як допомогти з перекладом! - - Неправильний шлях до папки - - - Папка не існує - Скасовано diff --git a/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx b/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx index 5b255566..2c59e140 100644 --- a/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx +++ b/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx @@ -680,12 +680,6 @@ TwitchDownloaderWPF 没有你的母语版本?点击了解如何帮助翻译! - - 文件夹路径无效 - - - 文件夹不存在 - 已取消 diff --git a/TwitchDownloaderWPF/WindowQueueOptions.xaml.cs b/TwitchDownloaderWPF/WindowQueueOptions.xaml.cs index 0d68f4e6..cd9c0259 100644 --- a/TwitchDownloaderWPF/WindowQueueOptions.xaml.cs +++ b/TwitchDownloaderWPF/WindowQueueOptions.xaml.cs @@ -5,6 +5,7 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Media; +using TwitchDownloaderCore; using TwitchDownloaderCore.Options; using TwitchDownloaderCore.Tools; using TwitchDownloaderWPF.Properties; @@ -28,9 +29,7 @@ public WindowQueueOptions(Page page) _parentPage = page; InitializeComponent(); - string queueFolder = Settings.Default.QueueFolder; - if (Directory.Exists(queueFolder)) - textFolder.Text = queueFolder; + textFolder.Text = Settings.Default.QueueFolder; TextPreferredQuality.Visibility = Visibility.Collapsed; ComboPreferredQuality.Visibility = Visibility.Collapsed; @@ -95,9 +94,7 @@ public WindowQueueOptions(List dataList) _dataList = dataList; InitializeComponent(); - string queueFolder = Settings.Default.QueueFolder; - if (Directory.Exists(queueFolder)) - textFolder.Text = queueFolder; + textFolder.Text = Settings.Default.QueueFolder; if (_dataList.Any(x => x.Id.All(char.IsDigit))) { @@ -129,8 +126,7 @@ private void btnQueue_Click(object sender, RoutedEventArgs e) string folderPath = textFolder.Text; if (!Directory.Exists(folderPath)) { - MessageBox.Show(this, Translations.Strings.InvaliFolderPathMessage, Translations.Strings.InvalidFolderPath, MessageBoxButton.OK, MessageBoxImage.Error); - return; + TwitchHelper.CreateDirectory(folderPath); } VideoDownloadOptions downloadOptions = vodDownloadPage.GetOptions(null, textFolder.Text); @@ -230,8 +226,7 @@ private void btnQueue_Click(object sender, RoutedEventArgs e) string folderPath = textFolder.Text; if (!Directory.Exists(folderPath)) { - MessageBox.Show(this, Translations.Strings.InvaliFolderPathMessage, Translations.Strings.InvalidFolderPath, MessageBoxButton.OK, MessageBoxImage.Error); - return; + TwitchHelper.CreateDirectory(folderPath); } ClipDownloadOptions downloadOptions = new ClipDownloadOptions @@ -335,8 +330,7 @@ private void btnQueue_Click(object sender, RoutedEventArgs e) string folderPath = textFolder.Text; if (!Directory.Exists(folderPath)) { - MessageBox.Show(this, Translations.Strings.InvaliFolderPathMessage, Translations.Strings.InvalidFolderPath, MessageBoxButton.OK, MessageBoxImage.Error); - return; + TwitchHelper.CreateDirectory(folderPath); } ChatDownloadOptions chatOptions = MainWindow.pageChatDownload.GetOptions(null); @@ -393,8 +387,7 @@ private void btnQueue_Click(object sender, RoutedEventArgs e) string folderPath = textFolder.Text; if (!Directory.Exists(folderPath)) { - MessageBox.Show(this, Translations.Strings.InvaliFolderPathMessage, Translations.Strings.InvalidFolderPath, MessageBoxButton.OK, MessageBoxImage.Error); - return; + TwitchHelper.CreateDirectory(folderPath); } ChatUpdateOptions chatOptions = MainWindow.pageChatUpdate.GetOptions(null); @@ -430,8 +423,7 @@ private void btnQueue_Click(object sender, RoutedEventArgs e) { if (!Directory.Exists(folderPath)) { - MessageBox.Show(this, Translations.Strings.InvaliFolderPathMessage, Translations.Strings.InvalidFolderPath, MessageBoxButton.OK, MessageBoxImage.Error); - return; + TwitchHelper.CreateDirectory(folderPath); } string fileFormat = chatRenderPage.comboFormat.SelectedItem.ToString()!; @@ -474,8 +466,7 @@ private void EnqueueDataList() string folderPath = textFolder.Text; if (!Directory.Exists(folderPath)) { - MessageBox.Show(this, Translations.Strings.InvaliFolderPathMessage, Translations.Strings.InvalidFolderPath, MessageBoxButton.OK, MessageBoxImage.Error); - return; + TwitchHelper.CreateDirectory(folderPath); } foreach (var taskData in _dataList) @@ -630,8 +621,6 @@ private void EnqueueDataList() private void btnFolder_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); - if (Directory.Exists(textFolder.Text)) - dialog.RootFolder = dialog.RootFolder; if (dialog.ShowDialog(this).GetValueOrDefault()) { textFolder.Text = dialog.SelectedPath;