2012-07-08, 09:11
Hi,
I'm trying to write a script to search subtitle and need to open and get file size, hash.
I'm having trouble opening file over SMB network.
XBMC can play the file fine.
smb:\\hostname\folder\video.avi
The below code run in windows fine:
ftotallen, SubHash = xbmc.subHashAndFileSize(fpath) (this is to get file size and hash).
or I can get file size by ftotallen = os.stat(fpath).st_size
f = open(fpath, "rb" (file open)
fpath = \\hostname\folder\video.avi
But it doesn't work in Linux:
_ xbmc.subHashAndFileSize is not supported.
_ os.stat(fpath).st_size cannot open file over smb:\\
_ open(fpath, "rb") doesnt seem to work either.
Have anyone seen this problem before?
I did search for the last few days, but could not find anything useful.
Thank you very much in advance.
I'm trying to write a script to search subtitle and need to open and get file size, hash.
I'm having trouble opening file over SMB network.
XBMC can play the file fine.
smb:\\hostname\folder\video.avi
The below code run in windows fine:
ftotallen, SubHash = xbmc.subHashAndFileSize(fpath) (this is to get file size and hash).
or I can get file size by ftotallen = os.stat(fpath).st_size
f = open(fpath, "rb" (file open)
fpath = \\hostname\folder\video.avi
But it doesn't work in Linux:
_ xbmc.subHashAndFileSize is not supported.
_ os.stat(fpath).st_size cannot open file over smb:\\
_ open(fpath, "rb") doesnt seem to work either.
Have anyone seen this problem before?
I did search for the last few days, but could not find anything useful.
Thank you very much in advance.