From f36493193d38e00fd14db95f9528a679d9982c36 Mon Sep 17 00:00:00 2001 From: Skid Date: Thu, 19 Mar 2020 18:59:09 +0100 Subject: [PATCH] Fix #47 and bump to v2.1.1. --- .../Crunchyroll-Downloader.csproj | 390 +++++++++--------- .../Properties/AssemblyInfo.cs | 4 +- Crunchyroll-Downloader/ViewModelBase.cs | 12 + .../ViewModels/MainWindowViewModel.cs | 12 +- Crunchyroll-Downloader/Views/AboutWindow.xaml | 2 +- 5 files changed, 218 insertions(+), 202 deletions(-) diff --git a/Crunchyroll-Downloader/Crunchyroll-Downloader.csproj b/Crunchyroll-Downloader/Crunchyroll-Downloader.csproj index e472ebe..6668175 100644 --- a/Crunchyroll-Downloader/Crunchyroll-Downloader.csproj +++ b/Crunchyroll-Downloader/Crunchyroll-Downloader.csproj @@ -1,202 +1,202 @@ - - - - - Debug - AnyCPU - {BFD5A544-E85E-46E7-B6DC-A8900240DE1E} - WinExe - Properties - CrunchyrollDownloader - Crunchyroll-Downloader - v4.7.2 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - Images\logo.ico - - - CrunchyrollDownloader.App - - - false - - - false - - - - - - - - - - - - ..\packages\SharpZipLib.1.1.0\lib\net45\ICSharpCode.SharpZipLib.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - - - - - - - - - - - 4.0 - - - - - - - - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - - - - - - - - - - AboutWindow.xaml - - - App.xaml - - - ProgressWindow.xaml - - - - LoginWindow.xaml - - - MainWindow.xaml - Code - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - - - - - - - False - Microsoft .NET Framework 4.7.1 %28x86 et x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - + + + + + Debug + AnyCPU + {BFD5A544-E85E-46E7-B6DC-A8900240DE1E} + WinExe + Properties + CrunchyrollDownloader + Crunchyroll-Downloader + v4.7.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + Images\logo.ico + + + CrunchyrollDownloader.App + + + false + + + false + + + + + + + + + + + + ..\packages\SharpZipLib.1.1.0\lib\net45\ICSharpCode.SharpZipLib.dll + + + ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + 4.0 + + + + + + + + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + + + + + + + + + + AboutWindow.xaml + + + App.xaml + + + ProgressWindow.xaml + + + + LoginWindow.xaml + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + + + + + + + False + Microsoft .NET Framework 4.7.1 %28x86 et x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + --> \ No newline at end of file diff --git a/Crunchyroll-Downloader/Properties/AssemblyInfo.cs b/Crunchyroll-Downloader/Properties/AssemblyInfo.cs index 1c5bd66..d66f387 100644 --- a/Crunchyroll-Downloader/Properties/AssemblyInfo.cs +++ b/Crunchyroll-Downloader/Properties/AssemblyInfo.cs @@ -50,7 +50,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] meme -[assembly: AssemblyVersion("2.1.0.0")] -[assembly: AssemblyFileVersion("2.1.0.0")] +[assembly: AssemblyVersion("2.1.1.0")] +[assembly: AssemblyFileVersion("2.1.1.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/Crunchyroll-Downloader/ViewModelBase.cs b/Crunchyroll-Downloader/ViewModelBase.cs index e7fc97f..6c4c9bb 100644 --- a/Crunchyroll-Downloader/ViewModelBase.cs +++ b/Crunchyroll-Downloader/ViewModelBase.cs @@ -1,4 +1,5 @@ using System; +using System.Globalization; using System.Runtime.CompilerServices; namespace CrunchyrollDownloader @@ -18,4 +19,15 @@ protected void SetModelProperty(object value, [CallerMemberName] string property OnPropertyChanged(propertyName); } } + + public class UnknownCulture : CultureInfo + { + public override string Name { get; } + public override string NativeName => "Unknown language for Windows (" + Name + ")"; + + public UnknownCulture(string name) : base("en-US") + { + Name = name; + } + } } \ No newline at end of file diff --git a/Crunchyroll-Downloader/ViewModels/MainWindowViewModel.cs b/Crunchyroll-Downloader/ViewModels/MainWindowViewModel.cs index 86759d2..91538cf 100644 --- a/Crunchyroll-Downloader/ViewModels/MainWindowViewModel.cs +++ b/Crunchyroll-Downloader/ViewModels/MainWindowViewModel.cs @@ -16,12 +16,15 @@ using static CrunchyrollDownloader.Quality; namespace CrunchyrollDownloader.ViewModels -{ +{ + public class MainWindowViewModel : ViewModelBase { + readonly static UnknownCulture esla = new UnknownCulture("es-LA"); + readonly static UnknownCulture arme = new UnknownCulture("ar-ME"); + public MainWindowViewModel() : this(null) { - } public MainWindowViewModel(DownloaderModel model = null) : base(model) @@ -105,15 +108,16 @@ public QualityItem SelectedQualityItem public List AvailableLanguages { get; } = new List { + GetCultureInfo("en-US"), GetCultureInfo("fr-FR"), GetCultureInfo("es-ES"), - GetCultureInfo("es-LA"), + esla, GetCultureInfo("pt-BR"), GetCultureInfo("it-IT"), GetCultureInfo("de-DE"), GetCultureInfo("ru-RU"), - GetCultureInfo("ar-ME") + arme }; private CultureInfo _selectedCultureInfo; diff --git a/Crunchyroll-Downloader/Views/AboutWindow.xaml b/Crunchyroll-Downloader/Views/AboutWindow.xaml index 6566ff0..641c6ed 100644 --- a/Crunchyroll-Downloader/Views/AboutWindow.xaml +++ b/Crunchyroll-Downloader/Views/AboutWindow.xaml @@ -19,7 +19,7 @@