2011-01-03, 11:35
I'm fairly new to both XBMC and Python and I have started working on Zenfolio (http://www.zenfolio.com) add-on. I have basic funcionality in place and I can browse galleries and view images
The problem I'm facing now is related to security. I can only browse public photos. Zenfolio has really nice JSON API which lets me login and browse through hierarchy and so on. But when I need to download original sized photo, request should have a custom http header or cookie. Here is a quote from Zenfolio docs...
Currently I'm accessing photos by adding a link to ListItem and marking it as isFolder = False. I don't see a way to add cookie/header. Should I download image and cache it and providing link to local image? I would rather not do that, if possible.
Any examples, links or suggestions for a solution are welcome!
The problem I'm facing now is related to security. I can only browse public photos. Zenfolio has really nice JSON API which lets me login and browse through hierarchy and so on. But when I need to download original sized photo, request should have a custom http header or cookie. Here is a quote from Zenfolio docs...
If access to a photo is restricted, the application needs to provide the authentication token or the keyring along with the GET request in a manner similar to the Zenfolio API calls. To specify the authentication token, the application should include an X-Zenfolio-Token header or a zf_token cookie. To specify the keyring, the application should include an X-Zenfolio-Keyring header or a zf_keyring cookie. See the Authentication and Using the Keyring chapters for more information.
http://www.zenfolio.com/zf/help/api/guide/download
http://www.zenfolio.com/zf/help/api/guide/download
Currently I'm accessing photos by adding a link to ListItem and marking it as isFolder = False. I don't see a way to add cookie/header. Should I download image and cache it and providing link to local image? I would rather not do that, if possible.
Any examples, links or suggestions for a solution are welcome!