Read automatically video loop in a startup directory

Hello,
we want to automatically play video loop of a directory at startup to make information panel.

Directory (/home/osmc/Movies)

Initially in raspbnc, I created an autoexec script in /home/pi/.xbmc/userdata/autoexec.py

code:
import xbmc
xbmc.executebuiltin(‘XBMC.PlayMedia(/home/pi/)’)
xbmc.executebuiltin(‘xbmc.PlayerControl(repeatall)’)
xbmc.executebuiltin(“Action(Fullscreen)”)

I try the same script on OSMC, it does not work in /home/osmc/.kodi/ userdata/autoexec.py:

code:
import xbmc
xbmc.executebuiltin(‘XBMC.PlayMedia(/home/osmc/Movies/)’)
xbmc.executebuiltin(‘xbmc.PlayerControl(repeatall)’)
xbmc.executebuiltin(“Action(Fullscreen)”)

I try to change the following way by:

code:
xbmc-send -a "PlayMedia(/home/osmc/Movies/)’

the script works when you do try it with ./autoexec.py order.
But at startup, it does not work? error in the script.

I wonder if anyone has a solution?

Thank you in advance for your help.

Hi, I know this is quite old but we where trying to do the same with one file, ended up just copying the file twice and placed it in a directory… I guess more for the benefit of others who are trying to do the same.

Created an autoexec.py in /home/osmc/.kodi/userdata

also I found I had to set the autoexec.py to executable… chmod 777 autoexec.py (i know, I’m lazy).

code we used is below… worked perfectly on an rpi with osmc, and repeat plays a treat straight after boot up.

import xbmc
xbmc.executebuiltin(“PlayMedia(/media/[usbstickname]/folderwithmoviefileinit)”)
xbmc.executebuiltin(“PlayerControl(repeatall)”)

it would be great to know what options are available in the xbmc library, where and how to find that info would be awesome as I just gleaned this info our of what worked on our osmc from other scripts and this one…