TorrentBrowser3 and Samba
#1
I have played around with the TB3 script and added so the torrent files can be saved on a samba path. Does anyone know if this script is maintained by the author? (I tried to mail him)


Anyhow, if anyone is interested I can post the changes to this topic.
Reply
#2
If after a few days you can't contact the author just submit it to xbmcscripts.com Talk with blittan if you want to take ownership of it.
Reply
#3
redsolo, i would be interested in checking out the code for saving to a smb share.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#4
I posted the smb module some time ago with some test code to browse through samba shares you should be able to find it in the modules section of xbmcscripts. Its quite crude but does allow for full navigation..
Server: FreeNas 9 NAS: 6*3TB - Kodi Sql Database
Kodi Systems: Nvidia Shield Pro, G-Box Q (OpenElec), RikoMagic MK802 IV[
Skin: reFocus
Reply
#5
I think you could do it with an httpapi command
Reply
#6
I got the SMB modules from a samba sample script on http://xbmcscripts.com (search for samba). In that script you will find smb.py and nmb.py. Those two modules are of course required to get the below code to work.

The code, to open a Samba share and store a file to it, looks like this:
Code:
try:
                smb = SMB(settings['smb_server_name'],settings['smb_server_ip'])
                if (smb.is_login_required()):
                    smb.login(settings['smb_user'], settings['smb_password'])
                f=file(FTP_TEMP_FILE,"rb")
                smb.stor_file(settings['smb_share'], settings['smb_path'] + '/' + filename,f.read)
                f.close()
                os.remove(FTP_TEMP_FILE)
                del smb
        except Exception:
                return 'SMB failed'

It is very simple, and there are tons of other things you can do with SMB module.

The only thing I havent understood is why the SMB takes a server name and a server IP. The server name can be anything, but it is required!?!?
Check out my XBMC scripts at http://xbmc.ramfelt.se
Reply
#7
hey, thanks, this could be very handy. i do remember your post now. Smile
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
TorrentBrowser3 and Samba0