Skip to content

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Vito0912
Copy link
Contributor

@Vito0912 Vito0912 commented Mar 1, 2025

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.

@Vito0912
Copy link
Contributor Author

Vito0912 commented Mar 5, 2025

@advplyr
Would you mind looking at this and maybe leaving a comment on what you think about the steps?
I explained the benefits for the user [mainly that the region doesn't matter when matching ASINs that were already indexed and for multi-region search].
I don't like the way 100%, as it spams the selector a bit, but I guess it's a good first start to test it before redirecting some of the traffic, if you agree to it. Logging is made clear for AudiMeta, even if redirecting in the future.

@advplyr
Copy link
Owner

advplyr commented Mar 5, 2025

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

@Vito0912
Copy link
Contributor Author

I only yet received/saw the notification. No problem, take your time.

@Vito0912
Copy link
Contributor Author

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}`

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}`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded domain here.

@Vito0912
Copy link
Contributor Author

Vito0912 commented Mar 23, 2025

@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 Audible.xxx is generally named broadly and not after Audnexus anyway (just to be clear, if, AudiMeta is ditched, not the Audible names) and the percentage up over time.

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

@pquerner
Copy link

Okay, didnt know that. Just looked at audible provider and saw it didnt use hardcoded tld. o7

@Vito0912
Copy link
Contributor Author

Just looked at audible provider and saw it didnt use hardcoded tld.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants