Re: XML Tree in MusicBrowser
"David Hough" <[email protected]> Wed, 06 Apr 2005 00:03:48 +0100
| Newsgroups | gmane.comp.audio.zinf.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Just a quick update if anyone is interested. The definition of the tree i=
s =20
now a preference, and can be changed at run time using the editor found a=
t =20
"View -> Custom Tree...". The XML parser is hopefully much more error =20
tolerent as well. So feel free to give it a whirl. If anyone wants some =20
help with how to define trees, I'll be happy to help.
As to my other email ("Possible new implementation of readEntries(...)") =
I =20
have now got a working implementation of this, which now provides support=
=20
for CD listings in the tree again.
There are still things that need work, including re-adding the Edit =20
Info/Remove pop-up menu items, so I won't be adding this to CVS quite yet=
=20
unless anyone wants me too.
As mentioned below, its avaliable from the =20
[email protected]/zinf--xmltree Arch branch.
Cheers,
David
On Mon, 21 Mar 2005 23:17:28 -0000, David Hough <[email protected]>=
=20
wrote:
> Hi,
>
> I've now got a working implementation of this, avaliable as the branch =
=20
> [email protected]/zinf--xmltree, if anyone wants to play =20
> around with it. The Arch archive can be found =20
> http://www-users.york.ac.uk/~djh123/arch2005/
>
> The default tree is represented by this snippet of XML:
>
> <node text=3D'My Music' icon=3D'zinf-music-library'>
> <node text=3D'All Tracks' icon=3D'zinf-all-tracks' =20
> url=3D'zinf://url?type=3DF' />
> <node text=3D'Uncatogorized Tracks' icon=3D'zinf-uncatagorised-track=
s' =20
> url=3D'zinf://url?artist=3D;type=3DF' />
> <list type=3D'artist'>
> <list type=3D'album'>
> <list type=3D'url' />
> </list>
> </list>
> </node>
> <node text=3D'My Playlists' icon=3D'zinf-playlist'>
> <list url=3D'file:///home/david/.zinf/playlists/' />
> <list url=3D'zinf://url?type=3DP' />
> </node>
> <node text=3D'My Streams' icon=3D'zinf-stream-icon' url=3D'zinf://url?t=
ype=3DS' =20
> />
> <node text=3D'CD Audio' icon=3D'zinf-cd' url=3D'cd://' />
>
> Directory browsing is supported by simply adding a node with the correc=
t =20
> url, e.g.
> <node url=3D'file:///home/david/mp3/' />
>
> The XML parser is currently quite fragile (almost no error catching at =
=20
> all), so be careful if change the XML. I haven't yet made the XML a =20
> preference (it seems a bit big for a one line setting in the preference=
=20
> file), so it's hardcoded into =20
> ui/musicbrowsermm/src/items/librarytree.cpp.
>
> Unfortunately the CD Node doesn't work as cd:// urls are not yet =20
> supported by the MusicDB. Another problem is that the URL for the =20
> default location of playlists is hardcoded instead of being read from =20
> the preferences.
>
> The "Edit Info" and "Remove" menu items from the popup menu in the tree=
=20
> have been temporarily removed as they lack any sort of implementation o=
r =20
> way of deciding when to enable/disable them.
>
> All items in the tree can now be added to the playlist, including "My =20
> Playlists", etc. Where an item does not directly represent a track it =20
> will be recursively expanded before adding to the playlist. So, for =20
> instance, if you add the "My Playlists" node, you will actually get all=
=20
> the tracks mentioned in all of your playlists.
>
> I'll hopefully promote this to CVS once I've got the remaining =20
> regressions like cd support working, and cleaned various things up.
>
> Cheers,
> David
--=20
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick