Posts: 16
Joined: Oct 2008
Reputation:
0
bolt
Junior Member
Posts: 16
2008-10-15, 23:28
I have access to several smb shares on my local network owned by different people and I'm trying to build a plugin to show recently added files on those shares(trying to update the library is way too slow). I have the code working for local directories but I need to build a version of os.walk that will work on smb shares. It seems that httpapi's GetDirectory function will work but I'm hoping there is a better way to list files on smb shares. Is there?
Posts: 4,146
Joined: Jan 2008
Reputation:
40
Ok, a proper file naming is needed to use the library. Sorry for the thread-napping.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
os.walk should work for linux and osx. not sure if virtual directory for python has been merged for xbox or windows. i think it is suppose to be, not sure when.
Posts: 901
Joined: Feb 2005
Reputation:
3
you could try using the python libs smb.py and nmb.py - these provide all sorts of smb functions.
Posts: 16
Joined: Oct 2008
Reputation:
0
bolt
Junior Member
Posts: 16
I ended up tossing the script onto my media server and running a cronjob to output the results as a webpage, which should be more useful to the other people on my network. A simple webscraper plugin lets me use it from my xbox.