INTERACT FORUM

Please login or register.

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

Author Topic: Trouble importing MPL xml file to update tags  (Read 3428 times)

jbpsrca

  • Recent member
  • *
  • Posts: 16
Trouble importing MPL xml file to update tags
« on: February 15, 2010, 08:22:51 pm »

Hi folks,

Alex B gave me some great tips for mass loading tag data to MC14 library from an external data source: create an XML MPL file, and use File / Import Playlist. Tips were from these links:

http://yabb.jriver.com/interact/index.php?topic=50126.msg360076#msg360076
http://yabb.jriver.com/interact/index.php?topic=40963.msg279717#msg279717

However - I must not be doing something right. The MPL file Imports successfully, but the tag info for the selected file (in this sample, tag field Album) does not update. Can anyone see what I am doing wrong?

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="schmooga">
<Item>
<Field Name="Filename">F:\Music\99 Songs\Alan Parsons Project - Sirius.wav</Field>
<Field Name="Album">Borders Mix 11 - Jeff</Field>
</Item>
</MPL>

The XML file shows up in the Recently Imported playlist, the the Tag Data for this song don't update. Is there a formatting error in my XML? Or is there another step I am missing?

Thanks

Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Trouble importing MPL xml file to update tags
« Reply #1 on: February 15, 2010, 11:23:52 pm »

You must use the File > Import Playlist... menu command.

A quick search found the following reply. I quoted it here because also the "relative paths" info may be useful:

MPL works fine over various MC instances when you export it to a common basefolder on the same partition where the files are. You must use the "Store paths relative to exported playlist location" option so that the drive letter and other preceding parts of the path will not be included in the filename field values.

For instance,

If you have the video files in:
D:\media\video\TV series
D:\media\video\movies
D:\media\video\home videos
You can select all video files and export an MPL file to D:\media\video\

If another PC has the same video files in
C:\video stuff\TV series
C:\video stuff\movies
C:\video stuff\home videos
you can place the MPL file from the first PC in
C:\video stuff\
and import it from there.

Auto-import can add new files (including tags) from an MPL file, but it is designed to not update existing tags in already imported files to avoid accidents.

The menu command File > Import Playlist... is more powerful. It can import new files and update old file tags from an MPL file. It replaces all included field values in the target library.

An MPL file is in XML format. You can open an MPL file in Notepad or some other editor and edit the values before importing.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

jbpsrca

  • Recent member
  • *
  • Posts: 16
Re: Trouble importing MPL xml file to update tags
« Reply #2 on: February 16, 2010, 03:48:11 pm »

Hmm... still stuck.

I am using the menu option File / Import Playlist

I couldn't find the option for the "Store paths relative...", but I've tried moving the XML file into my single directory with my wav files, and it still didn't help.

It looks like this should be pretty easy, but I can't figure out what's failing. I'm assuming the MPL file does a match based on the Filename field only? nothing else has to match? And if I have the Filename values typed exactly as it is in the file's Tag in MC (including full path), it should find it?
Logged

Lasse_Lus

  • Citizen of the Universe
  • *****
  • Posts: 999
Re: Trouble importing MPL xml file to update tags
« Reply #3 on: February 17, 2010, 03:28:59 am »

jbpsrca, also include mediatype
like <Field Name="Media Type">audio</Field>
Logged
MT5FR

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Trouble importing MPL xml file to update tags
« Reply #4 on: February 17, 2010, 03:54:24 am »

Good point, "Media Type" may be needed if the wav files are not yet imported.

I actually tested jbpsrca's example MPL file and it updated the album field when I had a wav file with that filename already imported, but I didn't try if it would import a new file.

I recall that in some cases the MPL file must be imported twice, the first "import playlist" command imports the files and the second import updates the field values, but I don't remember if that is always the case, perhaps it is needed only when the files have tags that may overwrite the values that were included in the MPL files.

In addition, MPL import does not create new library fields. If it includes user fields they must already exist otherwise the field values have no place to go.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

jbpsrca

  • Recent member
  • *
  • Posts: 16
Re: Trouble importing MPL xml file to update tags
« Reply #5 on: February 18, 2010, 09:20:06 pm »

darn. still not working...

delighted to hear Alex can load my test file successfully on his machine - so what am I doing wrong? it's got to be something simple (er... or stupid?).

I tried adding "Media Type" tag, no luck
I tried having a file in the xml that is already in the library (update), and one that is not (new) - no luck
I tried renaming the extension of the mpl file to .xml, and also .xml, no luck.

In all cases, File / Import Playlist "works", because the imported mpl file shows up in my library's imported files, but no updates are performed on tags.

When File / Import Playlist is run, the Summary dialog box says:

     Library now has 7820 files. Search and update took 0:00

     Imported 0 new files.
     Updated 1 file that had external changes.

     In depth details:
     Updated:

           F:\99 Songs\MC In test 2.xml

I would think there would be info in the Summary that would say "xx tags updated". When it works for you, do you get a different Summary information?

Sorry to be so dense. starting to get a bit frustrating, next step might be to bite the bullet, and just edit the 7800 tags manually... Hope not, tho - any last bits of help greatly appreciated. Cheers!
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Trouble importing MPL xml file to update tags
« Reply #6 on: February 19, 2010, 04:42:13 am »

I think the filename extension must be .mpl if you want to update field values (though, I have not specifically tested this).


If you are still willing to investigate the issue, could you do the following (as a test):

1. Create a new empty library with the Library Manager and load it.

2. Disable the Auto-Import feature (just to make sure that it doesn't do anything while the test is performed) and drag a couple of wave files from Windows Explorer to MC's Playing Now list.

3. Select the files and tag a few basic tags.

4. Export the Playing Now list as an MPL playlist.

5. Open the resulting MPL file in Notepad and change some of the tag values. Take care that the headers do not change anyhow. Save the file.

6. Import the edited MPL file by using the File > Import Playlist feature.

Did it work?

If it the tag values did not change, but the playlist appeared in "Imported Playlists" and contains the test tracks, import the MPL playlist once more.

Did it work now?
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Trouble importing MPL xml file to update tags
« Reply #7 on: February 19, 2010, 04:59:41 am »

I couldn't find the option for the "Store paths relative..."

I forgot to answer this. It is an export option. It can store the filenames in a relative format.

For instance,

- when the real file path is  E:\Music\Classical\Beethoven\9 symphonies\Gardiner\

- and a "relative" MPL file is exported to  E:\Music\Classical\Beethoven\  the included path will start from "9 symphonies".

When a "relative" MPL file is imported it must come from the correct root directory. Otherwise the relative path is invalid.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Lasse_Lus

  • Citizen of the Universe
  • *****
  • Posts: 999
Re: Trouble importing MPL xml file to update tags
« Reply #8 on: February 19, 2010, 05:14:38 am »

just a little note, what format is your textfile in (mpl) ?

if it's not "Dos\Windows ANSI as UTF-8" change to that format
Logged
MT5FR

jbpsrca

  • Recent member
  • *
  • Posts: 16
Re: Trouble importing MPL xml file to update tags
« Reply #9 on: February 20, 2010, 06:31:19 pm »

Excellent! Works now.

Never figured out what was wrong, but your suggestion of trying a new test library was the trick. Test library worked fine, so I just created a whole new Real library, reloaded all my songs to the library, and now the File/Import Playlist is working like a charm. Maybe something wrong or corrupted with the original library? Don't know, don't care. New library works fine, and I'm on my way.

Thanks soo much for the help.

Cheers!
Logged
Pages: [1]   Go Up