Skip to content
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

Don't assign ISRCs to empty track numbers (cdrdao). #18

Closed
wants to merge 3 commits into from

Conversation

Freso
Copy link
Collaborator

@Freso Freso commented Oct 13, 2012

If you have a release that stores ISRCs both on their own and in the CD-TEXT, the cdrdao parser would assign the ISRC both to the trackNumber ("[1, ISRC]"), but also to an empty track ("[None, ISRC]"). This would cause errors on line 658[1] as you cannot add type None to type Int.

[1] "track = tracks[trackNumber + trackOffset - 1]"

If you have a release that stores ISRCs both on their own and in the
CD-TEXT, the cdrdao parser would assign the ISRC both to the
trackNumber ("[1, ISRC]"), but also to an empty track ("[None, ISRC]").
This would cause errors on line 658[1] as you cannot add type None
to type Int.

[1] "track = tracks[trackNumber + trackOffset - 1]"
@ghost ghost assigned JonnyJD Oct 13, 2012
@JonnyJD JonnyJD mentioned this pull request Oct 13, 2012
@JonnyJD
Copy link
Owner

JonnyJD commented Oct 14, 2012

We don't need to sanitize the ISRCs taken from the regex, because they are always sanitized by construction.

Otherwise your changes are fine and I did an octopus merge (without your sanitization).

@JonnyJD JonnyJD closed this Oct 14, 2012
@Freso
Copy link
Collaborator Author

Freso commented Oct 14, 2012

Well, the sanitization function was just meant to be a catch-all that future ISRC corrections could be placed in as well. But sure. As long as it's working. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants