Skip to content

Commit

Permalink
Merge branch 'release-0.2.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Otiel committed Apr 10, 2019
2 parents f60d917 + 9edeeeb commit 32fceca
Show file tree
Hide file tree
Showing 26 changed files with 2,584 additions and 557 deletions.
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.2.6.0

## New features

* Added localization [#67](https://github.com/Otiel/BandcampDownloader/issues/67) for english and french. If you wish to help translate the application in another language, please see the [guidelines](/docs/help-translate.md).

# 0.2.5.0

## Improvements
Expand All @@ -7,15 +13,15 @@

# 0.2.4.2

## Improvements

* Updated dependencies to their latest version.

## Bug fixes

* Fixed issue [#75](https://github.com/Otiel/BandcampDownloader/issues/75) that would prevent downloading tracks with a name with less than 3 characters.
* Fixed exponential back-off mechanism that was inactive for artwork files.

## Improvements

* Updated dependencies to their latest version.

# 0.2.4.1

## Bug fixes
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Description

BandcampDownloader is a Windows application that helps downloading albums from [bandcamp.com](https://bandcamp.com) by retrieving the 128 kbps MP3 files streamed on the website. Its goal isn't to pirate albums, but simply to make life easier for those who prefer to listen to music on their favorite player.
BandcampDownloader is a Windows application that helps downloading albums from [bandcamp.com](https://bandcamp.com) by retrieving the 128 kbps MP3 files streamed on the website. It aims to ease the life of those who prefer to listen to music on their favorite player rather than on their web browser, but offers only what is already freely available on Bandcamp.

## Features

Expand All @@ -21,8 +21,6 @@ BandcampDownloader is a Windows application that helps downloading albums from [
* Resize it,
* Save it in tracks tags and in folder.

## Screenshot

<p align="center">
<img alt="Screenshot" src="docs/images/Screenshot.png">
</p>
Expand All @@ -31,6 +29,10 @@ BandcampDownloader is a Windows application that helps downloading albums from [

See the [changelog](CHANGELOG.md).

## Contributing

If you wish to help translate the application, please read the [guidelines](/docs/help-translate.md).

## License

BandcampDownloader is licensed under the MIT license - see the [LICENSE](LICENSE) file for details.
Expand All @@ -39,6 +41,8 @@ BandcampDownloader is licensed under the MIT license - see the [LICENSE](LICENSE

Some icons by [Yusuke Kamiyamane](http://p.yusukekamiyamane.com) licensed under a [Creative Commons Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0).

The list of open-source libraries used by BandcampDownloader can be found [here](docs/dependencies.md).

## Piracy

You'll do what you want to do with this app, but remember to buy albums from your favorite artists if you want to support them!
Expand Down
17 changes: 17 additions & 0 deletions docs/dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Dependencies

BandcampDownloader relies on a number of open-source libraries, all listed below:

* [`Castle.Core`](https://github.com/castleproject/Core): required by `Config.Net`.
* [`Config.Net`](https://github.com/aloneguid/config): used to manage the application configuration file.
* [`Costura`](https://github.com/Fody/Costura): used to embed dependencies (_*.dll_) files in the main _exe_ file.
* [`Fody`](https://github.com/Fody/Fody): required by `Costura`.
* [`HtmlAgilityPack`](https://github.com/zzzprojects/html-agility-pack): used to parse Html from bandcamp.com pages.
* [`ImageResizer`](https://github.com/imazen/resizer): used to resize/compress the album covers.
* [`Json.NET`](https://github.com/JamesNK/Newtonsoft.Json): used to parse Json from bandcamp.com pages.
* [`MessageBoxManager`](https://www.codeproject.com/Articles/18399/Localizing-System-MessageBox): used to localize the buttons of the Windows system message box.
* [`NLog`](https://github.com/NLog/NLog): used to log events.
* [`Resource.Embedder`](https://github.com/MarcStan/Resource.Embedder): used to embed localization resources (_*.resources.dll_) in the main _exe_ file (not supported by `Costura`).
* [`TagLib#`](https://github.com/mono/taglib-sharp): used to write MP3 tags.
* [`WPFLocalizationExtension`](https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension): used to manage the localization.
* [`XAMLMarkupExtensions`](https://github.com/XAMLMarkupExtensions/XAMLMarkupExtensions): required by `WpfLocalizeExtension`.
23 changes: 23 additions & 0 deletions docs/help-translate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Help translate

If you wish to help translate the application, the following should get you started.

## Edit translation files

Translations are stored in resources (_resx_) files, one file per language. As of today, the following translations exist:
* English: [_Resources.resx_](/src/BandcampDownloader/Properties/Resources.resx)
* French: [_Resources.fr.resx_](/src/BandcampDownloader/Properties/Resources.fr.resx)

In order to modify the translations, you can either edit the files with your favorite text editor, or use a tool such as [Zeta Resource Editor](https://www.zeta-resource-editor.com).

If you wish to create a new language file, simply duplicate the English file (_Resources.resx_) in the same place and rename it using the correct [culture code](https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo?view=netframework-4.7.2#culture-names-and-identifiers) (for instance: _Resources.fr.resx_, _Resources.fr-CA.resx_...):

>The name is a combination of an [ISO 639 two-letter](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) lowercase culture code associated with a language and an ISO 3166 two-letter uppercase subculture code associated with a country or region.
## Submit changes

Once you're done, commit your changes on a new branch and create a pull request.

## Closing

If you're not sure of the translation by lack of context for instance, don't hesitate to open a [new issue](https://github.com/Otiel/BandcampDownloader/issues/new) and ask. Any effort will be appreciated, even if you cannot provide a complete translated file. **Thanks in advance for your help!**
6 changes: 4 additions & 2 deletions docs/new-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ This repository follows [git flow](https://nvie.com/posts/a-successful-git-branc
1. On Visual Studio, set the Solution Configuration to "Release".
2. Build the solution.
3. Create a new _zip_ archive containing the necessary files created under `src\BandcampDownloader\bin\Release`.
4. Draft a new [release](https://github.com/Otiel/BandcampDownloader/releases) on GitHub:
4. Compute hashes (MD5, SHA-1...) for the files.
5. Draft a new [release](https://github.com/Otiel/BandcampDownloader/releases) on GitHub:
* Choose the newly created tag (if you forgot to push it, now's the time to do it).
* Set the title equal to `X.Y.Z`.
* Copy-paste the changes from `CHANGELOG.md`.
* Add the hashes to the description.
* Attach the _zip_ file.
5. Publish the release!
6. Publish the release!
19 changes: 19 additions & 0 deletions src/BandcampDownloader/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
using System;
using System.Globalization;
using System.Windows;
using Config.Net;
using WPFLocalizeExtension.Engine;

namespace BandcampDownloader {

public partial class App: Application {

/// <summary>
/// The settings chosen by the user.
/// </summary>
Expand All @@ -13,6 +16,7 @@ public partial class App: Application {
protected override void OnStartup(StartupEventArgs e) {
base.OnStartup(e);
InitializeSettings();
LoadLanguage();
}

/// <summary>
Expand All @@ -26,5 +30,20 @@ private void InitializeSettings() {
App.UserSettings.DownloadsPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\{artist}\\{album}";
}
}

/// <summary>
/// Load settings for localization
/// </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();
}
}
}
26 changes: 20 additions & 6 deletions src/BandcampDownloader/BandcampDownloader.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" />
<Import Project="..\packages\Resource.Embedder.2.0.0\build\Resource.Embedder.props" Condition="Exists('..\packages\Resource.Embedder.2.0.0\build\Resource.Embedder.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand Down Expand Up @@ -79,16 +80,16 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Config.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=d836a57afd299520, processorArchitecture=MSIL">
<HintPath>..\packages\Config.Net.4.13.2\lib\net452\Config.Net.dll</HintPath>
</Reference>
<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.9.2.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.9.2\lib\Net45\HtmlAgilityPack.dll</HintPath>
<Reference Include="HtmlAgilityPack, Version=1.11.2.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.11.2\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 @@ -98,13 +99,14 @@
<HintPath>..\packages\Newtonsoft.Json.12.0.1\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.5.11\lib\net45\NLog.dll</HintPath>
<HintPath>..\packages\NLog.4.6.2\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Management" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
Expand All @@ -114,19 +116,27 @@
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="taglib-sharp">
<HintPath>..\packages\taglib.2.1.0.0\lib\taglib-sharp.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<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="XAMLMarkupExtensions, Version=1.6.0.0, Culture=neutral, PublicKeyToken=c726e0262981a1eb, processorArchitecture=MSIL">
<HintPath>..\packages\XAMLMarkupExtensions.1.6.0\lib\net452\XAMLMarkupExtensions.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Helpers\BandcampHelper.cs" />
<Compile Include="Helpers\MessageBoxManager.cs" />
<Compile Include="Model\Album.cs" />
<Compile Include="Model\TrackFile.cs" />
<Compile Include="Model\JSON\JsonAlbumData.cs" />
Expand Down Expand Up @@ -226,6 +236,9 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.fr.resx">
<LastGenOutput>Resources.fr.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
Expand Down Expand Up @@ -289,10 +302,11 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.4.0.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.0.2\build\Fody.targets'))" />
<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\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'))" />
</Target>
<Import Project="..\packages\Fody.4.0.2\build\Fody.targets" Condition="Exists('..\packages\Fody.4.0.2\build\Fody.targets')" />
<Import Project="..\packages\Fody.3.3.5\build\Fody.targets" Condition="Exists('..\packages\Fody.3.3.5\build\Fody.targets')" />
<!-- 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.
<Target Name="BeforeBuild">
Expand Down
4 changes: 0 additions & 4 deletions src/BandcampDownloader/Core/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ internal static class Constants {
/// </summary>
public static readonly String ProjectWebsite = "https://github.com/Otiel/BandcampDownloader";
/// <summary>
/// The help text displayed in the URL list textbox.
/// </summary>
public static readonly String UrlsHint = "Paste URLs of albums to download here. You can specify multiple URLs by writing one URL per line.\n\nA Bandcamp URL looks like: http://[artist].bandcamp.com/album/[album] or http://[artist].bandcamp.com/track/[track]\nPaste artist pages: http://[artist].bandcamp.com and check \"☑ Download artist discography\" to download all their albums.";
/// <summary>
/// The absolute path to the settings file.
/// </summary>
public static readonly String UserSettingsFilePath = Directory.GetParent(Assembly.GetExecutingAssembly().Location) + @"\BandcampDownloader.ini";
Expand Down
10 changes: 10 additions & 0 deletions src/BandcampDownloader/Core/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

namespace BandcampDownloader {

public enum Language {
[Description("English")]
en,
[Description("Français")]
fr
}

public enum ProxyType {
None,
System,
Expand Down Expand Up @@ -78,6 +85,9 @@ public interface IUserSettings {
[Option(DefaultValue = "{tracknum} {artist} - {title}.mp3")]
String FileNameFormat { get; set; }

[Option(DefaultValue = Language.en)]
Language Language { get; set; }

[Option(DefaultValue = true)]
Boolean ModifyTags { get; set; }

Expand Down
Loading

0 comments on commit 32fceca

Please sign in to comment.