Skip to content

Commit

Permalink
[Update] 2022.10.05
Browse files Browse the repository at this point in the history
  • Loading branch information
Kannagi authored and Kannagi committed Oct 5, 2022
1 parent 2160f39 commit 1871935
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion yt-dlp-gui/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace yt_dlp_gui {
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application {
public static string CurrentVersion = "2022.10.03";
public static string CurrentVersion = "2022.10.05";
private void Application_Startup(object sender, StartupEventArgs e) {
var args = e.Args.ToList();
LoadPath();
Expand Down
2 changes: 1 addition & 1 deletion yt-dlp-gui/Views/Main.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
<controls:TextEditor Helper="Save As..." Text="{Binding TargetDisplay}"
IsReadOnly="True" WordWrap="True" Margin="0,2"/>
<Button Grid.Column="1" IsEnabled="{Binding Enable.Browser}"
Margin="4,2,2,2" Click="Button_Browser">
Margin="4,2,2,2" Click="Button_Browser" Cursor="Hand">
<TextBlock Margin="2,0,0,0" Text="Browse"/>
</Button>
</Grid>
Expand Down
6 changes: 5 additions & 1 deletion yt-dlp-gui/Views/Main.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,11 @@ public partial class Main :Window {
dialog.FileName = Path.GetFileName(Data.TargetFile);
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
Data.TargetPath = Path.GetDirectoryName(dialog.FileName);
Data.TargetName = Path.GetFileName(dialog.FileName);
if ((new string[] { ".mp4", ".webm", ".3gp" }).Any(x => Path.GetExtension(dialog.FileName).ToLower() == x)) {
Data.TargetName = Path.GetFileName(dialog.FileName);
} else {
Data.TargetName = Path.GetFileName(dialog.FileName) + ".tmp";
}
}
}
}
Expand Down

0 comments on commit 1871935

Please sign in to comment.