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

Update list of countries #315

Merged
merged 1 commit into from
Aug 29, 2021
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
123 changes: 121 additions & 2 deletions mopidy_spotify/countries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,185 @@
List of countries that Spotify is available in.

The list is based on:
https://support.spotify.com/us/learn-more/faq/#!/article/Availability-in-overseas-territories # noqa: B950
https://support.spotify.com/us/article/where-spotify-is-available/

Last updated: 2015-01-22
Last updated: 2021-08-16
"""
COUNTRIES = {
"AL": "Albania",
"DZ": "Algeria",
"AG": "Antigua and Barbuda",
"AD": "Andorra",
"AO": "Angola",
"AR": "Argentina",
"AM": "Armenia",
"AU": "Australia",
"AT": "Austria",
"AZ": "Azerbaijan",
"BS": "Bahamas",
"BH": "Bahrain",
"BD": "Bangladesh",
"BB": "Barbados",
"BE": "Belgium",
"BZ": "Belize",
"BJ": "Benin",
"BT": "Bhutan",
"BO": "Bolivia",
"BA": "Bosnia",
"BW": "Botswana",
"BR": "Brazil",
"BN": "Brunei Darussalam",
"BG": "Bulgaria",
"BF": "Burkina Faso",
"BI": "Burundi",
"KH": "Cambodia",
"CM": "Cameroon",
"CA": "Canada",
"CV": "Cape Verde",
"TD": "Chad",
"CL": "Chile",
"CO": "Colombia",
"KM": "Comoros",
"CR": "Costa Rica",
"CI": "Côte d'Ivoire",
"HR": "Croatia",
"CW": "Curaçao",
"CY": "Cyprus",
"CZ": "Czech Republic",
"DK": "Denmark",
"DJ": "Djibouti",
"DM": "Dominica",
"DO": "Dominican Republic",
"EC": "Ecuador",
"EG": "Egypt",
"SV": "El Salvador",
"GQ": "Equatorial Guinea",
"EE": "Estonia",
"SZ": "Eswatini",
"FJ": "Fiji",
"FI": "Finland",
"FR": "France",
"GA": "Gabon",
"GM": "Gambia",
"GE": "Georgia",
"DE": "Germany",
"GH": "Ghana",
"GR": "Greece",
"GD": "Grenada",
"GT": "Guatemala",
"GN": "Guinea",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haiti",
"HN": "Honduras",
"HK": "Hong Kong",
"HU": "Hungary",
"IS": "Iceland",
"IN": "India",
"ID": "Indonesia",
"IE": "Ireland",
"IL": "Israel",
"IT": "Italy",
"JM": "Jamaica",
"JP": "Japan",
"JO": "Jordan",
"KZ": "Kazakhstan",
"KE": "Kenya",
"KI": "Kiribati",
"XK": "Kosovo",
"KW": "Kuwait",
"KG": "Kyrgyzstan",
"LA": "Lao People's Democratic Republic",
"LV": "Latvia",
"LB": "Lebanon",
"LS": "Lesotho",
"LR": "Liberia",
"LI": "Liechtenstein",
"LT": "Lithuania",
"LU": "Luxembourg",
"MG": "Madagascar",
"MO": "Macao",
"MW": "Malawi",
"MY": "Malaysia",
"MV": "Maldives",
"ML": "Mali",
"MT": "Malta",
"MH": "Marshall Islands",
"MR": "Mauritania",
"MU": "Mauritius",
"MX": "Mexico",
"FM": "Micronesia",
"MD": "Moldova",
"MC": "Monaco",
"MN": "Mongolia",
"ME": "Montenegro",
"MA": "Morocco",
"MZ": "Mozambique",
"NA": "Namibia",
"NR": "Nauru",
"NP": "Nepal",
"NL": "Netherlands",
"NZ": "New Zealand",
"NI": "Nicaragua",
"NE": "Niger",
"NG": "Nigeria",
"MK": "North Macedonia",
"NO": "Norway",
"OM": "Oman",
"PK": "Pakistan",
"PW": "Palau",
"PS": "Palestine",
"PA": "Panama",
"PG": "Papua New Guinea",
"PY": "Paraguay",
"PE": "Peru",
"PH": "Philipines",
"PL": "Poland",
"PT": "Portugal",
"QA": "Qatar",
"RO": "Romania",
"RU": "Russia",
"RW": "Rwanda",
"WS": "Samoa",
"SM": "San Marino",
"ST": "São Tomé and Príncipe",
"SA": "Saudi Arabia",
"SN": "Senegal",
"RS": "Serbia",
"SC": "Seychelles",
"SL": "Sierra Leone",
"SG": "Singapore",
"SK": "Slovakia",
"SI": "Slovenia",
"SB": "Solomon Islands",
"ZA": "South Africa",
"ES": "Spain",
"KN": "St. Kitts and Nevis",
"LK": "Sri Lanka",
"LC": "St. Lucia",
"VC": "St. Vincent and the Grenadines",
"SR": "Suriname",
"SE": "Sweden",
"CH": "Switzerland",
"TW": "Taiwan",
"TZ": "Tanzania",
"TH": "Thailand",
"TL": "Timor-Leste",
"TG": "Togo",
"TO": "Tonga",
"TT": "Trinidad and Tobago",
"TN": "Tunisia",
"TR": "Turkey",
"TV": "Tuvalu",
"UG": "Uganda",
"UA": "Ukraine",
"AE": "United Arab Emirates",
"GB": "United Kingdom",
"US": "United States",
"UY": "Uruguay",
"UZ": "Uzbekistan",
"VU": "Vanuatu",
"VN": "Vietnam",
"ZM": "Zambia",
"ZW": "Zimbabwe",
}
4 changes: 4 additions & 0 deletions tests/test_browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ def test_browse_top_tracks_countries_unlimited_by_config(
results = provider.browse("spotify:top:tracks:countries")

assert len(results) > 50
assert (
models.Ref.directory(uri="spotify:top:tracks:jp", name="Japan")
in results
)
assert (
models.Ref.directory(uri="spotify:top:tracks:no", name="Norway")
in results
Expand Down