cooperhammond / irs

:guitar: :notes: A music downloader that understands your metadata needs.
MIT License
381 stars 26 forks source link

fix #72: Find the JSON data inside the line and trim the rest #73

Closed luca-schlecker closed 3 years ago

luca-schlecker commented 3 years ago

The line containing the JSON data doesn't end with it so it has to be trimmed. My fix searches for the closing </script> tag marking the end of the data and parsing the substring to JSON instead. I also added a rescue statement so users don't see a crazy error message when something with that changes but instead they see the friendlier submit a bug message.

Signed-off-by: Luca Schlecker luca.schlecker@hotmail.com

cooperhammond commented 3 years ago

Just looking through this as you pushed your latest commit, looks absolutely wonderful Luca. LMK when you're done with this PR (or open a new one for new features) so I can merge it.

luca-schlecker commented 3 years ago

This fix should be ready to merge if approved. I am looking to ready a feature so the user can decide how his mp3s are saved, should be ready soon.

cooperhammond commented 3 years ago

If you wouldn't mind opening separate pull requests for each feature, that would be wonderful. I totally understand that some build off each other though, so no worries if you feel it's simpler to keep them all together locally.