xbmc.PlayDVD fails
#1
I'm writing my very first script... just 2 lines long. Big Grin I want to play a movie trailer followed by the movie in the DVD drive.
PHP Code:
import xbmc
import sys

# Define the path to your trailer
MyTheaterTrailer'F:\\MyVideos\\TheaterLogos\\KinkeadTheaterLogo.avi'

# Play the trailer
xbmc.Player().play(MyTheaterTrailer)
# Play the DVD
xbmc.PlayDVD() 
The trailer plays just fine. But then the script stops and the DVD never plays.

The python debug report says:

xbmc.PlayDVD()
AttributeError: "module" object has no attribute 'PlayDVD'


I'm running the latest release T3CH release of XBMC.
Reply
#2
that's a builtin. use xbmc.executebuiltin("XBMC.PlayDVD")

my signature has a link to python docs.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
Thanks! That fixed it.

I had to insert a 20 second delay after the trailer starts to hold off the DVD from starting up. I know there is an onplaybackended function that will do this, but my programming skills are pretty nil.

But for now, I have something that works pretty well.

PHP Code:
# Play the trailer
xbmc.Player().play(MyTheaterTrailer)

# Wait for trailer to finish
time.sleep(22.0)

# Play the DVD
xbmc.executebuiltin("xbmc.PlayDVD()"
Reply

Logout Mark Read Team Forum Stats Members Help
xbmc.PlayDVD fails0