diff --git a/CHANGELOG.md b/CHANGELOG.md index 955bcc91..0a6dc896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.3.3 + +## Bug fixes + +* Fixed the reading of Bandcamp metadata since their changes. [#153](https://github.com/Otiel/BandcampDownloader/issues/153) + # 1.3.2 ## Improvements diff --git a/src/BandcampDownloader/Helpers/BandcampHelper.cs b/src/BandcampDownloader/Helpers/BandcampHelper.cs index 8a82e3df..c773af8d 100644 --- a/src/BandcampDownloader/Helpers/BandcampHelper.cs +++ b/src/BandcampDownloader/Helpers/BandcampHelper.cs @@ -93,17 +93,20 @@ private static string FixJson(string albumData) { } private static string GetAlbumData(string htmlCode) { - string startString = "var TralbumData = {"; - string stopString = "};"; + string startString = "data-tralbum=\"{"; + string stopString = "}\""; if (htmlCode.IndexOf(startString) == -1) { // Could not find startString - throw new Exception("Could not find the following string in HTML code: var TralbumData = {"); + throw new Exception($"Could not find the following string in HTML code: {startString}"); } string albumDataTemp = htmlCode.Substring(htmlCode.IndexOf(startString) + startString.Length - 1); string albumData = albumDataTemp.Substring(0, albumDataTemp.IndexOf(stopString) + 1); + // Replace " by " + albumData = albumData.Replace(""", "\""); + return albumData; } } diff --git a/src/BandcampDownloader/Properties/AssemblyInfo.cs b/src/BandcampDownloader/Properties/AssemblyInfo.cs index cb13b66d..d3368ed2 100644 --- a/src/BandcampDownloader/Properties/AssemblyInfo.cs +++ b/src/BandcampDownloader/Properties/AssemblyInfo.cs @@ -47,6 +47,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("1.3.2")] -[assembly: AssemblyFileVersion("1.3.2")] +[assembly: AssemblyVersion("1.3.3")] +[assembly: AssemblyFileVersion("1.3.3")] [assembly: GuidAttribute("8C171C7F-9BAC-4EC0-A287-59908B48953F")] \ No newline at end of file