Skip to content

Commit

Permalink
Merge branch 'release-0.2.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Otiel committed Apr 17, 2019
2 parents e54ea23 + fe57e02 commit 65814af
Show file tree
Hide file tree
Showing 31 changed files with 934 additions and 292 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# 0.2.7.0

## New features

* Added an option to customize the cover art file name. [#77](https://github.com/Otiel/BandcampDownloader/issues/77)
* Added german localization. Thanks **@Simonwep** for the complete translation! [#78](https://github.com/Otiel/BandcampDownloader/pull/78)
* Added link to the translation [guidelines](/docs/help-translate.md) next to the language setting.

## Improvements

* The English name of any language is now displayed next to the local language name in settings.
* The track file name setting is now checked and must have the _mp3_ extension. [#80](https://github.com/Otiel/BandcampDownloader/issues/80)
* The proxy port setting is now checked and must be an integer.

# Bug fixes

* Minor bug fixes relative to the UI.

# 0.2.6.0

## New features
Expand Down
2 changes: 1 addition & 1 deletion docs/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ BandcampDownloader relies on a number of open-source libraries, all listed below
* [`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.
* [`TagLib#`](https://github.com/mono/taglib-sharp): used to save ID3 tags in MP3 files.
* [`WPFLocalizationExtension`](https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension): used to manage the localization.
* [`XAMLMarkupExtensions`](https://github.com/XAMLMarkupExtensions/XAMLMarkupExtensions): required by `WpfLocalizeExtension`.
4 changes: 2 additions & 2 deletions docs/new-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +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. Compute hashes (MD5, SHA-1...) for the files.
4. Compute checksums (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.
* Add the checksums to the description of the release.
* Attach the _zip_ file.
6. Publish the release!
2 changes: 2 additions & 0 deletions src/BandcampDownloader/BandcampDownloader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
<Compile Include="Helpers\TagHelper.cs" />
<Compile Include="Helpers\UpdatesHelper.cs" />
<Compile Include="UI\Validation\DoubleRule.cs" />
<Compile Include="UI\Validation\Mp3ExtensionRule.cs" />
<Compile Include="Model\DownloadProgress.cs" />
<Compile Include="Helpers\EnumerationExtension.cs" />
<Compile Include="Helpers\Exceptions.cs" />
Expand Down Expand Up @@ -236,6 +237,7 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.de.resx" />
<EmbeddedResource Include="Properties\Resources.fr.resx">
<LastGenOutput>Resources.fr.Designer.cs</LastGenOutput>
</EmbeddedResource>
Expand Down
4 changes: 4 additions & 0 deletions src/BandcampDownloader/Core/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ internal static class Constants {
/// </summary>
public static readonly String AppVersion = Assembly.GetEntryAssembly().GetName().Version.ToString();
/// <summary>
/// The URL redirecting to the help page on translating the app on GitHub.
/// </summary>
public static readonly String HelpTranslateWebsite = "https://github.com/Otiel/BandcampDownloader/blob/master/docs/help-translate.md";
/// <summary>
/// The URL redirecting to the latest release on GitHub.
/// </summary>
public static readonly String LatestReleaseWebsite = "https://github.com/Otiel/BandcampDownloader/releases/latest";
Expand Down
9 changes: 7 additions & 2 deletions src/BandcampDownloader/Core/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ namespace BandcampDownloader {
public enum Language {
[Description("English")]
en,
[Description("Français")]
fr
[Description("Français (French)")]
fr,
[Description("Deutsch (German)")]
de
}

public enum ProxyType {
Expand Down Expand Up @@ -41,6 +43,9 @@ public interface IUserSettings {
[Option(DefaultValue = true)]
Boolean CheckForUpdates { get; set; }

[Option(DefaultValue = "{album}")]
String CoverArtFileNameFormat { get; set; }

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

Expand Down
2 changes: 1 addition & 1 deletion src/BandcampDownloader/Helpers/BandcampHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static Album GetAlbum(String htmlCode) {
}

// Extract lyrics from album page
HtmlDocument htmlDoc = new HtmlDocument();
var htmlDoc = new HtmlDocument();
htmlDoc.LoadHtml(htmlCode);
foreach (Track track in album.Tracks) {
HtmlNode lyricsElement = htmlDoc.GetElementbyId("_lyrics_" + track.Number);
Expand Down
6 changes: 3 additions & 3 deletions src/BandcampDownloader/Helpers/EnumerationExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private set {
if (_enumType == value) {
return;
}
var underlyingType = Nullable.GetUnderlyingType(value) ?? value;
Type underlyingType = Nullable.GetUnderlyingType(value) ?? value;
if (!underlyingType.IsEnum) {
throw new ArgumentException("Type must be an Enum.");
}
Expand All @@ -35,8 +35,8 @@ public EnumerationExtension(Type enumType) {
}

public override Object ProvideValue(IServiceProvider serviceProvider) {
var enumValues = Enum.GetValues(EnumType);
var enumerationMembers = (
Array enumValues = Enum.GetValues(EnumType);
EnumerationMember[] enumerationMembers = (
from Object enumValue in enumValues
select new EnumerationMember {
Value = enumValue,
Expand Down
2 changes: 1 addition & 1 deletion src/BandcampDownloader/Helpers/FileHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal static class FileHelper {
/// size.</param>
/// <returns>The size of the file located at the provided URL.</returns>
public static long GetFileSize(String url, String protocolMethod) {
var webRequest = HttpWebRequest.Create(url);
WebRequest webRequest = HttpWebRequest.Create(url);
webRequest.Method = protocolMethod;
long fileSize;
try {
Expand Down
6 changes: 3 additions & 3 deletions src/BandcampDownloader/Helpers/UpdatesHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public static Version GetLatestVersion() {
// Note: GitHub uses a HTTP redirect to redirect from the generic latest release page to the actual latest release page

// Retrieve the redirect page from the GitHub latest release page
HttpWebRequest request = HttpWebRequest.CreateHttp(Constants.LatestReleaseWebsite);
var request = HttpWebRequest.CreateHttp(Constants.LatestReleaseWebsite);
request.AllowAutoRedirect = false;
String redirectPage = "";
try {
using (HttpWebResponse response = (HttpWebResponse) request.GetResponse()) {
using (var response = (HttpWebResponse) request.GetResponse()) {
redirectPage = response.GetResponseHeader("Location");
// redirectPage should be like "https://github.com/Otiel/BandcampDownloader/releases/tag/vX.X.X.X"
}
Expand All @@ -25,7 +25,7 @@ public static Version GetLatestVersion() {
}

// Extract the version number from the URL
String latestVersionNumber = "";
String latestVersionNumber;
try {
latestVersionNumber = redirectPage.Substring(redirectPage.LastIndexOf("/v") + 2); // X.X.X.X
} catch {
Expand Down
6 changes: 3 additions & 3 deletions src/BandcampDownloader/Model/TrackFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ internal class TrackFile {
public String Url { get; set; }

public TrackFile(String url, long bytesReceived, long size) {
this.Url = url;
this.BytesReceived = bytesReceived;
this.Size = size;
Url = url;
BytesReceived = bytesReceived;
Size = size;
}
}
}
4 changes: 2 additions & 2 deletions src/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.6.0")]
[assembly: AssemblyFileVersion("0.2.6.0")]
[assembly: AssemblyVersion("0.2.7.0")]
[assembly: AssemblyFileVersion("0.2.7.0")]
[assembly: GuidAttribute("8C171C7F-9BAC-4EC0-A287-59908B48953F")]
32 changes: 31 additions & 1 deletion src/BandcampDownloader/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 65814af

Please sign in to comment.