Hans Meine wrote: > QUESTION: I digged into plugin.py, wondering about the implementation of > Plugin and the subclasses. Am I right that it's not possible to have ONE > plugin that has both menu items and a poll function? What's the expected way > to do sth. like that?
In 1.5.x no. In cvs you can. You would choose a plugin with menu items and register a callback to the notifier. > QUESTION: How can I re-use code between plugins and helpers? (E.g. call a > function from helpers/rebootflag.py from plugins/shutdown.py or vice versa, > to prevent code duplication.) Is there a special Freevo-way? Three possible ways. One is to import helper.foo in your plugin, the second the other way around. Bot isn't that nice. Maybe move some code into the util directory if it is needed more than once. > Shutdown via Freevo: > ------------------- > Something that struck me lately is that after being logged into my Freevo > maching remotely and maintaining the Gentoo system, I issued "halt"... which > was stupid because the next two recordings on the following days were not > executed because the nvram-wakup call happens in shutdown.py. :-( > I have two options in my mind: > - Let the recordserver to the nvram-wakup programming. This would ensure that > recordings will happen, as long as no reboot is needed. The rebootflag would > have to be checked on Freevo _or_ system shutdown however - one could add > another "freevo halt" helper, and/or check the rebootflag on system shutdown; > does so. know whether it's possible to change a shutdown in progress from > runlevel 0 to 6/reboot? > - Force the user to shutdown the machine through Freevo (probably the > above-mentioned helper would be no bad idea, then). > QUESTION: Which option is better/preferred? Maybe an option for both? I use the pc not only for Freevo, sometimes Freevo + recordserver are running but I'm also doing something else. > I would be glad if you could answer my Freevo-architecture-related > questions; also I'd be interested how much of this code can be > re-used (/has to be redone) for Freevo 2? I don't know about the cirrent status of the plugin, but maybe you could write it for 2.0 (cvs)? The core is much more powerfull now. Dischi -- Nondeterminism means never having to say you are wrong.
pgp03AmI4RuOP.pgp
Description: PGP signature