Christian Lyra wrote:
> thanks Duncan, this is useful, but my questions is about "item" inside
> a plugin. The example code of a "item" plugin says that you have to
> define a "action" function. This function get a "item" parameter. What
> kind of attributes this "item" has? what kind of values should I
> expect? When selecting a DVD, should I expect a disc-id attribute
I realised this... :)
from pprint import pformat
May help you, it will print out formatted value of item.
I have done this in a few of the media item modules so a:
print '%s' % item
may show you what you need.
> I´m trying to write a kind of "archive" plugin. The idea is to be
> able to insert a disc, selecting the disc, and run the plugin. The
> plugin should find the fxd files and copy them to a folder in the HD.
> The plugin should also re-write a few tags in the fxd file like <file
> id="f1" media-id="<disc-id>"><path_to_disc>/movie</file>, so when I
> select this fxd file, freevo will ask for the disc, and them,
> hopefully, play it :-)
> I did this a couple of times before by hand, but its a boring task...
> put the disc, look inside the vfs folder, find the disc-id, copy the
> fxds, edit the file entries, etc...
> Another related question: shouldnt we modify freevo to let it generate
> the same id for the same disc everytime? the current way seems to use
> the disc "name" and a timestamp, so if for some reason you delete the
> cache, you lost all the ids...
CDs and DVDs do have a unique id, so item['id'] may report the value.
> On 5/27/07, Duncan Webb <duncan@...> wrote:
>> Christian Lyra wrote:
>>> Hi there,
>>> Is there a way to get a disc-id of dvd? I use to look inside vfs/disc
>>> folder to look for disc-ids. Making the question more generic, what
>>> kind of attributes should I expect of a "Item"?
>>> http://freevo.sourceforge.net/cgi-bin/doc/DevelopPlugins is a nice
>>> start point but I missed this kind of information :-(
>> It varies quite a lot about what an item contains.
>> The attached scripts print the contents of the mmpython.cache files in
>> the overlay directory, this shows what an item contains.
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> Freevo-devel mailing list