Playtimer.sh

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(M)
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 16: Zeile 19:
 
     svdrpsend.pl -p ${VDR_PORT:-2001} PLAY $8 >/dev/null
 
     svdrpsend.pl -p ${VDR_PORT:-2001} PLAY $8 >/dev/null
 
else
 
else
     svdrpsend.pl -p ${VDR_PORT:-2001} MESG "Keine Aufzeichnung gefunden..." >/dev/null
+
    MESG="$(grep -sA ${LANGUAGE[2]} '"Error while accessing recording!",$' $I18N | tail -n1 | cut -d'"' -f2)"
 +
     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 29. August 2005, 02:33 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

I18N=${SOURCEDIR:?}/VDR/i18n.c
LANGUAGE=( `grep -s ^OSDLanguage ${VDRCONFIG:?}/setup.conf` )

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
    MESG="$(grep -sA ${LANGUAGE[2]} '"Error while accessing recording!",$' $I18N | tail -n1 | cut -d'"' -f2)"
    svdrpsend.pl -p ${VDR_PORT:-2001} MESG "\${MESG:-Error while accessing recording!}" >/dev/null
fi
EOT