I've hacked playlist.py to allow for automatic slideshows - when I play
all files (randomly or not) in a directory freevo will show them as a
slideshow.

This requires a SLIDESHOW_DURATION setting in /etc/freevo/local_conf.py
- but will not crash without it.
Not having SLIDESHOW_DURATION set, or having it set to 0 will continue
to act as it does currently, not advancing until keys are pressed.

I'm sure there's a better way to do this, but it's working fine for me
here - I wanted it to have playing when audio is in detach mode.
playlist.play is convenient, as prior to this random playlists are just
strings (filenames) - it is here that they get items created for each
element.

Thanks,
Chris

--- playlist.py     2004-07-16 23:17:18.000000000 -0400
+++ playlist_cng.py     2004-07-16 23:33:03.000000000 -0400
@@ -385,6 +385,11 @@
                 self.current_item = None
             return True

+        # For image items set a default display duration for automatic
slideshows
+        if hasattr(self.current_item, 'type') and
self.current_item.type == 'image':
+            if self.current_item.duration == 0 and hasattr(config,
'SLIDESHOW_DURATION'):
+                self.current_item.duration = config.SLIDESHOW_DURATION
+
         if hasattr(self.current_item, 'play'):
             self.current_item.play(menuw=menuw)
         else:


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to