Plugin to control RUNVDR

  • Hi,
    is there anyone who develops a plugin to control the plugins in runvdr. It would be nice to switch the plugins on and off from inside vdr, and i think you can do it, if you write a plugin to change the commandline of runvdr.


    any hints - Thanks

    Ubuntu 9.10 i386 + s2-liplianin + VDR 1.7.9 + XBMC-PVR-Testing

  • Hi,
    i dont see any reason for such a plugin :D
    Btw. its too difficult.
    Otherwise you must have a magic glasseye in your pc , so
    that the plugin knows your configuration (path , etc..commandline parameters , etc.).


    Btw. you will not do that often , so if you dont have a monitor/TV-out connected, install the console-plugin
    and a dirty editor where you can un-/comment the
    plugins and restart vdr from your commands.
    Maybe you have to change your runvdr to do that
    easily.


    I think thats it and dont bloated vdr.
    I mean someone use vdr in this ... , the other on
    that way (e.g Path to mount.sh ..etc) :D


    bye

  • here a little (simple) script to change the plugins (on|off) via the commands.conf.
    the way is very simple, change.sh (del|write) the "-P" entrys in your runvdr new e.g:


    Code
    -P hello \
    tooooooooo
        hello \ (plugin off)


    and back:


    Code
    hello \
    tooooooooo
    -P hello \


    by


  • mad mal in German :-))


    quick = richtig, hat nicht lange gedauert, irgendwo muß man ja anfangen.


    dirty = egal, es funktioniert somit es es mir herzlich wurscht, klar geht das auch über init bei linux geht bekanntlich alles, nur glaubst Du es kann damit wer was anfangen wenn man 10 Scripts postet? Bei den fragen die hier manchmal so gestellt werden.


    So wie es oben steht ist es eh nicht komplett, um ein Plugin (on|off) zu realisieren gehört sicher nen bischen mehr dazu, ich Denke da an die ganzen entrys in der setup.conf die müßten nebenbei auch noch gecleant werden, bevor neu geladen wird, sonnst müllt es Dir so oder so den log zu.


    Ob nun per init oder so wie oben ist wie gesagt egal.


    - backup setup.conf erstellen?
    - wenn plugin auf (off) gesetzt wird setup.sh säubern?
    - wenn plugin auf (on) gesetzt wird setup.sh wieder neu beschreiben?


    bei den unmengen an entrys wirst Du schon eine ecke lang sitzen um das sauber hinzubekommen, oder willst Du jedesmal eine "nackte" setup.conf laden? Um dann alles neu einzustellen?


    Morone hat es schon sauber ausgedrückt, wenn man mal die ML verfolgt ist es eh mal geplannt, bis dato muß man sich halt selbst irgendwie behelfen.


    habe nur den einfachsten weg gepostet, es geht sicher auch komplizierter siehe oben ... nur zu :-)), man sollte aber nutzen und Aufwand vergleichen.


    diskmemo


    here is a litte bug, the plugins have more options (-m|-r):


    Code
    if (echo `grep "$1 -m" ${VDRCONF}` | egrep -q '\-P') || (echo `grep "$1 -r" ${VDRCONF}` | egrep -q '\-P')
    then
    	perl -pi -e "s/-P'$1/'$1/" ${VDRCONF}
    else
    	perl -pi -e "s/'$1/-P'$1/" ${VDRCONF}
    fi


    better e.g


    Code
    if (echo $(grep "'$1 -[A-Za-z]" ${VDRCONF}) | egrep -q '\-P')
    then
    	perl -pi -e "s/-P'$1/'$1/" ${VDRCONF}
    else
    	perl -pi -e "s/'$1/-P'$1/" ${VDRCONF}
    fi


    by

  • mad


    Well if you want to develop such a script,
    i micht allready ask for _some_ features:


    detect where all my software is and which hardware config i use
    (vdr,dvbdriver,soundcard driver and 5.1 analog setup,lirc_hwmodule,lircd,irexec,hdpram tunig for hdds(detect them) and cd's and dvd's(detect),helper modules nvram+cdfs)
    and their config files
    (vdr-conf-folder,emu10k1.conf,lirc.conf,.lircrc.conf)


    and my plugins
    (mp3,mplayer,dvd,vcd,console,vdrc,tetris,image,scanner)
    and their config/helpers
    (image.conf,mp3sources.conf,mplayersources.conf,imagesources.conf,
    mount.sh,convert.sh)


    which i want and dont want (brainreader?)
    not to mention that a good init script also would have to deal with
    the user and his mistakes (ask jha about his experience with the mplayer.sh) so for example check if the keys used for irexec dont interfere with vdr or mplayers mappings of keys.


    of course i'm kidding, but your demand for a init script is
    quite a huge project, because where would one draw the line.
    what is the purpose of a init script ?


    to work better than the user could do.


    even today i have not seen a single init script that coped with all needs, nowhere ..........


    Regards MeMeD

    --
    viel spass am geraet
    ---
    AMD1100/512 # 200GB-VDR # 220GB-DIVX #
    1.3 Siemens # 2.1 Haupauge(primary) # RH 7.3

  • memed: hey, so you have your own runsamba, runapache and runnetwork script? Every daemon has its own config and every user has another way to use the software. An init script starts the daemon (vdr) and that with a userdefined configuration ( if you prefer suse i would say rc.config ;) ). Take a look at the gentoo init script, that does the job pretty well. And no script should deal with the users faults, i dont know any init scipt that says "Hey user, your config entry xy is wrong and zz makes no sense together with yx". That's what rtfm is for.


    @anonymou: mir gings um runvdr, nicht um die möglichkeit plugins zur laufzeit zu laden, was ja eigendlich nicht möglich ist da es immer ein vdr restart ist ( *würg* ). Da ist Klaus gefragt sowas einzubauen. Da alle Plugins mit Prefix im Configfile arbeiten sollte es gar kein problem sein das zu filtern. Desweiteren stören einträge auch nicht geladener plugins nicht, von daher kann die konfig auch so bleiben wie sie ist. gar kein filtern.


    regards mad

  • da es immer ein vdr restart ist ( *würg* ).


    weiß zwar nicht was das (*würg*) bedeuten soll, aber Du hast es doch schon selbst gesagt.


    Zitat:


    Da ist Klaus gefragt sowas einzubauen.


    Das Angebot steht jedenfalls noch, lass mal Deine Idee hören, wie es ohne nen "vdr restart" im jetztiegen Stadium gehen soll? Da brauchst Du mir auch nicht mit init kommen, im Forum liegen einige init scripts, die meisten davon schieben die runvdr auch nur in den Hintergrund, was solls? Kann sich doch jeder anpassen wie er lustig ist.


    Schon mal drüber nachgedacht warum im Head steht:


    Simple Script, naja und mal so nebenbei habe ich selbst gar keinen bedarf Plugins on bzw off zu setzen, hatte es nur mal hier gelesen.


    by

  • update:


    commands.conf, e.g:
    ========================================================


    chance.sh, e.g:
    ========================================================


    runvdr -> ../VDR/runvdr, e.g:
    ========================================================


    runvdr.conf -> ../VDR/runvdr.conf, e.g:
    ========================================================

    Code
    VDRCMD="$MYPATH/VDR/vdr $(echo `vdropt`) \
     analogtv \
    'joystick -d /dev/js1' \
     mailbox \
     mediamvp \
    -P'powermate -d /dev/input/event0' \
    -P'sleeptimer -e /usr/local/src/VDRtmp/scripts/sleeptimer.sh' \
    -P statusleds \
    "


    runvdr.conf.org -> ../VDR/runvdr.conf.org, e.g:
    ========================================================

    Code
    VDRCMD="$MYPATH/VDR/vdr $(echo `vdropt`) \
    -P analogtv \
    -P'joystick -d /dev/js1' \
    -P mailbox \
    -P mediamvp \
    -P'powermate -d /dev/input/event0' \
    -P'sleeptimer -e /usr/local/src/VDRtmp/scripts/sleeptimer.sh' \
    -P statusleds \
    "

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!