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

Wishlist extraction stops and halts the whole extraction - Part 2 #34

Closed
joonaspaakko opened this issue Mar 10, 2021 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@joonaspaakko
Copy link
Owner

joonaspaakko commented Mar 10, 2021

In some cases the wishlist extraction will stop and throw this error in the browser console:

Cannot read property 'length' of null
at a.timeStringToSeconds (audible-library-extractor-content-script.js:2)
  • This error comes from the extension trying to process book length, when it's not available
    • Like if you have a pre-order in the wishlist or it just doesn't have the length for some reason.
  • This is only distantly related to Wishlist extraction stopped (Cannot read property '0' of undefined at a.fixDates) #23. Same kind of issue, but different culprit.
  • The root of the issue:
    if (length) book.length = vue.shortenLength( length.textContent );
  • Possible fix: weeding out any inputs that don't have numbers in the shortenLength() method.
  • Other thoughts: This process probably fails like nobody's business in any other language and I'm not sure there's much I can do about it, aside from fix those issues when the time comes. Turns out Japenese is the only language where they don't use some form of the word minute and that works for me so I'm planning to fix it by detecting as well. This might not be the only issue in Japanese though.
@joonaspaakko joonaspaakko added the bug Something isn't working label Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant