INTERACT FORUM

Please login or register.

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

Author Topic: Import/export spesific library fields  (Read 2695 times)

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Import/export spesific library fields
« on: September 28, 2008, 12:50:01 pm »

I got screwed up while importing some new albums. The end result being that I had to import all the files in a fresh library.
Auto Import imported all my music so I had double in my library. I could not make it import the new tracks only.
More about that story here: http://yabb.jriver.com/interact/index.php?topic=48427.0
With the new library I have now lost all "Number Plays" and "Import Date" data. That's at least the most important ones.

After my last backup of my old library I have tagged alot of Genres and ratings, so I'm looking for a way to go to my backup and "export" this tags only.
I thought of setting this tags to "Store in File Tags When possible" and update from external files, in my new library.
Will this work as I want it to? Is there a simpler way?
Logged
- I may not always believe what I'm saying

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Import/export spesific library fields
« Reply #1 on: September 29, 2008, 09:49:47 am »

Nobody have any suggestions, or have most of you guys ran off to the MC 13 board?
Logged
- I may not always believe what I'm saying

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Import/export specific library fields
« Reply #2 on: September 29, 2008, 10:06:26 am »

You can use MPL file for that, but you would need to edit its XML code outside MC.

I have read your both threads and I not sure what I should answer because I am not quite sure what did you actually do and what happened.

It is quite possible to preserve old library values when the intention to replace old lossy tracks with new, "reripped", lossless tracks and preserve all library data. I have explained the system I use a couple of times and there are other possibilities too. Though there is no automatic way do that.

If you can still restore a library backup and start from the beginning I can give you step by step instructions.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4565
Re: Import/export spesific library fields
« Reply #3 on: September 29, 2008, 10:17:21 am »

not sure, but could the 'update database to point to new location' tool help? its under rename and copy files.
Logged

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Import/export spesific library fields
« Reply #4 on: September 29, 2008, 05:24:15 pm »

Sorry I did not make this clear enough. Messy writing on my part. I'll try to make it clearer.

The problem:
- I managed to delete the old MP3 and replaced them with Flac. All tags dissappeard from those albums. I'll not make the same mistake twice.
- Manual running of Auto Import added all my files to the library again. Not just my new tracks.
- Ended up having to delete my music part of the library to add the new files (did not think of Play counters, Import date and more). Hate manually adding one and one album.

My situation now:
- A one week old library backup with 15 000 tracks of all my previous tags like Imported data, Playing counters etc.
- A new library with 16 000 tracks. 500 of the new tracks rated, and 1000 new Genres tags set per album. 15 000 of the tracks now with wrong import date, play counters and similar.

I would like to use my current library, but reload the old one and get Play Counters and Imported dates imported to the new library. At least that's the tags that count the most I think.
I do not want to go back to add the tracks there, beacause I might end up with a "double" library again and I have to rate and set the genres again.
If I could import the new ratings and genere to the old backup and know the reason why the Auto Import fucks up, then I might consider it.

Update database to point to new location might have worked if I used it to find the new flac files? But this is not the biggest problem now.

Any suggestions? I'd hate to do the 6 hours work on the rating and genre again.
Logged
- I may not always believe what I'm saying

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Import/export specific library fields
« Reply #5 on: September 30, 2008, 04:05:39 am »

If you can load you old library (even when the files are missing) you can export an MPL playlist of the old files.

If the only change in the filenames is the filename extension you can use a text editor for mass changing all .mp3> instances to .flac> and all File Type values to show FLAC instead of MP3.

The Import Playlist tool can update all library field values from an MPL file.

Later on you can fix the bitrate and other format specific fields by forcing a file tag read. (Update library from files).
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Import/export spesific library fields
« Reply #6 on: September 30, 2008, 04:16:18 am »

If you can load you old library (even when the files are missing) you can export an MPL playlist of the old files.

