diff --git a/yt-dlp-gui/Models/Lang.cs b/yt-dlp-gui/Models/Lang.cs index 1e6ef5e..7f77710 100644 --- a/yt-dlp-gui/Models/Lang.cs +++ b/yt-dlp-gui/Models/Lang.cs @@ -208,6 +208,7 @@ public class LangMain :INotifyPropertyChanged { [YamlMember(Order = 1203)] public string TemporaryLocale { get; set; } = "Locale"; [YamlMember(Order = 1204)] public string TemporarySystem { get; set; } = "System"; [YamlMember(Order = 1205)] public string TemporaryBrowse { get; set; } = "Browse..."; + [YamlMember(Order = 1207)] public string NameFormat { get; set; } = "Name format"; //public string Formats { get; set; } = "Formats"; //Deprecated //public string EmbedSubs { get; set; } = "Embed Subtitles"; diff --git a/yt-dlp-gui/ViewModels/Main.cs b/yt-dlp-gui/ViewModels/Main.cs index c84ea20..2f7dbc3 100644 --- a/yt-dlp-gui/ViewModels/Main.cs +++ b/yt-dlp-gui/ViewModels/Main.cs @@ -193,6 +193,7 @@ public string OriginExt { public bool AutoDownloadAnalysed { get; set; } = false; public bool RememberWindowStatePosition { get; set; } = false; public bool RememberWindowStateSize { get; set; } = false; + public string FileNameFormat { get; set; } = "%(title)s.%(ext)s"; public double Top { get; set; } = 0; public double Left { get; set; } = 0; public double Width { get; set; } = 600; @@ -410,7 +411,8 @@ private void Config_PropertyChanged(object? sender, PropertyChangedEventArgs e) [YamlMember(Order = 1402)] public bool SaveThumbnail { get; set; } = true; [YamlMember(Order = 1403)] public bool UseNotifications { get; set; } = true; [YamlMember(Order = 1404)] public bool AutoDownloadAnalysed { get; set; } = false; - + [YamlMember(Order = 1405)] public string FileNameFormat { get; set; } = "%(title)s.%(ext)s"; + [Description("Last Checking Update Date")] [YamlMember(Order = 9001)] public string LastVersion { get; set; } = string.Empty; [YamlMember(Order = 9002)] public string LastCheckUpdate { get; set; } = string.Empty; diff --git a/yt-dlp-gui/Views/Main.xaml b/yt-dlp-gui/Views/Main.xaml index a071cb1..44a3328 100644 --- a/yt-dlp-gui/Views/Main.xaml +++ b/yt-dlp-gui/Views/Main.xaml @@ -697,19 +697,21 @@ - + - + - + - + - + - + + + @@ -764,16 +766,26 @@ - + + - - + + + + + + + + + + + diff --git a/yt-dlp-gui/Views/Main.xaml.cs b/yt-dlp-gui/Views/Main.xaml.cs index 857871e..1d5c72e 100644 --- a/yt-dlp-gui/Views/Main.xaml.cs +++ b/yt-dlp-gui/Views/Main.xaml.cs @@ -299,7 +299,7 @@ private void GetInfo() { if (!string.IsNullOrWhiteSpace(Data.selectedConfig.file)) { dlp.LoadConfig(Data.selectedConfig.file); } - if (Data.UseOutput) dlp.Output("%(title)s.%(ext)s"); //if not used config, default template + if (Data.UseOutput) dlp.Output(Data.FileNameFormat); //if not used config, default template ClearStatus(); dlp.Exec(null, std => { //取得JSON