Ezwen / bandcamp-collection-downloader

A command-line tool to automatically download all releases purchased with a Bandcamp account. The official page of the project is https://framagit.org/Ezwen/bandcamp-collection-downloader, while here this is just a mirror hosted on Github.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSON parse error with Jsoup causing Unterminated string error with Gson

jeyalee opened this issue · comments

Hi!
So I tested with my bandcamp collection and kept getting com.google.gson.stream.MalformedJsonException: Unterminated string error. I tracked it down to this specific title that was causing the issue.

{"file": {"mp3-v0":"https://bandcamp.com/stream_redirect?enc=mp3-v0&track_id=29128347&ts=1600090813&t=c21a41cbc124d5fdc21d23b2a802655368fc5ccb"},"title":"増>>>>減<<<

I updated the connect method to return a Connection.Response? and then passed the body() to Gson and everything was working as expected. I have the PR ready.

commented

Fixed by #12