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

feat: add brazilian marketplace #195

Merged
merged 2 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/source/marketplaces/marketplaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Marketplaces
General Information
===================

Audible offers his service on 10 different marketplaces. You can read more about
Audible offers his service on 11 different marketplaces. You can read more about
marketplaces
`here <https://help.audible.com/s/article/what-is-an-audible-marketplace-and-which-is-best-for-me?language=en_US>`_.

Expand All @@ -14,6 +14,10 @@ marketplaces
Except website cookies, authentication data from device registration are valid
for all marketplaces, no matter which marketplace are used.

.. note::

The Brazilian marketplace was added in mid-2023.

.. _country_codes:

Country Codes
Expand Down Expand Up @@ -65,10 +69,19 @@ country code is associated.
* - Audible.es
- Spain
- es
* - Audible.com.br
- Brazil
- br

The locale argument
===================

The locale argument have the same meaning as the country code argument. Because
of backward compatibility I didn't renamed the locale argument yet. So if you
are asked for a `locale` than provide a country code from above.

.. note::

The country code for the Brazilian marketplace needs Audible > 0.8.2.
How to use these marketplace with a previous version read
`this comment <https://github.com/mkb79/Audible/issues/194#issuecomment-1728896926>`_.
17 changes: 15 additions & 2 deletions src/audible/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,26 @@
"domain": "com.au",
"market_place_id": "AN7EY7DTAW63G",
},
"india": {"country_code": "in", "domain": "in", "market_place_id": "AJO3FBRUE6J4S"},
"india": {
"country_code": "in",
"domain": "in",
"market_place_id": "AJO3FBRUE6J4S",
},
"japan": {
"country_code": "jp",
"domain": "co.jp",
"market_place_id": "A1QAP3MOU4173J",
},
"spain": {"country_code": "es", "domain": "es", "market_place_id": "ALMIKO4SZCSAR"},
"spain": {
"country_code": "es",
"domain": "es",
"market_place_id": "ALMIKO4SZCSAR",
},
"brazil": {
"country_code": "br",
"domain": "com.br",
"market_place_id": "A10J1VAYUDTYRN",
},
}


Expand Down