eboxy PlayList plugin 0.1
-------------------------

PlayList is a plugin for eboxy which provides a way to create simple
playlists using eboxy. It outputs to a plain text list of files suitable for
use with XMMS, mplayer or any other program that can accept such lists.

Compiling
---------

Run make and (as root) make install.

If your system is set up in a non-standard way you may have to modify the
makefile slightly. In the future this plugin will use autoconf/automake to
avoid this.


Usage
-----

To load the plugin, you need to add a <plugin> section into your XML file.
You will probably want two listboxes and the filebrowser plugin as well
so that you can choose files to add. Here's an example (details have been
stripped out):

...
<pages>
  <page...>
    <plugin module="filebrowser">
      <pluginobject name="filebrowser">
        <event type="OnChooseFile">
          playlist.add(filebrowser.filename)
        </event>
      </pluginobject>
    </plugin>
    <plugin module="playlist">
      <pluginobject name="playlist">
        <event type="OnChooseFile">
          exec "xmms -p " + playlist.selectedfile
        </event>
      </pluginobject>
    </plugin>
    <event type="OnLoad">
      filebrowser.setup("filelistbox")
      filebrowser.rootpath = "/mnt/media/mods"
      playlist.setup("playlistbox")
    </event>
    <listbox name="filelistbox" .../>
    <listbox name="playlistbox" .../>
    <button caption="Add" ...>
      playlist.add(filebrowser.filename)
    </button>
    <button caption="Remove" ...>
      playlist.remove(playlistbox.selectedindex)
    </button>
    <button caption="Play" ...>
      playlist.savelist("/tmp/eboxy.m3u")
      exec "xmms /tmp/eboxy.m3u"
    </button>
    ...
  </page>
</pages>
...


In the above example, there are two listboxes and several buttons. One
button adds the selected file in the file browser to the playlist. Another
removes the selected item from the playlist. A third button launches XMMS and
plays the entire playlist. Double-clicking on an item in the playlist listbox
plays just that item.

Please refer to the filebrowser documentation for further details on the
filebrowser plugin.


Reference
---------

Properties:

  selectedfile
    Read-only - the full path and name of the file selected in the list.

Methods:

  setup(listboxname)
    Sets the playlist up to use the named listbox widget.

  add(filename)
    Adds a file to the end of the playlist.

  remove(index)
    Removes the item at the specified index (0 is the first item).

  clear()
    Clears the playlist.

  printlist()
    Prints the playlist on the console (mainly for testing purposes).

  savelist(filename)
    Saves the list in plain text format, one file per line, to the specified
    file.

Events:

  OnChooseFile
    Occurs when the user selects a file from the list (by double-clicking or
    using the accept action - see the eboxy documentation).


eboxy
-----

eboxy is a GUI system for set-top boxes. For more information on eboxy, visit:

  http://www.bluelightning.org/eboxy

Please contact me, Paul Eggleton, at bluelightning@bluelightning.org with any
questions or suggestions.


Licence
-------

This plugin is released under the GPL, version 2 (or a later version, at your
option). For more information on the GNU GPL please visit http://www.fsf.org.
