Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#116357 - 14/09/2002 00:23 stats drawn from xml export
RobotCaleb
pooh-bah

Registered: 15/01/2002
Posts: 1866
Loc: Austin
ok, im brand new to vb and shooting for the sky. that said, im trying to write a program that will go through an xml playlist exported from emplode and draw numerous stats from it. play counts for albums, genres, fancy little charts, one armed men with darts. as much as i can pull really.
im sure that there is a correct way to do what im doing, but im doing it my way, mainly for the learning experience it stands to offer. i picked up a copy of vb5 about three days ago or something.
what i am doing this very moment is going through the xml playlist i exported and gathering the various tags and theyre meanings. attached is what ive got from it so far, my mind is starting to wander so ill gather more from it tomorrow.

the question, am i approaching the gathering of tag info in the right way, and can you help me where i do not know the meaning?

thanks for anything you can give,


Attachments
114594-empeg xml format.txt (315 downloads)


Top
#116358 - 14/09/2002 00:24 Re: stats drawn from xml export [Re: RobotCaleb]
RobotCaleb
pooh-bah

Registered: 15/01/2002
Posts: 1866
Loc: Austin
wrong version of .txt attached above, corrected here.


Attachments
114595-empeg xml format.txt (320 downloads)


Top
#116359 - 14/09/2002 02:00 Re: stats drawn from xml export [Re: RobotCaleb]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
length is the length of the *0 file in bytes. For tunes, it's the length of the MP3. For playlists, it's the number of children multiplied by 4 (the size of a FID). It's used when parsing the /empeg/var/playlists file.

pickn and pickpercent are the values from the Properties|Playlist tab in emplode.

otions is a typo. It's "options". It essentially encompasses the other options from the same tab. Check out lib/protocol/fids.h in the emptool sources for the info.

duration is the length of the song in milliseconds.

offset is how much of the file to skip to get to the first valid MP3 frame (for skipping ID3 tags/album art/etc.)

skipped_count is probably unused. Otherwise, it does exactly what it says on the tin.

play_last is the last time the song was played, expressed as a Unix time_t.

gfid -- no idea.

skip_count -- it's not different. One of them is a typo (can't remember which right now). Probably introduced by an earlier version of emplode or jemplode.
_________________________
-- roger

Top
#116360 - 14/09/2002 03:12 Re: stats drawn from xml export [Re: RobotCaleb]
number6
old hand

Registered: 30/04/2001
Posts: 745
Loc: In The Village or sometimes: A...
Looking forward,
to when you actually want to start working with the XML playlist file.
you will find it quite tedious to read in and process the XML file the hard way in VB.

Best to use the MS XML 3 [or 4] COM library - have a search at msdn.microsoft.com for the MXSML SDK and download it and use that.

It takes about 4 lines of VB code to read in and parse a XML document
e.g. [something like].
(Add a reference to the MSXML3 (or 4) library to your VB project.)
then in you code do this:

dim xmlobj as new xmlDom.DomDocument30

xmlobj.async =false
xmlobj.load ("path to xml file")


You will have to do some more VB code to work with the XML document loaded in xmlobj, but again a few line sof VB code will get you what you want I think far quicker than working with regular file IO routines.


Top