Skip to content

Commit

Permalink
Merge branch 'release-1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Otiel committed Jun 12, 2019
2 parents 7ebd8a0 + 4c4eab4 commit 76f2f9c
Show file tree
Hide file tree
Showing 49 changed files with 2,112 additions and 1,100 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# 1.0.0

## New features

* Added dark theme.
* Added / updated the following languages (some incomplete) thanks to contributors: English, German, Italian, Norwegian Bokmål, Polish, Spanish, Turkish, Ukrainian.

## Improvements

* Moved to [semver](https://semver.org) for versioning.
* Save crash data to the log file.
* Minor UI improvements.

## Bug fixes

* Fixed the crash occurring when an album name ends with a dot. [#102](https://github.com/Otiel/BandcampDownloader/issues/102)
* Fixed the crash occurring when the Bandcamp anti-spam mechanism was triggered. [#104](https://github.com/Otiel/BandcampDownloader/issues/104)
* Fixed the crash occurring when the user hit Cancel right after starting downloads.
* Fixed the crash occurring when clicking on a relative hyperlink on the changelog.
* Fixed a bug preventing downloads from being cancelled in some conditions.

# 0.2.10.0

## New features
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018
Copyright (c) 2019

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,26 @@ BandcampDownloader is a Windows application that helps downloading albums from [
* From album pages: `https://[artist].bandcamp.com/album/[album]`,
* From track pages: `https://[artist].bandcamp.com/track/[track]`,
* From artist pages: `https://[artist].bandcamp.com`.
* Add ID3 tags to tracks: Album, Artist, Album Artist, Title, Track number and Year.
* Save lyrics (if available) to ID3 tags.
* Download cover art and:
* Convert it to jpg,
* Resize it,
* Save it in tracks tags and in folder.
* Add ID3 tags to tracks: Album, Artist, Album Artist, Title, Track number, Year and Lyrics (if available).
* Download cover art to tags and in folder.
* Create playlist file (supported formats are: m3u, pls, wpl, zpl).
* Personalization through settings.

<p align="center">
<img alt="Screenshot" src="docs/images/Screenshot.png">
</p>

<p align="center">
<img alt="Screenshot-settings" src="docs/images/Screenshot-settings.png">
</p>

## Release notes

See the [changelog](CHANGELOG.md).

## Contributing

You can help translating the application by going to the [Weblate project](https://hosted.weblate.org/engage/bandcampdownloader).
You can help translating the application by going to the [Weblate project](https://hosted.weblate.org/engage/bandcampdownloader). See [here](docs/help-translate.md) for more info.

[![Translation status](https://hosted.weblate.org/widgets/bandcampdownloader/-/287x66-white.png)](https://hosted.weblate.org/engage/bandcampdownloader)

Expand Down
Binary file added docs/images/Screenshot-settings.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 modified docs/images/Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion src/BandcampDownloader/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,17 @@
x:Class="BandcampDownloader.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="UI/Dialogs/WindowMain.xaml" />
StartupUri="UI/Dialogs/WindowMain.xaml">
<!--
Uncomment the following to get the dark theme on VS designer
Note: SystemColors.WindowBrushKey is ignored on the the VS designer.
See https://stackoverflow.com/questions/52455097/visual-studio-wpf-designer-does-not-use-overwritten-systemcolors
-->
<!--<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes\DarkTheme.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>-->
</Application>
62 changes: 48 additions & 14 deletions src/BandcampDownloader/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System;
using System.Globalization;
using System.Windows;
using Config.Net;
using WPFLocalizeExtension.Engine;
using NLog;
using NLog.Config;
using NLog.Targets;
using WpfMessageBoxLibrary;

namespace BandcampDownloader {

Expand All @@ -19,8 +21,45 @@ public partial class App: Application {

protected override void OnStartup(StartupEventArgs e) {
base.OnStartup(e);
InitializeLogger();

// Manage unhandled exceptions
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

InitializeSettings();
LoadLanguage();
LanguageHelper.ApplyLanguage(UserSettings.Language);
ThemeHelper.ApplySkin(UserSettings.Theme);
}

private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
LogExceptionToFile((Exception) e.ExceptionObject);


var msgProperties = new WpfMessageBoxProperties() {
Button = MessageBoxButton.OK,
ButtonOkText = BandcampDownloader.Properties.Resources.messageBoxButtonOK,
Image = MessageBoxImage.Error,
Text = String.Format(BandcampDownloader.Properties.Resources.messageBoxUnhandledException, Constants.UrlIssues),
Title = "Bandcamp Downloader",
};
WpfMessageBox.Show(ref msgProperties);
}

/// <summary>
/// Initializes the logger component.
/// </summary>
private void InitializeLogger() {
var fileTarget = new FileTarget() {
FileName = Constants.LogFilePath,
Layout = "${longdate} ${level:uppercase=true:padding=-5:padCharacter= } ${message}",
ArchiveAboveSize = Constants.MaxLogSize,
MaxArchiveFiles = 1,
};

var config = new LoggingConfiguration();
config.AddRule(LogLevel.Trace, LogLevel.Fatal, fileTarget);

LogManager.Configuration = config;
}

/// <summary>
Expand All @@ -36,18 +75,13 @@ private void InitializeSettings() {
}

/// <summary>
/// Load settings for localization
/// Writes the specified Exception to the application log file.
/// </summary>
private void LoadLanguage() {
// Sets the CultureInfo according to the language saved in settings.
LocalizeDictionary.Instance.Culture = new CultureInfo(UserSettings.Language.ToString());

// Set system MessageBox buttons
MessageBoxManager.OK = BandcampDownloader.Properties.Resources.messageBoxButtonOK;
MessageBoxManager.Cancel = BandcampDownloader.Properties.Resources.messageBoxButtonCancel;
MessageBoxManager.Yes = BandcampDownloader.Properties.Resources.messageBoxButtonYes;
MessageBoxManager.No = BandcampDownloader.Properties.Resources.messageBoxButtonNo;
MessageBoxManager.Register();
/// <param name="exception">The Exception to log.</param>
private void LogExceptionToFile(Exception exception) {
Logger logger = LogManager.GetCurrentClassLogger();
logger.Log(LogLevel.Fatal, String.Format("{0} {1}", exception.GetType().ToString(), exception.Message));
logger.Log(LogLevel.Fatal, exception.StackTrace);
}
}
}
38 changes: 23 additions & 15 deletions src/BandcampDownloader/BandcampDownloader.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Resource.Embedder.2.0.0\build\Resource.Embedder.props" Condition="Exists('..\packages\Resource.Embedder.2.0.0\build\Resource.Embedder.props')" />
<Import Project="..\packages\Resource.Embedder.2.0.1\build\Resource.Embedder.props" Condition="Exists('..\packages\Resource.Embedder.2.0.1\build\Resource.Embedder.props')" />
<Import Project="..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -88,8 +88,8 @@
<Reference Include="Costura, Version=3.3.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.3.2\lib\net40\Costura.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.11.4.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.11.4\lib\Net45\HtmlAgilityPack.dll</HintPath>
<Reference Include="HtmlAgilityPack, Version=1.11.7.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.11.7\lib\Net45\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="ImageResizer, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ImageResizer.4.2.5\lib\net45\ImageResizer.dll</HintPath>
Expand All @@ -107,7 +107,7 @@
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.3\lib\net45\NLog.dll</HintPath>
<HintPath>..\packages\NLog.4.6.4\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="PlaylistsNET, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PlaylistsNET.1.0.4\lib\net45\PlaylistsNET.dll</HintPath>
Expand Down Expand Up @@ -139,6 +139,9 @@
<Reference Include="WPFLocalizeExtension, Version=3.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\WPFLocalizeExtension.3.3.1\lib\net452\WPFLocalizeExtension.dll</HintPath>
</Reference>
<Reference Include="WpfMessageBox, Version=1.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\WpfMessageBox.1.1.1\lib\net40-client\WpfMessageBox.dll</HintPath>
</Reference>
<Reference Include="XAMLMarkupExtensions, Version=1.5.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\XAMLMarkupExtensions.1.5.1\lib\net452\XAMLMarkupExtensions.dll</HintPath>
</Reference>
Expand All @@ -150,9 +153,10 @@
</ApplicationDefinition>
<Compile Include="Core\DownloadManager.cs" />
<Compile Include="Core\LogArgs.cs" />
<Compile Include="Helpers\LanguageHelper.cs" />
<Compile Include="Helpers\ThemeHelper.cs" />
<Compile Include="Model\FileType.cs" />
<Compile Include="Helpers\BandcampHelper.cs" />
<Compile Include="Helpers\MessageBoxManager.cs" />
<Compile Include="Core\PlaylistCreator.cs" />
<Compile Include="Helpers\ProxyHelper.cs" />
<Compile Include="Model\Album.cs" />
Expand All @@ -161,6 +165,7 @@
<Compile Include="Model\JSON\JsonTrack.cs" />
<Compile Include="Helpers\TagHelper.cs" />
<Compile Include="Helpers\UpdatesHelper.cs" />
<Compile Include="UI\Dialogs\Settings\IUserControlSettings.cs" />
<Compile Include="UI\Dialogs\Settings\UserControlSettingsAbout.xaml.cs">
<DependentUpon>UserControlSettingsAbout.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -219,6 +224,10 @@
<Compile Include="UI\Dialogs\Settings\WindowSettings.xaml.cs">
<DependentUpon>WindowSettings.xaml</DependentUpon>
</Compile>
<Page Include="Themes\DarkTheme.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UI\Dialogs\Settings\UserControlSettingsAdvanced.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -282,20 +291,19 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.de.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.fr.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.it.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.de.resx" />
<EmbeddedResource Include="Properties\Resources.es.resx" />
<EmbeddedResource Include="Properties\Resources.fr.resx" />
<EmbeddedResource Include="Properties\Resources.it.resx" />
<EmbeddedResource Include="Properties\Resources.nb-NO.resx" />
<EmbeddedResource Include="Properties\Resources.pl.resx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.tr.resx" />
<EmbeddedResource Include="Properties\Resources.uk.resx" />
<None Include="app.config">
<SubType>Designer</SubType>
</None>
Expand Down Expand Up @@ -367,7 +375,7 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.3.3.5\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.3.5\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props'))" />
<Error Condition="!Exists('..\packages\Resource.Embedder.2.0.0\build\Resource.Embedder.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Resource.Embedder.2.0.0\build\Resource.Embedder.props'))" />
<Error Condition="!Exists('..\packages\Resource.Embedder.2.0.1\build\Resource.Embedder.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Resource.Embedder.2.0.1\build\Resource.Embedder.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
2 changes: 1 addition & 1 deletion src/BandcampDownloader/Core/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ internal static class Constants {
/// <summary>
/// The version number of BandcampDownloader.
/// </summary>
public static readonly string AppVersion = Assembly.GetEntryAssembly().GetName().Version.ToString();
public static readonly string AppVersion = Assembly.GetEntryAssembly().GetName().Version.ToString(3);
/// <summary>
/// The absolute path to the log file.
/// </summary>
Expand Down
Loading

0 comments on commit 76f2f9c

Please sign in to comment.