def clear_cache(): utils.clear_cache() return None
def Country(url): countries = { 'Afghanistan': 'af', 'Argentina': 'ar', 'Australia': 'au', 'Austria': 'at', 'Azerbaijan': 'az', 'Bangladesh': 'bd', 'Belgium': 'be', 'Bolivia': 'bo', 'Brazil': 'br', 'Bulgaria': 'bg', 'Cambodia': 'kh', 'Cameroon': 'cm', 'Canada': 'ca', 'Chile': 'cl', 'China': 'cn', 'Colombia': 'co', 'Cyprus': 'cy', 'Czech Republic': 'cz', 'Denmark': 'dk', 'Dominican Republic': 'do', 'Ecuador': 'ec', 'Egypt': 'eg', 'Finland': 'fi', 'France': 'fr', 'Georgia': 'ge', 'Germany': 'de', 'Greece': 'gr', 'Guatemala': 'gt', 'Hong Kong': 'hk', 'Hungary': 'hu', 'Iceland': 'is', 'India': 'in', 'Indonesia': 'id', 'Iraq': 'iq', 'Ireland': 'ie', 'Israel': 'il', 'Italy': 'it', 'Japan': 'jp', 'Jordan': 'jo', 'Kenya': 'ke', 'Korea': 'kr', 'Lao People\'s Democratic Republic': 'la', 'Latvia': 'lv', 'Lebanon': 'lb', 'Malaysia': 'my', 'Malta': 'mt', 'Mexico': 'mx', 'Moldova, Republic of': 'md', 'Morocco': 'ma', 'Myanmar': 'mm', 'Netherlands': 'nl', 'New Zealand': 'nz', 'Nigeria': 'ng', 'Norway': 'no', 'Pakistan': 'pk', 'Peru': 'pe', 'Philippines': 'ph', 'Poland': 'pl', 'Portugal': 'pt', 'Qatar': 'qa', 'Romania': 'ro', 'Russia': 'ru', 'Senegal': 'sn', 'Serbia': 'rs', 'Singapore': 'sg', 'Slovakia': 'sk', 'South Africa': 'za', 'Spain': 'es', 'Sri Lanka': 'lk', 'Sweden': 'se', 'Switzerland': 'ch', 'Taiwan': 'tw', 'Tanzania, United Republic of': 'tz', 'Thailand': 'th', 'Tunisia': 'tn', 'USA': 'us', 'Ukraine': 'ua', 'United Kingdom': 'gb', 'Venezuela': 've', 'Vietnam': 'vn' } country = utils.selector('Select country', countries.keys()) if country: utils.addon.setSetting('xvideoscountry', country) curl = '{}change-country/{}'.format(site.url, countries[country]) utils._getHtml(curl, site.url) utils.clear_cache() xbmc.executebuiltin('Container.Refresh')