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

M4B entering ASIN as Id to identify forces chapter matching #21

Open
SenorSmartyPants opened this issue May 21, 2022 · 4 comments
Open
Labels
Blocked On Upstream Blocked on changes to Beets

Comments

@SenorSmartyPants
Copy link
Contributor

I'm using ASIN to identify an M4B during (re)import in my testing. I'm trying ASIN after beets-audible finds the wrong match because of beetbox/beets#4299 . B-A pulls the right data, but then tries to do a chapter match against the single M4B file and the full chapter list. Setting match_chapters: no doesn't change this behavior.

Correcting tags from:
    Trevor Noah - Born a Crime
To:
    None - Study Guide: Born a Crime by Trevor Noah (SuperSummary)
(Similarity: 51.5%) (artist, album, year, label) (Audible, 2020, SuperSummary)
Apply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates? i
Enter release ID: B01IW9TQPK
Tagging Trevor Noah - Born a Crime
Searching for album ID: B01IW9TQPK
Requesting MusicBrainz release B01IW9TQPK
Invalid MBID (B01IW9TQPK).
audible: Searching for book B01IW9TQPK
Sending event: albuminfo_received
Candidate: Trevor Noah - Born a Crime (None)
Computing track assignment...
...done.
Success. Distance: 0.64
Evaluating 1 candidates.
Sending event: before_choose_candidate
Tagging:
    Trevor Noah - Born a Crime
(Similarity: 36.1%) (missing tracks, tracks) (Audible, 2016, Audible Studios)
 * Born a Crime: Stories from a South African Childhood (524:47) ->
   Opening Credits (1:26) (title, length)
