Skip to content

Commit

Permalink
1.9.3 Fix issue with undefined outputPath
Browse files Browse the repository at this point in the history
  • Loading branch information
bertyhell committed Jan 16, 2019
1 parent b2a8d5c commit 24f9ef8
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
Binary file modified PlaylistDownloader.exe
Binary file not shown.
Binary file modified PlaylistDownloader.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{B0011CEC-2AE2-40CF-9136-C2BD13928896}
AppName=PlaylistDownloader
AppVersion=1.8
AppVerName=PlaylistDownloader 1.8
AppVersion=1.9.3
AppVerName=PlaylistDownloader 1.9.3
AppPublisher=Taxrebel productions
AppPublisherURL=https://github.com/bertyhell/PlaylistDownloader
AppSupportURL=https://github.com/bertyhell/PlaylistDownloader
Expand Down
5 changes: 4 additions & 1 deletion PlaylistDownloader/PlaylistDownloader/DownloadWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ private void DownloaderProgressChanged(object sender, ProgressChangedEventArgs e

private void ButtonOpenFolderClick(object sender, RoutedEventArgs e)
{
Directory.CreateDirectory(_runSettings.SongsFolder);
if (!Directory.Exists(_runSettings.SongsFolder))
{
Directory.CreateDirectory(_runSettings.SongsFolder);
}
Process.Start(_runSettings.SongsFolder);
}

Expand Down
14 changes: 12 additions & 2 deletions PlaylistDownloader/PlaylistDownloader/SettingsWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,17 @@ private RunSettings InitializeRunSettings()
}
}

var outputPath = Properties.Settings.Default.OutputPath;
if (outputPath == null || outputPath == "")
{
outputPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic), "PlaylistDownloader");
}

var settings = new RunSettings
{
YoutubeDlPath = Properties.Settings.Default.YoutubeDlPath,
FfmpegPath = Properties.Settings.Default.FfmpegPath,
SongsFolder = Properties.Settings.Default.OutputPath
SongsFolder = outputPath
};

settings.IsDebug = _isDebugMode;
Expand Down Expand Up @@ -323,7 +329,11 @@ private void ButtonSearchClick(object sender, RoutedEventArgs e)

private void ButtonOpenFolderClick(object sender, RoutedEventArgs e)
{
Directory.CreateDirectory(_runSettings.SongsFolder);

if (!Directory.Exists(_runSettings.SongsFolder))
{
Directory.CreateDirectory(_runSettings.SongsFolder);
}
Process.Start(_runSettings.SongsFolder);
}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PlaylistDownloader 1.9.2
PlaylistDownloader 1.9.3
========================

Download your whole playlist with one click of a button
Expand Down

0 comments on commit 24f9ef8

Please sign in to comment.