2012-05-19, 16:44
I am wondering if XBMC is able to run a script prior to starting an addon?
For example, I use a DNS service that allows me to get some foreign streaming content, but it requires that I change my DNS; however when I do this, some of the local streamed programming fails with the 'You are in an unsupported region'. My solution thus far is to add a line to the beginning of the default.py scripts for the addons that require it:
or The is just to ensure the DNS is changed prior to the rest of the python script running.
The issue is when upgrades come along, the default.py files will be changed, so I am wondering if there is a way that XBMC can run a script prior to starting an addon? Preferrably with some variables that would contain the addon information, so some logic can be performed.
Thanks!
For example, I use a DNS service that allows me to get some foreign streaming content, but it requires that I change my DNS; however when I do this, some of the local streamed programming fails with the 'You are in an unsupported region'. My solution thus far is to add a line to the beginning of the default.py scripts for the addons that require it:
Code:
os.system("cp /etc/resolv.remote /etc/resolv.conf ; sleep 1")
Code:
os.system("cp /etc/resolv.local /etc/resolv.conf ; sleep 1")
Code:
sleeo 1
The issue is when upgrades come along, the default.py files will be changed, so I am wondering if there is a way that XBMC can run a script prior to starting an addon? Preferrably with some variables that would contain the addon information, so some logic can be performed.
Thanks!