-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support standalone Bandcamp tracks #7
Conversation
throw new ProviderError(this.provider.name, `${specifier} is not a release URL`); | ||
} | ||
this.lookup = { method: 'id', value: entity.id }; | ||
this.id = entity.id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assigned the id
here so that I could access it in getRawRelease
. Is the assignment in convertRawRelease
still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, no idea why I haven't made this assignment in the constructor right from the start 😇
Looks like this is worth to be changed in all provider implementations.
a9a1c11
to
6f4dead
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I am surprised how few changes are necessary to support seeding releases for track pages as well.
throw new ProviderError(this.provider.name, `${specifier} is not a release URL`); | ||
} | ||
this.lookup = { method: 'id', value: entity.id }; | ||
this.id = entity.id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, no idea why I haven't made this assignment in the constructor right from the start 😇
Looks like this is worth to be changed in all provider implementations.
bea9be8
to
3c799be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a final round of minor nitpicks 🧐
Some `/track/` URLs on Bandcamp represent singles (often with their own cover art) that aren't otherwise released as part of an album. It seems you can distinguish these from album tracks by checking `TrAlbumCurrent.album_id`, which is `null` for tracks without an associated album. (Perhaps there is another, more obvious way that I missed.)
Bandcamp `/track/` URLs may include an ISRC in `TrAlbumCurrent`.
Handle `null` and missing values for release date, GTIN and track number.
The original thought was not to seed edit notes with localhost URLs, but this can also happen with a local production server, not only with a development server. It is rather useful being able to check the permalinks in development.
Some
/track/
URLs on Bandcamp represent singles (often with their own cover art) that aren't otherwise released as part of an album.It seems you can distinguish these from album tracks by checking
TrAlbumCurrent.album_id
, which isnull
for tracks without an associated album. (Perhaps there is another, more obvious way that I missed.)In the second commit, I was able to extract an ISRC for these tracks where available. (Apparently Bandcamp only embeds ISRCs on track pages, not album pages?)
This is probably very hacky since I was still trying to wrap my head around the codebase, but I'm happy to improve it.
A few URLs I tested with: