Accessing SMB source with a script
#1
On OSMC, I have added several Samba shares from a NAS to the sources file and they can be played just fine. I am planning to write a bash script to automate the playing of videos from one of the sources. My question is about how to access the sources already saved to the OSMC sources file. I know I can access the videos using a syntax like this: “SMB:\192…” But is there another method that allows me to access the video through the saved sources in a script or do I have to use the SMB:\ directory everytime?
Reply
#2
If you're doing it in a bash script, you're probably stuck with OS level connections.  I don't know of anyway offhand to access the Kodi sources from outside Kodi.  If you write a Kodi addon there might be some pythonic way of doing it though.
Reply
#3
not so sure about how OSMC handles it, but I guess you are able to let the OS do the mount of SMB shares. If that's possible you able to access the files directly by a folder/mountpoint.

At least on other Linux distros you are able to start kodi from commandline. You are able to give a filename as a parameter, such as: kodi /path/to/video/file.mkv and Kodi will play that file directly after startup.

So yeah, it can either be done via bash script and for sure it also can be done via python.
Reply

Logout Mark Read Team Forum Stats Members Help
Accessing SMB source with a script0