Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

xbmcvfs python module #36

wants to merge 1 commit into


None yet
4 participants

amet commented Feb 15, 2011

Hi all,

with the help of jcarroll, davilla and JM I have managed to create the xbmcvfs python module that will address the issue of writing to smb:// drives from addons. this is and issue atm on atv2/ios builds and openelec builds but it will become an issue in future once we move to external python altogether.

If there is anything that needs changing please let me know.

added: xbmcvfs.(copy,delete,rename,subHash) and xbmcvfs.File.(read, s…
…ize, close)

Thanks to jcarroll,davilla and jmarshall for a lot of the code here,Montellese for the VS2010 project fixup.

f = xbmcvfs.File(file)
b = f.read()
s = f.size()

success = xbmcvfs.copy(source, destination)
success = xbmcvfs.rename(file,newFileName)
hash = xbmcvfs.subHash(file)

ghost commented Feb 15, 2011

pydocs on read() has a typo and is wrong,

also this is not quite what i had in mind, in particular it does not implement the stdio interface.
fread(dest,size,nmemb,file) and so on. once this get to be used in all sorts of add-ons through swig, it will often be used for fileio callbacks. then we need this form. i'm not suggesting replacing, but rather have functions with the stdio calling conventions as well.


topfs2 commented Feb 15, 2011

Something which has an API closer to https://github.com/topfs2/libvfs this I guess. Could perhaps do a wrapper IO hook for our vfs for that lib and use it as a stepping stone of using that lib in core?


davilla commented Feb 15, 2011

if the xbmcvfs.File implementation is an issue, then that part can be dropped until such hooks to stdio are needed and written. xbmcvfs.(copy,delete,rename,subHash) are basic file operations and that part of the API will most likely not change over time. In fact, the only function needed with external python right now to is copy.


taxigps commented Mar 18, 2012

I have a problem need xbmcvfs.file. In shooter service of script.xbmc.subtitles, need to read some data of video file to calculate special hash for search subtitles. Many people use xbmc on ATV or IPAD, and movies store on smb server. So some api like xbmcvfs.file important for this.

@amet amet referenced this pull request May 25, 2012


xbmcvfs extend #1013

warped-rudi pushed a commit to warped-rudi/xbmc that referenced this pull request Apr 14, 2014

Merge pull request #36 from xbmc-imx6/fixresosound
[imx] attempt to recover audio from resolution change

davilla pushed a commit to davilla/xbmc that referenced this pull request Mar 19, 2015

Merge pull request #36 from davilla/tencent-macaroni-demux-paranoia
[droid/aml] check size too, we might get a zero sized demux packet

a1rwulf pushed a commit to a1rwulf/xbmc that referenced this pull request Jul 25, 2015

Merge pull request #36 from Montellese/retroplayer-15beta2_win32_ming…

[win32] binary addons: improvement for MinGW and platform specific dependency handling

popcornmix pushed a commit to popcornmix/xbmc that referenced this pull request Dec 13, 2016

Merge pull request #36 from AlwinEsch/binary-addon-rework-part19
[addons] remove the use of template's from add-on interface

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment