Add source and scan it in a script
#1
Hi,
I need to add a source folder and also scan it to library programmatically in a script. Is this possible?
So far I tried
Code:
xbmc.executebuiltin('ActivateWindow(mediasource)')

Edit: this old thread http://forum.kodi.tv/showthread.php?tid=98644 says no to the first part.

Thanks
Reply
#2
Bump, please help I'm stuck... can someone please point me in any direction or just to say it cant be done in a script. thanks a million
Reply
#3
You could manually edit the sources.xml, then scan that folder using the built in function: UpdateLibrary(database,[path]).

http://kodi.wiki/view/List_of_built-in_functions

Directly editing the sources.xml is very invasive, though. So if someone has something more acceptable go with that.
Reply
#4
Thank you very much! I'll try that.
Reply
#5
(2015-06-09, 11:49)Karnagious Wrote: Directly editing the sources.xml is very invasive, though. So if someone has something more acceptable go with that.

Yup... and just a heads up, doing so will ensure your plugin doesn't make it into the official repo...
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#6
Ok thanks, it doesn't work anyway - the sources.xml only gets read again when Kodi is restarted... would there be any way to reload it?
Reply

Logout Mark Read Team Forum Stats Members Help
Add source and scan it in a script0