brianhornsby / script.openvpn

A script that allows you to control OpenVPN from within Kodi.
http://brianhornsby.com/kodi_addons/openvpn
GNU General Public License v3.0
91 stars 30 forks source link

Question: Location flag #18

Closed isitmeor closed 8 years ago

isitmeor commented 10 years ago

I can see in the /resources/images directory all kinds off country flags However they do not show up when i connect to for instance Belgium Is this a openelec limitation?

ps I am very happy with this addon

brianhornsby commented 10 years ago

Hi, The script uses the following link to get the countrycode for the current ip of the computer: http://api.ipinfodb.com/v3/ip-city/?key=24e822dc48a930d92b04413d1d551ae86e09943a829f971c1c83b7727a16947f&format=xml It then uses the file in the image directory with the same (but in lowercase) name, so for Belgium the above link should return BE, which should then use https://github.com/brianhornsby/script.openvpn/blob/master/resources/images/be.png for the noticification image.

isitmeor commented 10 years ago

not that it is a problem but,, still no flags in openelec still a happy camper :)

brianhornsby commented 10 years ago

The flags are only displayed if you call the script with the builtin function RunScript and the argument location. e.g. RunScript(script.openvpn, location)

isitmeor commented 10 years ago

Does this mean I have to make a py script ? or do you maybe have an example for me

brianhornsby commented 10 years ago

Also, you can use a python script or I some XBMC remote control apps allow you to call the XBMC builtin functions. See XBMC wiki for more info. http://wiki.xbmc.org/index.php?title=Built-in_scripting

nickshe89 commented 10 years ago

How I get IP address up ?

Thanks

brianhornsby commented 10 years ago

XBMC in-built network settings will show the ip address.