Author Topic: xmplay.library file format  (Read 8557 times)

Ace386

  • Posts: 5
xmplay.library file format
« on: 24 Oct '07 - 16:13 »
Hi,

could anybody explain the library file format to me, please? What I found out yet is that each song entry contains of the following entries (separated by 0x00):

File Name
List Entry
Title
Artist
Album
Year
Track No.
Genre
Comment
? (some data, don't now what it means)
File Format

Now I'd like to know what the bytes before/after a track mean. The reason is, I'd like to write a tool, which finds duplicates on my HD and deletes them, following special rules (keep albums etc.).

Thanks,
ace386 (<-- from Germany, so please ignore any mistakes  ;))

Jace

  • Posts: 825
Re: xmplay.library file format
« Reply #1 on: 24 Oct '07 - 16:29 »
You could check which entries are available in the Library. The ones you mentioned plus filesize, song length, playcount, last play and how long a file has been in the library aka "age" (most likely some sort of timestamp on when it was added). Now go dig and see if you see any similarities to those values. ;D

Ace386

  • Posts: 5
Re: xmplay.library file format
« Reply #2 on: 24 Oct '07 - 16:38 »
OK, thanks so far, but what would be really interesting is, how the file entries are separated from each other. The complete entries look like

some bytes
filename & the properties we mentioned before
some bytes
next file
etc...

So what are these bytes about? And how can I see where an entry starts, without only looking for 'D:\' or similar?

Ian @ un4seen

  • Administrator
  • Posts: 20400
Re: xmplay.library file format
« Reply #3 on: 26 Oct '07 - 15:06 »
In 3.4, the xmplay.library format is...

header:

byte: version (=3)
byte: 0
byte: 0
byte: string format (128=UTF8, else ANSI)

per-entry:

string: filename
string: track title
string: Title tag
string: Artist tag
string: Album tag
string: Year tag
string: Track tag
string: Genre tag
string: Comment tag
string: Filetype
dword: duration (ms)
dword: last play timestamp
dword: file size
dword: play count
dword: added timestamp
byte: flags

The entries end with a null filename.

Ace386

  • Posts: 5
Re: xmplay.library file format
« Reply #4 on: 26 Oct '07 - 15:53 »
Thank you very mouch, exactly what I needed! :D

Torkell

  • Posts: 1169
Re: xmplay.library file format
« Reply #5 on: 29 Nov '07 - 20:54 »
Is there a maximum length for any of the strings?

Also, what does the flags field mean?

Sam_Zen

  • Posts: 113
Re: xmplay.library file format
« Reply #6 on: 30 Nov '07 - 02:32 »
I support these questions.

saga

  • Posts: 2179
Re: xmplay.library file format
« Reply #7 on: 30 Nov '07 - 17:22 »
if there's a length limit, it will be either 256 or a very large number (speaking of 32bit values here ;D)

Ian @ un4seen

  • Administrator
  • Posts: 20400
Re: xmplay.library file format
« Reply #8 on: 30 Nov '07 - 17:22 »
Is there a maximum length for any of the strings?

Nope.

Also, what does the flags field mean?

Nothing much. I guess the one that may be of some interest is 16=overridden/locked tags.

nib60

  • Guest
Re: xmplay.library file format
« Reply #9 on: 8 Jan '10 - 19:54 »
In 3.4, the xmplay.library format is...

header:

byte: version (=3)
byte: 0
byte: 0
byte: string format (128=UTF8, else ANSI)

per-entry:

string: filename
string: track title
string: Title tag
string: Artist tag
string: Album tag
string: Year tag
string: Track tag
string: Genre tag
string: Comment tag
string: Filetype
dword: duration (ms)
dword: last play timestamp
dword: file size
dword: play count
dword: added timestamp
byte: flags

The entries end with a null filename.

Does v3.5 use the same library format?  Aka, can I just copy my old library into the new directory?

saga

  • Posts: 2179
Re: xmplay.library file format
« Reply #10 on: 8 Jan '10 - 19:59 »
You don't have to care about the library format as a user, just developers need to know the changes. But to answer the question, A new byte entry has been added to the format for the song rating.