Skip to content

Commit

Permalink
Merge branch 'release-0.2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Otiel committed Dec 1, 2018
2 parents 087e91c + 776eb76 commit f72c94c
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 14 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# 0.2.1.0

_Notes to upgraders:_

* The settings file format has changed, so some of your settings may be reset.

## New features

* Added an option to empty tags from the downloaded files.
* Added an option to disable checking for updates at startup.
* Added a button to check for updates.

## Improvements

* Various UI improvements.
* Log file will be archived to `BandcampDownloader.0.log` if its size exceed 1MB. Only one archive log file will be kept.
* Updated dependencies to their latest version.

## Bug fixes

* After selecting a folder via the "Browse" button, the placeholders were lost. The default placeholders will now be added back.

# 0.2.0.0

_Notes to upgraders:_
Expand Down
Binary file added Docs/Cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/DownloadButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ![Logo](https://i.imgur.com/S6AZHOg.png) Bandcamp Downloader
# ![Logo](Docs\Cloud.png) Bandcamp Downloader

[![Download](https://i.imgur.com/UjPs7Sr.png)](https://github.com/Otiel/BandcampDownloader/releases/latest)
[![Download](Docs\DownloadButton.png)](https://github.com/Otiel/BandcampDownloader/releases/latest)

## Description

Expand All @@ -21,15 +21,15 @@ _BandcampDownloader_ is a Windows application written in C# (targeting .NET Fram

## Screenshot

![Screenshot](https://i.imgur.com/1CVdvjV.png)
![Screenshot](Docs\Screenshot.png)

## Release notes

See the [changelog](https://github.com/Otiel/BandcampDownloader/blob/master/CHANGELOG.md).
See the [changelog](CHANGELOG.md).

## License

_BandcampDownloader_ is licensed under the MIT license - see the [LICENSE](https://github.com/Otiel/BandcampDownloader/blob/master/LICENSE) file for details.
_BandcampDownloader_ is licensed under the MIT license - see the [LICENSE](LICENSE) file for details.

## Credits

Expand Down
8 changes: 8 additions & 0 deletions Sources/BandcampDownloader/Miscellaneous/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
namespace BandcampDownloader {

internal static class Constants {
/// <summary>
/// The version number of BandcampDownloader.
/// </summary>
public static readonly String AppVersion = Assembly.GetEntryAssembly().GetName().Version.ToString();
/// <summary>
/// The URL redirecting to the latest release on GitHub.
/// </summary>
Expand All @@ -14,6 +18,10 @@ internal static class Constants {
/// </summary>
public static readonly String LogFilePath = Directory.GetParent(Assembly.GetExecutingAssembly().Location) + @"\BandcampDownloader.log";
/// <summary>
/// The log file maximum size in bytes.
/// </summary>
public static readonly long MaxLogSize = 1024 * 1024;
/// <summary>
/// The website URL of BandcampDownloader.
/// </summary>
public static readonly String ProjectWebsite = "https://github.com/Otiel/BandcampDownloader";
Expand Down
4 changes: 2 additions & 2 deletions Sources/BandcampDownloader/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
// 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.*")]
[assembly: AssemblyVersion("0.2.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
[assembly: AssemblyVersion("0.2.1.0")]
[assembly: AssemblyFileVersion("0.2.1.0")]
[assembly: GuidAttribute("8C171C7F-9BAC-4EC0-A287-59908B48953F")]
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@
</TextBlock>
</CheckBox.ToolTip>
</CheckBox>
<Button
x:Name="buttonCheckForUpdates"
Width="80"
Height="20"
Margin="188,1,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Click="ButtonCheckForUpdates_Click"
Content="Check _now"
IsDefault="True"
TabIndex="1" />
<CheckBox
x:Name="checkBoxVerboseLog"
Height="16"
Expand All @@ -36,7 +47,7 @@
VerticalAlignment="Top"
Content="Show _verbose log"
IsChecked="{Binding ShowVerboseLog, UpdateSourceTrigger=Explicit}"
TabIndex="1"
TabIndex="2"
ToolTip="If checked, more information will be shown on the log."
ToolTipService.ShowDuration="60000" />
<Label
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Windows.Controls;
using System;
using System.Diagnostics;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;

namespace BandcampDownloader {

Expand Down Expand Up @@ -26,5 +30,30 @@ public void SaveSettings() {
checkBoxCheckForUpdates.GetBindingExpression(CheckBox.IsCheckedProperty).UpdateSource();
checkBoxVerboseLog.GetBindingExpression(CheckBox.IsCheckedProperty).UpdateSource();
}

private void ButtonCheckForUpdates_Click(object sender, RoutedEventArgs e) {
Version latestVersion = null;
try {
latestVersion = UpdatesHelper.GetLatestVersion();
} catch (CouldNotCheckForUpdatesException) {
MessageBox.Show("An error occured while checking for updates. Please retry later.", "Bandcamp Downloader", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}

Version currentVersion = Assembly.GetExecutingAssembly().GetName().Version;
if (currentVersion.CompareTo(latestVersion) < 0) {
// The latest version is newer than the current one
String msgBoxText =
"A new version is available:" + Environment.NewLine +
"Current version = " + currentVersion + Environment.NewLine +
"Latest version = " + latestVersion + Environment.NewLine + Environment.NewLine +
"Would you like to go to the project website in order to download the latest version?";
if (MessageBox.Show(msgBoxText, "Bandcamp Downloader", MessageBoxButton.YesNo, MessageBoxImage.Information, MessageBoxResult.Yes) == MessageBoxResult.Yes) {
Process.Start(Constants.ProjectWebsite);
}
} else {
MessageBox.Show("You already have the latest version available (" + currentVersion + ").", "Bandcamp Downloader", MessageBoxButton.OK, MessageBoxImage.Information);
}
}
}
}
8 changes: 6 additions & 2 deletions Sources/BandcampDownloader/Windows/WindowMain.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,16 @@
Margin="0"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Content="v0.0.0.0"
Content="{Binding Source={x:Static local:Constants.AppVersion}}"
Cursor="Hand"
Foreground="#FF003BFF"
MouseDown="LabelVersion_MouseDown">
MouseDown="LabelVersion_MouseDown"
ToolTipService.ShowDuration="60000">
<Label.ToolTip>
<TextBlock>
<Run Text="BandcampDownloader version" />
<Run Text="{Binding Source={x:Static local:Constants.AppVersion}, Mode=OneWay}" />
<Run Text="&#xA;&#xA;" />
<Run Text="Click to go to official project website: &#xA;" />
<Run Text="{Binding Source={x:Static local:Constants.ProjectWebsite}, Mode=OneWay}" />
</TextBlock>
Expand Down
6 changes: 3 additions & 3 deletions Sources/BandcampDownloader/Windows/WindowMain.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ public WindowMain() {
// Hints
textBoxUrls.Text = Constants.UrlsHint;
textBoxUrls.Foreground = new SolidColorBrush(Colors.DarkGray);
// Version
labelVersion.Content = Assembly.GetEntryAssembly().GetName().Version;
// Check for updates
if (App.UserSettings.CheckForUpdates) {
Task.Factory.StartNew(() => { CheckForUpdates(); });
Expand Down Expand Up @@ -596,7 +594,9 @@ private List<TrackFile> GetFilesToDownload(List<Album> albums, Boolean downloadC
private void InitializeLogger() {
var fileTarget = new FileTarget() {
FileName = Constants.LogFilePath,
Layout = "${longdate} ${level:uppercase=true:padding=-5:padCharacter= } ${message}"
Layout = "${longdate} ${level:uppercase=true:padding=-5:padCharacter= } ${message}",
ArchiveAboveSize = Constants.MaxLogSize,
MaxArchiveFiles = 1,
};

var config = new LoggingConfiguration();
Expand Down

0 comments on commit f72c94c

Please sign in to comment.