If the only change in the filenames is the filename extension you can use a text editor for mass changing all .mp3> instances to .flac> and all File Type values to show FLAC instead of MP3.

The Import Playlist tool can update all library field values from an MPL file.

Later on you can fix the bitrate and other format specific fields by forcing a file tag read. (Update library from files).

Please forget the MP3 to Flac upgrade. It's not an issue any more. It's the moving of tags that's important now, and I think you're on to the right solution.
I've newer given the Export playlist function much though. I'll try to import the data from the old library to my new library when I get home.
I'm a bit worried that the MP3's I've just changed with flack will be listed as MP3 again though. In the worst case I'll add data from the new backup to those tracks.
Is there any way to activate the field "Include only visible fields" from the export playlist feature? It does not mather what ever I choose it seems...
Logged
- I may not always believe what I'm saying

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Import/export specific library fields
« Reply #7 on: September 30, 2008, 04:38:36 am »

I am speaking about loading an off-line backup library of your old MP3 files and exporting an mpl playlist.

If you can do the find and replace operation correctly (outside MC) an mpl import will update the FLAC files you have now.


The MPL export is practically a full dump of the library data. It does not allow to select the exported fields.

You can export only the visible fields to a tab delimited format or copy paste the visible fields to Excel (or a similar program), but you would need to use external tools for converting the data to XML format (which is used inside MPL files). I guess that would not be easy unless you happen to find a program that can automate the process.


You could search the forum for MPL and my user name for more info.


EDIT

If this wasn't obvious, you can save the Genre and other possibly changed tags to the FLAC files and disable file tagging in MC so that the FLAC files would not be accidentally changed. After you have finished with the mpl import you can do the "Update Library from files" step and those tags will be returned. Naturally you should disable the auto-import tool before doing this kind of operations.

EDIT 2

I have tried to find an XML editor that could find and completely remove named fields indepedently of the changing field values. It would be easy to remove e.g all Genre fields and field values (i.e. the complete lines) from an mpl file with a such tool. I have installed several freeware and shareware XML editors, but I have not found anything that could do this.
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: Import/export specific library fields
« Reply #8 on: September 30, 2008, 05:06:31 am »

Actually, If you are going to use an off-line backup library I think you can simply remove the values you don't want to be included. For instance, you can remove all Genre tags and if I am correct the MPL file will not contain the Genre fields at all.

At least, it works with my custom fields - only the fields with values are included, but I have not tried it with the usual standard fields.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Import/export spesific library fields
« Reply #9 on: September 30, 2008, 05:17:56 am »

Thanks alot Alex. I'll put you're suggestions up to the test later on.
Logged
- I may not always believe what I'm saying

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Import/export specific library fields
« Reply #10 on: September 30, 2008, 05:22:29 am »

In addition, when working with an off-line library you can use MC's Find and Replace tool for fixing the file types and filename extensions inside MC before exporting anything.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Import/export spesific library fields
« Reply #11 on: September 30, 2008, 11:36:20 am »

This did not exactly go acording to my plan...

I Exported the MPL file with the newly imported tracks from my most recent library, as well as the whole library of old data from an older backup.

After loading the most recent backup and importing the MPL file with all the old data, I ended up with the double library again. I tried to delete the whole thing and then import the playlist again. This brought back the Number Plays, Last Played date etc. Yey!! But to my huge dissapointment the imported date was reset to this days date.

If any of you don't have any bright ideas as to how to bring all my data back, I think I have to do this the other way around. To use the old backup as a base, and then import the data from most of the new albums that I can remember.
Wait.... That might make the tracks show up as doubles again. Leaving out all the flac and other mp3 albums (that I can remember) wich I imported last, will result in blanking out the Ratings, genres, sub genres etc that I used hours on.

God. What a nightmare!
Be frank now. Is my best option just to forget about the Imported dates?
Logged
- I may not always believe what I'm saying

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Import/export specific library fields
« Reply #12 on: September 30, 2008, 12:02:48 pm »

