INTERACT FORUM

Please login or register.

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

Author Topic: Export to *.txt>Excel/Access>Re-Import?  (Read 2093 times)

Couch

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 86
  • Music. Sweet Music.
Export to *.txt>Excel/Access>Re-Import?
« on: August 21, 2004, 03:19:37 am »

Is it possible to export database data and modify it in Acces or Excel, and then re-import that data?

I have About 500 Files that I had previously 'cataloged' in Excel - I've Imported the files; Exported the Library and created a worksheet that now matches my existing data to the filenames. All of this data respects existing fields in MC.

Please Tell me I don't manually have to insert 500 Artists, Years, Months and Comments......

Thanks!
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re:Export to *.txt>Excel/Access>Re-Import?
« Reply #1 on: August 21, 2004, 05:52:11 am »

It is possible if you can export your data from Excel/Access in MPL format. Like this:
Quote
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0">
<Item>
<Field Name="Filename">E:\Test\Bob Marley &amp; The Wailers\Exodus (Deluxe Edition)\01 - Natural Mystic.MP3</Field>
<Field Name="Artist">Bob Marley &amp; The Wailers</Field>
<Field Name="Album">Exodus (Deluxe Edition)</Field>
<Field Name="Name">Natural Mystic</Field>
<Field Name="File Type">mp3</Field>
<Field Name="Genre">Other</Field>
<Field Name="Comment">CD 1</Field>
<Field Name="Bitrate">320</Field>
<Field Name="Image File">Exodus DE.jpg</Field>
<Field Name="Media Type">Audio</Field>
<Field Name="Last Played">1093083132</Field>
<Field Name="File Size">8312832</Field>
<Field Name="Duration">207</Field>
<Field Name="Number Plays">4</Field>
<Field Name="Track #">1</Field>
<Field Name="Date Created">1080467278</Field>
<Field Name="Date Modified">1093084653</Field>
<Field Name="Date Imported">1080467421</Field>
<Field Name="Replay Gain">-10,10766</Field>
<Field Name="Peak Level">0,99997</Field>
<Field Name="Intensity">2</Field>
<Field Name="BPM">95</Field>
<Field Name="Date">36892</Field>
<Field Name="Encoder">L3903api</Field>
</Item>
           etc...
</MPL>

When you import MPL playlists the corresponding music files are imported and all fields are merged with the library. It should be possible to do any kind of reports with Access, so you could just experiment with it.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

IlPadrino

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 496
Re:Export to *.txt>Excel/Access>Re-Import?
« Reply #2 on: August 21, 2004, 11:50:17 am »

Couch,

Let me get this straight...  you have items in MC that have no metadata (other than the required filename) and you have corresponding items in Excel that have all kinds of metadata and you want to get the Excel metadata into MC?

If the answer is yes, then there is a solution.  Confirm and I'll explain.

IlPadrino-

P.S.  Metadata is just a fancy name for data about data.  You call them fields in MC.
Logged

bvm

  • Regular Member
  • World Citizen
  • ***
  • Posts: 141
Re:Export to *.txt>Excel/Access>Re-Import?
« Reply #3 on: August 21, 2004, 04:15:40 pm »

Let me get this straight...  you have items in MC that have no metadata (other than the required filename) and you have corresponding items in Excel that have all kinds of metadata and you want to get the Excel metadata into MC?

I don't know about Couch's case, but I have a similar case where I have lots of items in MC that already have metadata (tags), but which I want to mass edit in an external editor more felicitous than MC.  For example, one that can do find & replace with regular expressions, something MC doesn't support.  Then I want to import that externally-edited data back into MC to update the metadata.  In the past, I've been told this is not possible.  If you have a solution, I'd love to hear about it.

As for Alex B's MPL solution, I've tried doing that (exporting to MPL, editing the mpl, importing), and either I don't understand it, or it doesn't work.  When I do Tools | Import Media and point to a directory with an mpl file in it (with mpl being one of the checked import types), it tells me no new files found.  Is there some other import mechanism I don't know about?
Logged

