Open SenorSmartyPants opened 2 years ago
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.
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.
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)
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.
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 https://github.com/beetbox/beets/pull/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.