I think you are still doing things quite hastily. Naturally, you should first test this kind of procedures with a couple of files and a small test library so that you can easily try several different ways to do things. You could probably have avoided the whole problem by running some tests first. Now you still continue doing big moves without knowing what exactly will happen.

If you had searched the forum you might have found my posts about how the mpl file must be imported twice if it adds unimported files to a library and the intention is to preserve the original Date Imported values. The first MPL import populates all field data and after that MC marks the newly imported files as actually imported. This changes the Date Imported value to the current. However, if you import the MPL file once again the latter does not happen (since the files are already imported) and the Date Imported field gets updated from the MPL file.

Also, if this is wasn't already clear, only the Import Playlist tool in the File menu can fully update existing library files. The other import methods are designed to be less powerful to avoid accidents.

EDIT

If the filenames in the MPL file match exactly the filenames you have in the library then it should update all field values from MPL on the first import. If the filenames don't match it will either import nothing (if there are no physical files to import) or it will add new files to the library (if the named files exist).
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Import/export spesific library fields
« Reply #13 on: September 30, 2008, 01:15:30 pm »

I think you are still doing things quite hastily. Naturally, you should first test this kind of procedures with a couple of files and a small test library so that you can easily try several different ways to do things. You could probably have avoided the whole problem by running some tests first. Now you still continue doing big moves without knowing what exactly will happen.

Last time I screwed up it was because the Auto Import did not work as I though it would. That's why it messed things up so good, with alot of files.
Normally I would experiment on a small set of files, but that does not mather much now. I should have the backups I need.

If you had searched the forum you might have found my posts about how the mpl file must be imported twice if it adds unimported files to a library and the intention is to preserve the original Date Imported values. The first MPL import populates all field data and after that MC marks the newly imported file as actually imported. This changes the Date Imported value to the current. However, if you import the MPL file once again the latter does not happen (since the files are already imported) and the Date Imported field gets updated from the MPL file.

Also, if this is wasn't already clear, only the Import Playlist tool in the File menu can fully update existing library files. The other import methods are designed to be less powerful to avoid accidents.

EDIT

If the filenames in the MPL file match exactly the filenames you have in the library then it should update all field values from MPL on the first import. If the filenames don't match it will either import nothing (if there are no physical files to import) or it adds new files to the library (if the named files exist).

You're right. I'd probably find it if I had just looked. Sorry about that. Sometimes I simply forget to do it.
I'm using the Import Playlist tool and it works as you describe. Import twice and the Import Date from the playlist is also updated.

Just loaded the new library backup and imported the old MPL file over it, twice. I ended up with almost 95% double tracks in the library again.
Why are they added again when no tag except the import date it different? Any good reason for this?
Anyway. I was able to seperate the old tracks from the batch with new albums I added only minutes later. So I deleted the old tracks, and ended up with the exact number of tracks as I had in the new library earlier. Yes!! I'm saved.

Thanks alot for the help Alex. You're pretty patient :)

Logged
- I may not always believe what I'm saying

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Import/export specific library fields
« Reply #14 on: September 30, 2008, 01:34:18 pm »

You're welcome. I'm glad you finally got it right.

(I don't know about the duplicates. They are not appearing without a reason, but I guess I would need to carefully inspect your file structure, your library, your set options, and the mpl file(s) and then run various tests. Could we just let this matter rest, at least for now? :) )
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Import/export specific library fields
« Reply #15 on: September 30, 2008, 04:58:10 pm »

(I don't know about the duplicates. They are not appearing without a reason, but I guess I would need to carefully inspect your file structure, your library, your set options, and the mpl file(s) and then run various tests. Could we just let this matter rest, at least for now? :) )

Yea. I think I'll investigate more in the subject when it comes to Auto Import. It happens there as well. I'll post more about it in another thread I created, when I have something more concrete.
Logged
- I may not always believe what I'm saying
Pages: [1]   Go Up