IlPadrino

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 496
Re:Export to *.txt>Excel/Access>Re-Import?
« Reply #4 on: August 21, 2004, 08:54:09 pm »

bvm,

Here's the thing you must understand:  import only works if the filename is not already present in the MC database.  So "no new files found " is the proper (well, expected anyway) response if you're trying to "merge" your external metadata with the metadata already in MC.  It took me a long time to figure that out :-)

The solution is to simply delete the media items that have the same filename as you're trying to import.  I do this quite often when I want to do some transformation on the entire library.   I first export the file metadata using scott_r's "MC XML Export" making sure I have all the metadata included.  I then transform the MPL into something more useful using XSLT - MC XML Export will let you automatically apply the XSLT.  When I'm done cleaning the data, I transform back to an MPL.  Then I delete the items from the library (after doing a backup, of course).  Then I simply import the MPL.

I wonder what would happen if I had all the tags stored in the file - and there was a collision between the file and the metadata in the MPL.  I'll have to try that sometime.

Bottom line:  it's a shame JRiver doesn't give us a way to do an update using an MPL to merge.  Scott_r had once talked about doing an MC XML Import, but I don't think it ever got off the ground.

So...  if you need more explanation, let me know.
Logged

Couch

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 86
  • Music. Sweet Music.
Re:Export to *.txt>Excel/Access>Re-Import?
« Reply #5 on: August 23, 2004, 12:00:24 am »

Yes I want the 'MetaData' imported into MC.

It looks like I'll have to delre my library, after exporting what 'metadata' I've got in MC via MPL. Modify that in Excel and re-export to a file, rename as mpl, and re-import into MC?

Couch
Logged

IlPadrino

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 496
Re:Export to *.txt>Excel/Access>Re-Import?
« Reply #6 on: August 23, 2004, 01:40:25 am »

Yes I want the 'MetaData' imported into MC.

It looks like I'll have to delre my library, after exporting what 'metadata' I've got in MC via MPL. Modify that in Excel and re-export to a file, rename as mpl, and re-import into MC?

Couch

An MPL is an XML document conforming to a schema established by JRiver.  If you're going to import into Excel directly, you're probably generating an ASCII delimited (i.e. CSV) export.  But in order to reimport into MC, you'll need an MPL - and there's no easy way to get Excel to do that for you.

If you're more comfortable using Access to merge the data, then I suggest you use the MC XML Export plugin with the preset for Access.

If you have a file (Excel or Acess) with all the metadata for your media items, I'd be willing to transform it into an MPL for you.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re:Export to *.txt>Excel/Access>Re-Import?
« Reply #7 on: August 23, 2004, 03:56:26 am »

Bottom line:  it's a shame JRiver doesn't give us a way to do an update using an MPL to merge.  Scott_r had once talked about doing an MC XML Import, but I don't think it ever got off the ground.


Here's hoping they include this in v11.

I somehow am a bit sceptical as its a rather dangerous feature (in inexperienced hands) and they would like to keep "my library got corrupted" threads to a minimum.
Logged

IlPadrino

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 496
Re:Export to *.txt>Excel/Access>Re-Import?
« Reply #8 on: August 23, 2004, 09:16:19 am »

I somehow am a bit sceptical as its a rather dangerous feature (in inexperienced hands) and they would like to keep "my library got corrupted" threads to a minimum.

There are many ways to prevent (or certainly reduce) unintended consequences.  One example (taken from a computer-aided facility management application) is the simple inclusion of a header containing
Code: [Select]
<Parameters AllowInsertions="1" AllowUpdates="0"/>
This lets you explicitly choose insertions and updates.  With some logging of the results, it becomes quite easy to make sure you've gotten the intended results (i.e. xxx Items (yyy total fields) updated and zzz Items inserted).
Logged
Pages: [1]   Go Up