-
Notifications
You must be signed in to change notification settings - Fork 575
Added AudiMeta - an extended Audible provider #4066
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: master
Are you sure you want to change the base?
Conversation
@advplyr |
Yeah I'll check it out. I saw some of the conversation and I like the idea but I want to go through it thoroughly when I have time. I've been really tied up the last week |
I only yet received/saw the notification. No problem, take your time. |
Ok, now applied prettier to this PR. I will try to run Visual Studio Code for next PRs now |
|
||
asin = encodeURIComponent(asin.toUpperCase()) | ||
let regionQuery = region ? `?region=${region}` : '' | ||
let url = `https://audimeta.de/book/${asin}${regionQuery}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the domain be hardcoded here?
if (author) queryObj.author = author | ||
const queryString = new URLSearchParams(queryObj).toString() | ||
|
||
const url = `https://audimeta.de/search?${queryString}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded domain here.
@pquerner. Built-in providers are always hard-coded because they work differently than custom providers. See https://www.audiobookshelf.org/guides/custom-metadata-providers/#community-providers for more information on how they work. You can check Discord to see some conversations about it. AudiMeta is basically the same as Audnex, as it uses the same data sources, except that AudiMeta does not throw errors on a 404, has better searching, and does not care about the region if one is found. (With cons of some few old books missing that are not on Audible anymore) It also has more endpoints for finding all books in a series, all books by an author, and searching authors directly via Audible (Audnexus, as far as I can tell, only searches their database). In that Discord, there are a few more reasons why I would like to completely replace Audnex in this area—mostly so users not have to switch regions for every book (e.g. if books in German and English audiobooks every time) —but that's up to @advplyr decide at the end if they will be merged/replaced. For stress testing, this is planed implemented as an extra provider currently (when and if this PR is merged), and I plan, depending on whether @advplyr goes with it, to redirect x% of traffic via the AudiMeta API, as the provider But hardcoding is inteded. You can view the other providers that are built in. The logic for Custom Metadata providers is in the corresponding file in that directory |
Okay, didnt know that. Just looked at audible provider and saw it didnt use hardcoded tld. o7 |
Ah, sorry for the confusion. With Audnexus, we currently make a request to the Audible API (using different TLDs) to get the ASINs of the books. Then, for each ASIN, we make a request to Audnexus (hardcoded). AudiMeta takes the region and search parameters and handles this server-side so that only one request is needed instead of multiple. |
Brief summary
This adds AudiMeta as a provider for Audible which has extended capabilities over Audnexus such as searching for asins in multiple regions and slightly higher rate limits. There are more features, discussed in the Discord channel.
Which issue is fixed?
While this PR does not fix it, the provider can be used for #3839
In-depth Description
I would vote to replace Audnexus (or at least not make it default for Audible) and replace it over the long term with AudiMeta.
Why?
Because Audnexus returns faulty response codes.
Because the dev does not seem to be really interested in continuing the project (Messages in Discord).
Very limited options regarding querying and we have to make many requests.
Search by isbn for some books
This is a first step to make this transition by making this provider accessible via the dropdown.
When this is implemented for some time I would plan to create a PR to redirect 1% of requests from Audnexus to AudiMeta, and increase this for each release until everything is working.
How have you tested this?
Matched whole library.