Allows the automatic start of other plug-ins on change or insertion of removable devices.
The plug-in detects audio CDs or video DVDs. For removable devices like USB sticks the plug-in mounts the device and try to detect a suitable plug-in according the file extension.
The plug-in will be configured via the file $VDRCONFIG/conf/plugins/autostart/autostart.conf.
Example for an autostart.conf
An audio CD shall be played with the CD player plug-in, a video DVD shall be displayed with the externalplayer plug-in, an USB stick with MP3 files shall be played with the music plug-in. For an USB stick with pictures the pictures shall be displayed with the image plug-in.
; The global section contains definitions global to all detectors
; exclude the given devices from media detection, e.g. the root hard drives
filterdev = sda sdb hda hdb
; filterdev = AUTO
type = dvd ; DVD Media tester
keys = @externalplayer OK
type = cd ; CD Media tester
keys = @cdplayer ; Start CD-Player plug-in
type = file ; File Media tester
files = mp3 ; Suffix to match
keys = @music YELLOW ; If a file ending with .mp3 is found, start music
linkpath = /video/mount/mp3
type = file ; File Media tester
files = jpg gif bmp ; If a file ends with .jpg .gif or .bmp, start image plug-in
keys = @image YELLOW DOWN RED RED
linkpath = /video/mount/image
The global section contains definitions global to all detectors. Currently only the keyword filterdev is available.filterdev defines an exclude list of devices, which shall not be scanned (for example the root disk). If the keyword AUTO is used, the plug-in tries to detect internal devices according the file /etc/fstab.
Keywords for all Media Tester.
TYPE defines an instance of a Media-Tester. Currently the following Media-Tester are available:
|DVD||Detect video DVDs via libdvdread.|
|CD||Detect audio CDs via libcdio.|
|FILE||Mounts a removable media and try to detect the file type according the file extension.|
KEY Defines the plug-in and the keys required to start the action, when a media is inserted and detected. A @ at the beginning of a name indicates the plug-in to start. For example the row "keys = @externalplayer OK" means, start plug-in externalplayer and send the OK key to the plug-in.
Keywords for the FILE-Media Tester.
|FILES||File extensions which the media tester shall check.|
|LINKPATH||Generates a symbolic link from the automatic mounted medium to a directory. In the secton [MP3] in the above example a link for an inserted USB-Stick will be created to /video/mount/mp3.|
Configuration of the externalplayer Plug-in
In this configuration only one menu entry exist. So it is sufficient to simulate only an OK.
# Externalplayer plug-in example configuration.
Command = "xine -L --stdctl -c /video/etc/xine.conf dvd://";
MenuEntry = "Xine DVD";
OutputMode = extern;
InputMode = slave;
BlockMenu = true; # This makes sense, because an invisible main menu would block all the keys.
vdrKeyUp = specialKeyPageUp; # See below for a full list of "special keys."
vdrKeyDown = specialKeyPageDown;
vdrKeyLeft = specialKeyLeft;
vdrKeyRight = specialKeyRight;
vdrKeyOk = specialKeyReturn;
vdrKeyBack = noKey;
vdrKeyRed = noKey;
vdrKeyGreen = ">";
vdrkeyyellow = "<";
The musicsources.conf should have for the above example the following entry in the first line:
A slightly more complex example is the image Plug-in:
/video/images; Bilder;0; *.jpg *.jpeg *.png *.tif* *.bmp
/video/mount/image; USB; 0; *.jpg *.jpeg *.png *.tif* *.bmp
The media detection can be started via svdrpsend.pl plug autostart DETECT.
|Parameter (short)||Parameter (long)||Description|
|-c <directory>||--configdir=<directory>||Configuration directory|