-
Notifications
You must be signed in to change notification settings - Fork 5
Adjust leadout when reading embedded flac cuesheet #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
base: main
Are you sure you want to change the base?
Conversation
The Musicbrainz lookup code adds the pregap to the leadout, so to get
proper results when looking up embedded flac cuesheets generated with
--wholedisk we need to subtract the pregap from the leadout.
With this change I tried 3 different disks that failed to do the MB
lookup with an embedded FLAC cuesheet, and they all worked. To generate
the proper embedded cusheet the following options were used:
MKCUE=abcde.mkcue
MKCUEOPTS=--wholedisk
CUEREADERSYNTAX=abcde.mkcue
|
It's been a long time since I looked at wholedisk/one-track rips and I have only used the default, external mkcue but this patch looks ok to me. As I read do_discid, this patch should only be called when the source is a flac. |
|
Your patch seems be trying to fix the same thing as this: Pregap breaks Musicbrainz disc id calculation Does that help you too? I'm happy to apply whichever you recommend. |
I already posted the configuration: My command-line is
Here's a sample TOC; note that track #1 starts at 182 instead of 150. https://musicbrainz.org/cdtoc/JoPf8PMpkxndWD.J7gSZ7NXmuXs- It's relatively rare; I have 191 CDs ripped to FLAC and 7 of them have this issue. Note that without |
That looks substantially similar to my fix; I'll have to try it tonight. |
|
Two weeks after I said I would test it, I did. The fix from johnlane/abcde@9ba1424 also works with my two test discs. I'm clearly biased, but I think the place where I put the fix is better since it happens at the point of reading the cue from the flac file. John's fix does it later on in the process. From my point of view, it's the difference between "Calculate the correct numbers" (my fix) and "Check if the numbers come from a known source that generates the wrong numbers and fix them up" (John's fix). Matthias König posted the patch in John's repository to the mailing list in 2018 Mine was posted 3 years later So Matthias' patch has been around longer if that matters to the decision. |
Tl;DR: Makes it possible to do properly do musicbrainz lookups on flacs with embedded cues that have non-standard pregaps
Very slightly longer description:
abcde.mkcueand--wholediskthe musicbrainz lookup will fail for all discs.--wholediskthen any disc with a pregap other than 150 frames will also fail the musicbrainz lookup--wholedisk(including 3 discs I tried with non-standard pregaps)More details:
--wholediskwe need to subtract the pregap from the leadout.--wholediskand confirmed that this did not affect the musicbrainz ID generated, so this change should affect nobody using the default options.To generate the proper embedded cusheet the following options were used: