Multiple Bandcamp-related improvements #39
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi again! 😄
I'd like to propose a few more changes I made to the Bandcamp scraper.
Sorry in advance for changing so many things in a single commit. 😅 My commit's description briefly explains what I did. I'll try to detail just a couple of things without making this comment too long.
All improvements related to orphan tracks (tracks without an album) can be checked by trying to download stuff from https://deartracks.bandcamp.com/ (has a 1-song album, a 2-song album and an orphan track)
The regex for "all_albums" didn't retrieve orphan tracks from a /music page. It now does.
Without some of my fixes, here's how the audio tags looked like for certain songs:
Notice the audio tags automatically added by Bandcamp still exist (comment, artist, cover art).
They are now removed before we add stuff manually.
Also, the song title ("TIT2") and the album name ("TALB") are the same. This was actually because Bandcamp's JSON contains these values. This is now fixed by using regex to scrape the album name correctly (and "TALB" is not set at all if it's an orphan track).
If you need more details about any changes, just ask.
Best regards,
Antonio