2023-03-27, 17:58
Does anyone know how to achieve the problem outlined in the title? I came up with the below:
but it seems the python environment isn't smb capable because I get this exception in the log:
[Errno 2] No such file or directory: 'smb://192.168.0.3/tv01/Movies_MultiFormat.xsp'
Why do I want to do this? I have a smart playlist which I regenerate a few times a day via a scheduled task. This playlist is used to keep track of which movies are available in multiple resolutions e.g. 1080p, 4k. This playlist can then be used, in combination with a few others, to make sure that devices show only one version of these movies - the version that they are capable of playing. While I had only Nvidia Shield devices, I got around this by getting my scheduled script to copy the files to the Kodi device (Shield has an SMB server). Now I have devices which don't have an smb server (e.g. Firesticks) and now I need a way to have each Kodi client pull this playlist from a central location. autoexec.py seemed like the obvious solution but I'm stuck on getting it to speak smb.
Any pointers would be greatly appreciated!
python:import xbmcvfs
from shutil import copy
source = "smb://192.168.0.3/tv01/Movies_MultiFormat.xsp"
target = xbmcvfs.translatePath('special://home/userdata/playlists/video/')
copy(source, target)
but it seems the python environment isn't smb capable because I get this exception in the log:
[Errno 2] No such file or directory: 'smb://192.168.0.3/tv01/Movies_MultiFormat.xsp'
Why do I want to do this? I have a smart playlist which I regenerate a few times a day via a scheduled task. This playlist is used to keep track of which movies are available in multiple resolutions e.g. 1080p, 4k. This playlist can then be used, in combination with a few others, to make sure that devices show only one version of these movies - the version that they are capable of playing. While I had only Nvidia Shield devices, I got around this by getting my scheduled script to copy the files to the Kodi device (Shield has an SMB server). Now I have devices which don't have an smb server (e.g. Firesticks) and now I need a way to have each Kodi client pull this playlist from a central location. autoexec.py seemed like the obvious solution but I'm stuck on getting it to speak smb.
Any pointers would be greatly appreciated!