feat(amazon): Refactor Amazon metadata provider#1123
Open
jgoguen wants to merge 6 commits intocrocodilestick:mainfrom
Open
feat(amazon): Refactor Amazon metadata provider#1123jgoguen wants to merge 6 commits intocrocodilestick:mainfrom
jgoguen wants to merge 6 commits intocrocodilestick:mainfrom
Conversation
This was referenced Feb 16, 2026
be40fc2 to
158bb56
Compare
Adds a set of HTML fixture files for future tests of the Amazon metadata provider. This PR is a no-op.
This PR is a simple set of formatting changes to search_metadata.py. There are no functional changes in this PR, it exists purely to make later diffs easier to read.
Adds a setting to the system and user settings pages to allow users to select their Amazon region. This setting does nothing in this PR, but will be used in a PR further up the stack to select the correct Amazon regional site when searching for books.
Instead of a hardcoded number of threads, base the number of threads on the number of CPU cores available. On systems with more cores, this can speed up searches by processing more at once.
…tion This PR refactors the base Metadata class to prepare for consolidating the various metadata providers into a more unified structure. The changes for now are effectively a no-op, since any metadata providers implementing the same function names just override what's here.
Refactor the Amazon metadata provider, setting up a framework for refactoring
other metadata providers with the aim of making it easier to add new providers
and make providers regional.
In this PR:
- Anything expected to be common across many metadata providers is moved into
the base Metadata class
- AmazonJp is merged into Amazon
- A new user and global setting for the Amazon region is added, enabling many
different regional Amazon sites in one provider class
- Tests for the Amazon metadata provider are added, including testing different
regions being set
- There are more than just superficial differences with AmazonJp, those are
specifically tested
158bb56 to
58a8060
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor the Amazon metadata provider, setting up a framework for refactoring other metadata providers with the aim of making it easier to add new providers and make providers regional.
In this PR:
This PR includes commits from #1122 and its dependencies. Once those PRs are merged this should collapse to one commit. Check out the latest commit from the Commits tab to see just the changes for this PR.
PR stack:
main