Missing tracks (21/22 - 95.5%):
 ! Part I                                                                                                                       (# 2) (2:27)
 ! 1. Run                                                                                                                       (# 3) (31:07)
 ! 2. Born a Crime                                                                                                              (# 4) (24:29)
 ! 3. Trevor, Pray                                                                                                              (# 5) (30:51)
 ! 4. Chameleon                                                                                                                 (# 6) (22:13)
 ! 5. The Second Girl                                                                                                           (# 7) (27:38)
 ! 6. Loopholes                                                                                                                 (# 8) (30:33)
 ! 7. Fufi                                                                                                                      (# 9) (12:03)
 ! 8. Robert                                                                                                                    (#10) (17:53)
 ! Part II                                                                                                                      (#11) (2:23)
 ! 9. The Mulberry Tree                                                                                                         (#12) (22:28)
 ! 10. A Young Man’s Long, Awkward, Occasionally Tragic, and Frequently Humiliating Education in Affairs of the Heart, Part I   (#13) (10:49)
 ! 11. Outsider                                                                                                                 (#14) (9:39)
 ! 12. A Young Man’s Long, Awkward, Occasionally Tragic, and Frequently Humiliating Education in Affairs of the Heart, Part II  (#15) (13:23)
 ! 13. Colorblind                                                                                                               (#16) (15:58)
 ! 14. A Young Man’s Long, Awkward, Occasionally Tragic, and Frequently Humiliating Education in Affairs of the Heart, Part III (#17) (36:00)
 ! Part III                                                                                                                     (#18) (1:17)
 ! 15. Go Hitler!                                                                                                               (#19) (34:19)
 ! 16. The Cheese Boys                                                                                                          (#20) (49:59)
 ! 17. The World Doesn’t Love You                                                                                               (#21) (39:39)
 ! 18. My Mother’s Life                                                                                                         (#22) (88:10)
@Neurrone
Copy link
Owner

The match_chapters setting isn't meant to fix this, because that only controls what happens when the number of files is the same as the number of chapters.

I suspect this is caused by the plugin not triggering its logic to replace the list of returned chapters from Audible (e.g, 20 chapters) to a single chapter, which is the workaround that I've found to allow it to support m4b files with chapter markers.

See how the is_likely_match variable is computed. I suspect you can get this to work by manually setting the author and album names to better match the book you're trying to tag.

@SenorSmartyPants
Copy link
Contributor Author

SenorSmartyPants commented May 22, 2022

I think you are right that part of problem is is_likely_match . The thing about changing author and album name is that I'm trying to re-import beet import -I . an M4B that was already tagged with beets-audible. This M4B has a subtitle. I haven't check the source yet, but I'm assuming album is just compared to album. But B-A should probably join album and subtitle and compare that to the album/title returned.

That way instead of the current comparison of
Born a Crime != Born a Crime: Stories from a South African Childhood
it would be
Born a Crime: Stories from a South African Childhood == Born a Crime: Stories from a South African Childhood

Or perhaps the distance calc needs to be updated to consider subtitle in existing metadata.

@SenorSmartyPants
Copy link
Contributor Author

This may be another instance of merge candidates. The last candidate is the one being matched. I also checked and I'm running the LSIO night docker image, so I should be using beets github head which I thought might have the fix for this.... but perhaps not.

Tagging Trevor Noah - Born a Crime
No album ID found.
Search terms: Trevor Noah - Born a Crime
Album might be VA: False
audible: Searching Audible for Born a Crime Trevor Noah
audible: Matching album name born a crime with book title born a crime
audible: Attempting to match book: album Born a Crime with 1 files to book Born a Crime with 22 chapters.
audible: Matching album name born a crime with book title born a crime
audible: Attempting to match book: album Born a Crime with 1 files to book Born a Crime with 22 chapters.
audible: Matching album name born a crime with book title summary analysis and review of trevor noahs born a crime stories from a south african childhood
audible: Attempting to match book: album Born a Crime with 1 files to book Summary, Analysis, and Review of Trevor Noah's Born a Crime: Stories from a South African Childhood with 10 chapters.
audible: Matching album name born a crime with book title analysis of trevor noahs born a crime
audible: Attempting to match book: album Born a Crime with 1 files to book Analysis of Trevor Noah’s Born a Crime with 8 chapters.
audible: Matching album name born a crime with book title prohibido nacer born a crime
audible: Attempting to match book: album Born a Crime with 1 files to book Prohibido nacer [Born a Crime] with 24 chapters.
audible: Matching album name born a crime with book title study guide born a crime by trevor noah supersummary
audible: Attempting to match book: album Born a Crime with 1 files to book Study Guide: Born a Crime by Trevor Noah (SuperSummary) with 30 chapters.
Sending event: albuminfo_received
Candidate: Trevor Noah - Born a Crime (None)
Computing track assignment...
...done.
Success. Distance: 0.00
Sending event: albuminfo_received
Candidate: Trevor Noah - Born a Crime (None)
Computing track assignment...
...done.
Success. Distance: 0.04
Sending event: albuminfo_received
Candidate: Start Publishing Notes - Summary, Analysis, and Review of Trevor Noah's Born a Crime: Stories from a South African Childhood (None)
Computing track assignment...
...done.
Success. Distance: 0.45
Sending event: albuminfo_received
Candidate: Milkyway Media - Analysis of Trevor Noah’s Born a Crime (None)
Computing track assignment...
...done.
Success. Distance: 0.48
Sending event: albuminfo_received
Candidate: Trevor Noah - Prohibido nacer [Born a Crime] (None)
Computing track assignment...
...done.
Success. Distance: 0.22
Sending event: albuminfo_received
Candidate: SuperSummary - Study Guide: Born a Crime by Trevor Noah (SuperSummary) (None)
Computing track assignment...
...done.
Success. Distance: 0.49
Evaluating 1 candidates.

/storage/media/Audiobooks/Trevor Noah/Born a Crime (1 items)
Sending event: import_task_before_choice
Sending event: before_choose_candidate
Correcting tags from:
    Trevor Noah - Born a Crime
To:
    None - Study Guide: Born a Crime by Trevor Noah (SuperSummary)
(Similarity: 51.5%) (artist, album, year, label) (Audible, 2020, SuperSummary)

@Neurrone
Copy link
Owner

Yeah, this looks like a problem with merged candidates and I can't think of anything that can be done in this plugin to prevent these sorts of issues till the fix is released upstream.

@Neurrone Neurrone added the Blocked On Upstream Blocked on changes to Beets label May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked On Upstream Blocked on changes to Beets
Projects
None yet
Development

No branches or pull requests

2 participants