2011-09-14, 05:32
Hi there,
Well, i've finally installed the latest xbmc nightly and for some reason or another (lack of knowlege, really), the code that i've used before is not working anymore to dowload an image and saving it to a skin directory. I'm sure it is because I'm not passing the correct directory path... the code i use is below:
What is the proper path syntax for a folder located in a skin folder (addon) "skin.myskin\newimages"?
Thank you in advance.
Well, i've finally installed the latest xbmc nightly and for some reason or another (lack of knowlege, really), the code that i've used before is not working anymore to dowload an image and saving it to a skin directory. I'm sure it is because I'm not passing the correct directory path... the code i use is below:
PHP Code:
def downloadImage(url, destfold, dest=None):
rawfilename = destfold + dest
filename = os.path.abspath(rawfilename)
#TODO: test if the image already exists
try:
urllib.urlretrieve(url, filename)
return 1
except:
return 0
Thank you in advance.