2011-07-10, 19:21
Now that Python is unwrapped it has become difficult to work with vfs. I know that the xbmcvfs module is available, though quite limited and still being developed for Eden.
My script, cdART Manager, needs to create a directory( in the form 'Artist/extrafanart' ) but it fails since smb:// is a vfs. I though I had it taken care of by using xbmcvfs.copy() when I quickly glanced at the code and saw that it will create a directory if it was missing. When this didn't work, I looked a little closer at 'CFile::Cache' and saw that making of the directory only happens on a local path(URIUtils::IsHD(strDest) I believe checks to see if the path is on a Hard Drive - could be wrong)
So I have set out looking for other methods of creating a directory on a smb:// share(so far nothing works). I found threads dating back to 2006-07 when I think that python was not very well wrapped, which state using a module called 'dosamba.py' is used(posted by chunk_1970 on a now dead site is more than 4 years too much to ask.. ) and have yet been able to find any source code that uses this module(I think I may have to look into pysamba next) I was wondering if any one has come up with a solution to use until xbmcvfs is more functional(I know XBMC is still going through code restructuring and features are added after the code is solid again, so I'm not asking for this from the Devs.)
Thanks
My script, cdART Manager, needs to create a directory( in the form 'Artist/extrafanart' ) but it fails since smb:// is a vfs. I though I had it taken care of by using xbmcvfs.copy() when I quickly glanced at the code and saw that it will create a directory if it was missing. When this didn't work, I looked a little closer at 'CFile::Cache' and saw that making of the directory only happens on a local path(URIUtils::IsHD(strDest) I believe checks to see if the path is on a Hard Drive - could be wrong)
So I have set out looking for other methods of creating a directory on a smb:// share(so far nothing works). I found threads dating back to 2006-07 when I think that python was not very well wrapped, which state using a module called 'dosamba.py' is used(posted by chunk_1970 on a now dead site is more than 4 years too much to ask.. ) and have yet been able to find any source code that uses this module(I think I may have to look into pysamba next) I was wondering if any one has come up with a solution to use until xbmcvfs is more functional(I know XBMC is still going through code restructuring and features are added after the code is solid again, so I'm not asking for this from the Devs.)
Thanks