update geo module; make Ox.load accept multiple modules
This commit is contained in:
parent
cbd6a1dea8
commit
3c419d3ee7
4 changed files with 108 additions and 83 deletions
|
|
@ -635,6 +635,18 @@ geo = {
|
|||
'ZRCD': 'crop()',
|
||||
'ZW': 'crop(left)'
|
||||
},
|
||||
'imdb_code': {
|
||||
'Côte d\'Ivoire': 'ci',
|
||||
'Democratic Republic of the Congo': 'cd',
|
||||
'Palestine': 'ps',
|
||||
'Serbia and Montenegro': 'xfy'
|
||||
},
|
||||
'imdb_name': {
|
||||
'Côte d\'Ivoire': 'Ivory Coast', # bug in some imdb entries
|
||||
'Democratic Republic of the Congo': 'Democratic Republic of Congo', # bug in some imdb entries
|
||||
'Palestine': 'Occupied Palestinian Territory', # bug in some imdb entries
|
||||
'Serbia and Montenegro': 'Federal Republic of Yugoslavia'
|
||||
},
|
||||
|
||||
# import json
|
||||
# import re
|
||||
|
|
@ -658,7 +670,7 @@ geo = {
|
|||
'Albanian': 'Albania',
|
||||
'Algonquin': '',
|
||||
'American': 'United States',
|
||||
'Amharic': '',
|
||||
'Amharic': 'Ethiopia',
|
||||
'Apache': '',
|
||||
'Arabic': 'Saudi Arabia',
|
||||
'Aragonese': '',
|
||||
|
|
@ -676,7 +688,7 @@ geo = {
|
|||
'Baka': '',
|
||||
'Balinese': 'Indonesia',
|
||||
'Bambara': 'Mali',
|
||||
'Basque': '',
|
||||
'Basque': 'Spain',
|
||||
'Bassari': '',
|
||||
'Belarusian': 'Belarus',
|
||||
'Bemba': '',
|
||||
|
|
@ -713,7 +725,7 @@ geo = {
|
|||
'Dari': 'Afghanistan',
|
||||
'Desiya': '',
|
||||
'Dinka': '',
|
||||
'Djerma': '',
|
||||
'Djerma': 'Niger',
|
||||
'Dogri': '',
|
||||
'Dutch': 'Netherlands',
|
||||
'Dyula': '',
|
||||
|
|
@ -735,7 +747,7 @@ geo = {
|
|||
'Fulah': '',
|
||||
'Fur': '',
|
||||
'Gaelic': 'Ireland',
|
||||
'Galician': '',
|
||||
'Galician': 'Spain',
|
||||
'Georgian': 'Georgia',
|
||||
'German': 'Germany',
|
||||
'Grebo': '',
|
||||
|
|
@ -812,7 +824,7 @@ geo = {
|
|||
'Maithili': '',
|
||||
'Malagasy': 'Madagascar',
|
||||
'Malay': 'Malaysia',
|
||||
'Malayalam': '',
|
||||
'Malayalam': 'India',
|
||||
'Malecite-Passamaquoddy': '',
|
||||
'Malinka': 'Guinea',
|
||||
'Maltese': 'Malta',
|
||||
|
|
@ -1062,12 +1074,15 @@ def get_countries():
|
|||
# other
|
||||
country['other'] = country['name'] in geo['other']
|
||||
# imdb
|
||||
for imdb_country in imdb_countries:
|
||||
found = False
|
||||
if imdb_country['code'].upper() == country['code'] or imdb_country['name'] == country['name']:
|
||||
country['imdbCode'] = imdb_country['code']
|
||||
country['imdbName'] = imdb_country['name']
|
||||
break
|
||||
if country['name'] in geo['imdb_name']:
|
||||
country['imdbCode'] = geo['imdb_code'][country['name']]
|
||||
country['imdbName'] = geo['imdb_name'][country['name']]
|
||||
else:
|
||||
for imdb_country in imdb_countries:
|
||||
if imdb_country['code'].upper() == country['code'] or imdb_country['name'] == country['name']:
|
||||
country['imdbCode'] = imdb_country['code']
|
||||
country['imdbName'] = imdb_country['name']
|
||||
break
|
||||
get_country_flag(country['code'], country['flagURL'])
|
||||
get_country_icon(country['code'])
|
||||
# languages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue