[mythtv] MythTV to call external programs? -- FAQ?

Brent mythtv-dev@snowman.net
Wed, 18 Dec 2002 15:47:32 -0600

Yeah I have done two instances of it myself.  One is just a call to the
videolan-client (vlc) with the full screen option and the playlist
options for DVD.  I then added a button for it and called it "Play DVD",
the other one I made to play DIVX movies.  All it does is call a shell
script that I made which uses Xdialog to display a box with all my DIVX
movies in it.  When one is selected Xdialog returns that value and
places it on the command line after the command for gmplayer.  Then
gmplayer runs and starts playing the DIVX movie.

Fairly simplistic, but it kept me from having to relearn C++.  If
someone wants the scripts I can send them to the list or you

As far as the buttons... The format for them is fairly easy.  The first
line (Type I think it is) looks into the themes.xml in whatever theme
you have and gets the setup for that type, the next line is the text and
the next line is what it does.  The EXEC is a function to run an outside
program. So in my case it is EXEC divxplayer.sh

The depends line means it checks for that file and if it exists then it
will put the icon up there.  If it doesn't then it won't show it.  That
is to keep icons from showing up for modules you don't have.


> from the FAQ ...
> --------------------------------------------------------------
> --------------
> ---------
> Can I setup MythTV to call external programs? (DVD, etc)
> Making a button and binding it to play DVDs would be easy 
> enough, just look at how the mainmenu.xml file runs mythmusic 
> for an example. Playback of other media types would just need 
> something that does a directory search for allowable file 
> extensions, displays a list of matching files, and runs a 
> user specified program when selected. Pretty much extremely 
> easy code, if anyone wants to do it.
> --------------------------------------------------------------
> --------------
> ---------
> Has any one done this yet? I looked in the xml and saw the 
> <action></action> but that doesn't get me very far. How easy 
> is it can I do a search for cd and replace with dvd? Do I 
> need to get a book on C++?
> Sorry for the basic question, I have just 'switched' from Mac 
> to Linux so that I can use a real pvr system.