Playtimer.sh

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 10: Zeile 10:
  
 
PATH=$PREFIX/bin:$PREFIX/sbin:$PATH
 
PATH=$PREFIX/bin:$PREFIX/sbin:$PATH
 
I18N=${SOURCEDIR:?}/VDR/i18n.c
 
LANGUAGE=( `grep -s ^OSDLanguage ${VDRCONFIG:?}/setup.conf` )
 
  
 
at now <<EOT
 
at now <<EOT
Zeile 19: Zeile 16:
 
     svdrpsend.pl -p ${VDR_PORT:-2001} PLAY $8 >/dev/null
 
     svdrpsend.pl -p ${VDR_PORT:-2001} PLAY $8 >/dev/null
 
else
 
else
    MESG="$(grep -sA ${LANGUAGE[2]} '"Error while accessing recording!",$' $I18N | tail -n1 | cut -d'"' -f2)"
+
     svdrpsend.pl -p ${VDR_PORT:-2001} MESG "Error while accessing recording..." >/dev/null
     svdrpsend.pl -p ${VDR_PORT:-2001} MESG "\${MESG:-Error while accessing recording!}" >/dev/null
+
 
fi
 
fi
 
EOT
 
EOT
 
 
</pre>
 
</pre>
 
}}
 
}}
  
 
[[Kategorie:Scripts]]
 
[[Kategorie:Scripts]]

Version vom 21. Oktober 2005, 09:03 Uhr

Script für den timercmds-patch.

Datei
$PATH/playtimer.sh
#!/bin/sh
#
# playtimer.sh
#
# source: http://vdrportal.de/board/thread.php?threadid=33778

PATH=$PREFIX/bin:$PREFIX/sbin:$PATH

at now <<EOT
svdrpsend.pl -p ${VDR_PORT:-2001} LSTR >/dev/null
if [ "$8" -gt 0 ] ; then
    svdrpsend.pl -p ${VDR_PORT:-2001} PLAY $8 >/dev/null
else
    svdrpsend.pl -p ${VDR_PORT:-2001} MESG "Error while accessing recording..." >/dev/null
fi
EOT