INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Problem with exporting to .mpl <Field Name="Get Cover Art Info">  (Read 1771 times)

justsomeguy

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 525

While testing a project I'm working on using MC playlists, the last field <Field Name="Get Cover Art Info">  has two cr and lf inserted that breaks the field up into 3 lines. I noticed this because I'm reading and parsing the playlist on a per line basis and when the field is broken into multiple lines it breaks my parsing. I can think of a way to work around it but it seems like maybe that field isn't actually intended to be that way.


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="New Playlist (1)">
<Item>
<Field Name="Filename">F:\Mp3\Albums\Complete Albums\Rock\Queen\1994 - Greatest Hits (Disc 1)\Queen - Greatest Hits (Disc 1) - 01 - Bohemian Rhapsody.mp3</Field>
<Field Name="Artist">Queen</Field>
<Field Name="Album">Greatest Hits (Disc 1)</Field>
<Field Name="Name">Bohemian Rhapsody</Field>
<Field Name="File Type">mp3</Field>
<Field Name="Genre">Rock</Field>
<Field Name="Date">34335</Field>
<Field Name="Bitrate">184</Field>
<Field Name="Image File">INTERNAL</Field>
<Field Name="Media Type">Audio</Field>
<Field Name="File Size">8249129</Field>
<Field Name="Duration">358.34699999999998</Field>
<Field Name="Track #">1</Field>
<Field Name="Date Created">1294033143</Field>
<Field Name="Date Modified">1295140940</Field>
<Field Name="Date Imported">1295140886</Field>
<Field Name="Replay Gain">-8.6400000000000006</Field>
<Field Name="Peak Level">0.8655099868774414</Field>
<Field Name="Sample Rate">44100</Field>
<Field Name="Channels">2</Field>
<Field Name="Bit Depth">16</Field>
<Field Name="Compression">VBR (MPEG-1 Layer 3)</Field>
<Field Name="Album Gain">-8.0076475143432617</Field>
<Field Name="Complete Album">1</Field>
<Field Name="Get Cover Art Info">&lt;XMLPH version="1.0"&gt;
&lt;Item Name="LastFailedDate"/&gt;
&lt;/XMLPH&gt;</Field>
</Item>
Logged

ADDiCT

  • Regular Member
  • World Citizen
  • ***
  • Posts: 235
  • I'm a bad llama!
Re: Problem with exporting to .mpl <Field Name="Get Cover Art Info">
« Reply #1 on: January 20, 2011, 05:26:13 am »

Well, XML isn't supposed to be parsed like a simple text file, is it?  ;) I've successfully parsed MPL with the MSXML parser and a few simple third-party parsers. Using one of those has the additional benefit of it handling all the entity and encoding stuff properly, both for encoding and decoding.
Logged

justsomeguy

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 525
Re: Problem with exporting to .mpl <Field Name="Get Cover Art Info">
« Reply #2 on: January 20, 2011, 06:55:39 am »

ya, nevermind... not sure what I was thinking.  Not enough sleep lately.  I'm having trouble figuring out the encoding in the dates in the mpl. Can you point me in the right direction?
Thanks
Logged

Lasse_Lus

  • Citizen of the Universe
  • *****
  • Posts: 999
Re: Problem with exporting to .mpl <Field Name="Get Cover Art Info">
« Reply #3 on: January 20, 2011, 07:22:25 am »

I'm having trouble figuring out the encoding in the dates in the mpl. Can you point me in the right direction?

you have two types of dateformats in MC "Excel" and "Unix", Date imported, modified and created uses the unix version and date uses "Excel" so you have to convert

you can read about how to here
http://excel.tips.net/Pages/T002051_Converting_UNIX_DateTime_Stamps.html

or check the clock here

http://www.unixtimestamp.com/index.php

the Date Field in MC (used for year) is number of days since 1900-01-01
Logged
MT5FR

justsomeguy

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 525
Re: Problem with exporting to .mpl <Field Name="Get Cover Art Info">
« Reply #4 on: January 20, 2011, 04:00:36 pm »

Thank you
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Problem with exporting to .mpl <Field Name="Get Cover Art Info">
« Reply #5 on: January 20, 2011, 04:41:39 pm »

The internally used precise date values (the Microsoft and UNIX epochs in MC explained):

http://yabb.jriver.com/interact/index.php?topic=59513.msg404286#msg404286
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

justsomeguy

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 525
Re: Problem with exporting to .mpl <Field Name="Get Cover Art Info">
« Reply #6 on: January 20, 2011, 07:10:53 pm »

Thanks Alex that helped.  Am I right to assume that if the internal MC date is 34335 then in MC it displays 1994 and 34335.0 would display 1/1/1994 12:00 AM.  Does MC use whether the decimal point exists or not to determine how to display that date?
Logged

justsomeguy

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 525
Re: Problem with exporting to .mpl <Field Name="Get Cover Art Info">
« Reply #7 on: January 20, 2011, 07:51:24 pm »

Was also wondering if there is a list somewhere outlining every possible field that can saved to the mpl when exporting in MC?  It obviously exports some fields that are only internal to MC and not viewable normally by the user. I'm trying to read all "user viewable" fields in the mpl and want to ignore these other fields.
Logged
Pages: [1]   Go Up