Playtimer.sh

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(M)
 
(6 dazwischenliegende Versionen von 4 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
Script für den [[timercmds-patch]].
+
Skript für den [[timercmds-patch]].
  
{{Box Datei| $PATH/playtimer.sh |
+
{{Box Datei | [[Struktur|$PATH]]/playtimer.sh |
 
<pre>
 
<pre>
 
#!/bin/sh
 
#!/bin/sh
Zeile 8: Zeile 8:
 
#
 
#
 
# source: http://vdrportal.de/board/thread.php?threadid=33778
 
# source: http://vdrportal.de/board/thread.php?threadid=33778
 +
#
 +
# add this line to your $VDRCONFIG/timercmds.conf:
 +
# folgende zeile in die $VDRCONFIG/timercmds.conf eintragen:
 +
#
 +
# Play timer : /path_to_this_scriptplaytimer.sh
  
PATH=$PREFIX/bin:$PREFIX/sbin:$PATH
+
screen -dm sh -c " \
 
+
    if [ \"$8\" -gt 0 ] ; then \
I18N=${SOURCEDIR:?}/VDR/i18n.c
+
svdrpsend.pl -p ${VDR_PORT:-2001} LSTR ; \
LANGUAGE=( `grep -s ^OSDLanguage ${VDRCONFIG:?}/setup.conf` )
+
svdrpsend.pl -p ${VDR_PORT:-2001} PLAY \"$8\" ; \
 
+
     else \
at now <<EOT
+
svdrpsend.pl -p ${VDR_PORT:-2001} MESG "$"Error while accesing recording"" ... ; \
svdrpsend.pl -p ${VDR_PORT:-2001} LSTR >/dev/null
+
    fi ; \
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
+
 
+
 
</pre>
 
</pre>
 
}}
 
}}
  
[[Kategorie:Scripts]]
+
[[Kategorie:Skripte]]

Aktuelle Version vom 12. Juni 2006, 10:04 Uhr

Skript für den timercmds-patch.

Datei
$PATH/playtimer.sh
#!/bin/sh
#
# playtimer.sh
#
# source: http://vdrportal.de/board/thread.php?threadid=33778
#
# add this line to your $VDRCONFIG/timercmds.conf:
# folgende zeile in die $VDRCONFIG/timercmds.conf eintragen:
#
# Play timer : /path_to_this_scriptplaytimer.sh

screen -dm sh -c " \
    if [ \"$8\" -gt 0 ] ; then \
	svdrpsend.pl -p ${VDR_PORT:-2001} LSTR ; \
	svdrpsend.pl -p ${VDR_PORT:-2001} PLAY \"$8\" ; \
    else \
	svdrpsend.pl -p ${VDR_PORT:-2001} MESG "$"Error while accesing recording"" ... ; \
    fi ; \
"