hei freevoers
I was not really satisfied with the old lcd plugin on my 2x16 iMON LCD... my 
need is to be able to use freevo without any screen (at least the music), 
just with the LCD!.

Since it was to complicated for me to improve the old plugin, I wrote a new 
one: it is called lcd2.py (could be changed if needed)

It is written and tested for freevo-1.7.6.1 but it should work with other 
versions too. It should work with different LCDs if they work together with 
the old plugin but I can not test it here :-)
since I do not use TV, this is not supported yet, and since xine video shows 
not a lot of infos, it is supported bad as well, and the localisation is not 
well done yet.

here is a list of features:
- the header field (topline-left) shows where you are in the menu: Freevo, 
Music, Images, Videos, Radio, MP3, CD-ROM, DVD/SVCD, ... (but it is not the 
title of the parent as in lcd.py, it is a constructed, 8 character limited, 
string)
- the info field (topline-right) shows infos like OSD would do: clock, 
volume, 'Play', 'pause', but also menu-position, and it shows if the meaning 
of the iMON button/wheel is changed (VOLUME, MENU,...)
- the menu line(s) help to navigate through the menu tree. I have only one, 
but with the menu position/size in the info field it is much more easier to 
navigate.
- the last or the second last line is used to show the player title
- the last line is used to show the player info (elapsed time / total time) 
and in the image viewer the number of the actual image / total images

to show infos like volume and image-viewer infos, I had to apply event senders 
in some other plugins like mixer.py, alsamixer.py, alsamixer2.py, 
image/viewer.py
In image/viewer.py I also applied a patch to change the duration time in the 
slideshow with the REW/FFWD buttons... and I added a new configure option  
IMAGEVIEWER_PLAY_AT_START that controlls if the image player should start 
automatically or only if PLAY is pressed.
Maybe this changes are not well integrated in freevo yet (undifined events, 
localisation, configuration, ...) -> help is recommended

hei freevo hackers, what have I to do with this? should I add a bug report?

Andreas
# diff freevo-1.7.6.1/src/plugins/alsamixer2.py freevo-1.7.6.1-min/src/plugins/alsamixer2.py
192a193
>             rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
196a198
>             rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
201a204
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
# diff freevo-1.7.6.1/src/image/viewer.py freevo-1.7.6.1-min/src/image/viewer.py
73c73,74
<         self.slideshow   = True
---
>         self.slideshow   = config.IMAGEVIEWER_PLAY_AT_START
>         self.duration	 = config.IMAGEVIEWER_DURATION
287a289
>                         
296,297c298,299
<         if self.fileitem.duration and self.slideshow and not self.signal_registered:
<             rc.register(self.signalhandler, False, self.fileitem.duration*100)
---
>         if self.duration and self.slideshow and not self.signal_registered:
>             rc.register(self.signalhandler, False, self.duration*100)
319a322,330
> 
>         # stop slideshow at the end if configured
>         index = item.parent.play_items.index(item)+1
>         length = len(item.parent.play_items)
>         if (index == length): self.slideshow = config.IMAGEVIEWER_PLAY_AT_START
> 
>         # send information event to LCD2
>         rc.post_event(Event('IMAGE_VIEW_INFO', arg=(index, length, item.name)))
> 
342c353,354
<         if event == PAUSE or event == PLAY:
---
>         # SELECT also should act as PLAY/PAUSE (-> could be done with event rerouting!?)
>         if event == PAUSE or event == PLAY or (event == BUTTON and event.arg == 'SELECT'):
344a357
>                 rc.post_event(Event('IMAGE_PAUSE_INFO', arg=''))
349c362,363
<                 rc.post_event(Event(OSD_MESSAGE, arg=_('play')))
---
>                 rc.post_event(Event(OSD_MESSAGE, arg=_('play')+(' %ss'%self.duration)))
>                 rc.post_event(Event('IMAGE_PLAY_INFO', arg='%s' % self.duration))
357a372
>             self.slideshow = config.IMAGEVIEWER_PLAY_AT_START
431a447,460
>         # change slideshow duration and send event to OSD and LCD2
>         elif (event == BUTTON) and (event.arg == 'REW'):
>             if self.duration > 7: self.duration -= 2
>             elif self.duration > 1: self.duration -= 1
>             rc.post_event(Event(OSD_MESSAGE, arg="Timer %ss" % self.duration)) # not yet internationalised
>             rc.post_event(Event('IMAGE_PLAY_INFO', arg='%s' % self.duration))
>             return True
>         elif (event == BUTTON) and (event.arg == 'FFWD'):
>             if self.duration < 6: self.duration += 1
>             elif self.duration < 11: self.duration += 2
>             rc.post_event(Event(OSD_MESSAGE, arg="Timer %ss" % self.duration)) # not yet internationalised
>             rc.post_event(Event('IMAGE_PLAY_INFO', arg='%s' % self.duration))
>             return True
>         
# diff freevo-1.7.6.1/src/plugins/mixer.py freevo-1.7.6.1-min/src/plugins/mixer.py
131a132
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
134a136
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
140a143
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
143a147
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
148a153
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
# diff freevo-1.7.6.1/src/plugins/alsamixer.py freevo-1.7.6.1-min/src/plugins/alsamixer.py
164a165
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
167a169
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
175a178
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
178a182
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))
185a190
>                 rc.post_event(Event('MIXER_VOLUME_INFO', arg='%s' % self.getVolume()))

Attachment: lcd2.py
Description: application/python

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to