INTERACT FORUM

Please login or register.

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

Author Topic: Combining Libraries  (Read 1734 times)

vbphil

  • World Citizen
  • ***
  • Posts: 136
Combining Libraries
« on: October 07, 2019, 09:19:47 am »

I'm sure this has been asked but searching is futile. I've pretty much read and tried the topics on Moving and Copying files but it doesn't seem to complete the whole job of moving certain files from one Library to another.

I've got 2 Audio Libraries with the files in 2 different root folders on the same Drive letter. I want to move (or copy, doesn't matter) the one Library's metadata contents into the other Library as well as move (or copy) the files into that Library's root. Not necessarily all the files just ones in a selection or playlist or whatever is appropriate.

What is the best procedure for doing this?

Thanks,   -phil
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Combining Libraries
« Reply #1 on: October 07, 2019, 02:26:08 pm »

I think we probably need some more details to give you good advice.

Do you have two separate MC libraries, which you switch between using File > Library > (choose library) ?

If not, are either of your top level directories (or both) imported into MC?

Brian.
Logged

vbphil

  • World Citizen
  • ***
  • Posts: 136
Re: Combining Libraries
« Reply #2 on: October 07, 2019, 02:31:14 pm »

Yes they are 2 separate Libraries.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Combining Libraries
« Reply #3 on: October 07, 2019, 02:50:18 pm »

Ok, that makes things more complex.  I would recommend this general outline to start with:

1.  Back up both libraries.
2.  Export/Import one of the libraries into the other, so one of your libraries contains all of the metadata and references to all of the files; in both locations.
3.  Run a Rename, Move, and Copy files operation to physically move the files from one directory tree into the other.  This is actually not strictly necessary. MC will see everything in both directories after step 2.  But if you want to do this step with RM&C, to make everything neat and in one place, that makes sense to me.

Step 2 is the weird one.  I've never done that before.  I think you can do something like this:

A.  Back up both libraries.
B.  Go to Library 1 in MC. 
C.  File > Export Playlist .  Export as MPL and make sure you have everything selected.  This should yield a fairly large text file with a .MPL extension and have metadata for every file in Library1.
D.  Go to Library2 in MC.
E.  File > Import Playlist .  Tell it to import the MPL file from Library1.

I have read in the past that the import of an MPL *might* need to be done twice.  Sometimes it seems that the first import just gets you a "stub" and the second one fills in all of the metadata.

You would need to experiment with this.  That's why I recommend a Library Backup before you do anything.  That way you can revert if necessary.

You definitely want to get the Library combining operation done before you move any files around.  Otherwise it will be very confusing.

Good luck.

Brian.
Logged

vbphil

  • World Citizen
  • ***
  • Posts: 136
Re: Combining Libraries
« Reply #4 on: October 07, 2019, 03:09:39 pm »

I'm stuck at step 2 with an Export/Import. Can you explain how you would export library metadata and then import library metadata? I've been running the Library command Export To XML from the Library Manager to get XML files that I then use elsewhere and I find that not all of the metadata is included. The only way I've seen to import metadata is with a playlist import. I've done the MPL export/imports before and all I end up with is a playlist displayed under the Imported Playlist node in Playlist and none of the data is added to the Library that did the Import.

Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Combining Libraries
« Reply #5 on: October 07, 2019, 03:15:14 pm »

I'm stuck at step 2 with an Export/Import. Can you explain how you would export library metadata and then import library metadata?

As I said, I have never done this before.  I speculate that my procedure labeled A through E above would do it:

Code: [Select]
A.  Back up both libraries.
B.  Go to Library 1 in MC.
C.  File > Export Playlist .  Export as MPL and make sure you have everything selected.  This should yield a fairly large text file with a .MPL extension and have metadata for every file in Library1.
D.  Go to Library2 in MC.
E.  File > Import Playlist .  Tell it to import the MPL file from Library1.

But like I said, that's speculation; I'm not sure.

Quote
The only way I've seen to import metadata is with a playlist import. I've done the MPL export/imports before and all I end up with is a playlist displayed under the Imported Playlist node in Playlist and none of the data is added to the Library that did the Import.

Yes, MPL is the way to go.  I've done some limited testing with this and MPL export/import is the native way that MC was designed to work. 

You said that you don't see anything other than a playlist when you do this.  Remember what I said in my last post about needing to do the MPL import twice?  Try running the MPL import, and then run it again, the same way, right after.  That might actually populate all of the data into MC correctly.

Brian.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Combining Libraries
« Reply #6 on: October 07, 2019, 03:32:12 pm »

There's also another option...  That is by ensuring all metadata is in the files themselves.

In the library that you want to import, go to Options->Library & Folders->Manage Library Fields.
For all fields (that you care about) ensure that "Save in File Tags (when possible)" is checked.
Then select all your files and do an Update tags from Library.

Then simply import those files into the new library, and all the tags will come with them.
Playlists you can import separately, but you knew that already.
User defined fields cannot be copied from one library to another by either this method or Brian's unless the field definition has already been created in the destination library first; creating user defined field definitions is a manual task.

This is the method I would take in your situation, if I just wanted to get media and metadata from one library to another by adding not replacing.

To me "combining libraries" means also merging in the views and other such things, and that has to be done separately by using save view then load view...
Logged

vbphil

  • World Citizen
  • ***
  • Posts: 136
Re: Combining Libraries
« Reply #7 on: October 07, 2019, 04:22:06 pm »

Wer's option is pretty good although I'm not familiar with what tags that will and won't work with and what file types. I have mp3, acc, alac, flac, aif and who knows could be more down the road. Right now I'm moving some mp3 files so I'll give that a shot to see how it works.

You're right about "combining" would mean all that other stuff. I was just concerned about the song files and their metadata.

I tried importing a playlist, 2 times, as Brian mentions but it still doesn't add the metadata to the Library database. I'm not sure where that imported playlist is saved in the Library but it acts like the content isn't in the main database, i.e. the song metadata doesn't show up in the standard Views. I do see how playlist importing could be helpful but not for this case that I'm trying to accomplish.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Combining Libraries
« Reply #8 on: October 07, 2019, 07:37:24 pm »

If you don't know what fields you want, just turn it on for all of them.
You can also turn on sidecar files, even for audio.  I haven't had it happen that MC couldn't embed a tag in an audio file, but using the sidecar files will make sure everything come across regardless.

Brian's method does work, and without touching your media files.  But there are thing that can go wrong with the playlist method.  If the metadata is in the files you should always be safe.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Combining Libraries
« Reply #9 on: October 08, 2019, 01:39:23 am »

The is also the "File > Library > Sync Library" functionality.

If both these Libraries are on the one PC you would need to enable "Options > General < Advanced > Allow multiple instances to run at the same time" to run the server for Library A, and then Sync to Library B. There could be some complications with this though, in connecting to the correct Library.

I have played with that functionality a little and achieved mixed results. But it is an option.


I was also wondering if there was any way to import the XML file created by the "Export To XML" function, but there doesn't seem to be. I tried to import the XML file and MC did just that, without adding the records contained in it to the Library. It seems strange to have an XML Export but not corresponding Import.

I think both those functions, "Sync Library" and "Export To XML", are carryovers from earlier times, and have been "replaced" by the Client/Server solution.


It would be far easier if there was a "Merge Libraries" function. But I guess it would get used enough to warrant the work!
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

vbphil

  • World Citizen
  • ***
  • Posts: 136
Re: Combining Libraries
« Reply #10 on: October 08, 2019, 09:10:05 am »

I found that the easiest option that is working for me was given by Wer a few messages ago.
For my test:
  • I selected the songs from one album in Library A using the Audio/Artist view.
  • Did a "Update Tags From Library" from the Library Tools context menu
  • From the Windows Explorer I copied the mp3 files with their folders from the Library A root to Library B root.
  • I then loaded Library B into MC, and did a Import folder from the Library Manager Tools for the album I'm copying over.

Library B now contains the Album completely as expected. To my surprise ALL of the tags came over, including ones I created as they also existed in Library B's configuration.

Thanks for the replies. This is the method I'll use until a better comes along. Thanks Wer.
-phil
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Combining Libraries
« Reply #11 on: October 08, 2019, 09:37:51 am »

Nice job wer and vbphil!

Brian.
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3125
Re: Combining Libraries
« Reply #12 on: October 08, 2019, 01:59:57 pm »

May not be relevant, but if you have calculated fields in the source library that are not in the destination library you will need to create the calculated fields in the destination library. Probably not relevant, but just in case....
Logged

vbphil

  • World Citizen
  • ***
  • Posts: 136
Re: Combining Libraries
« Reply #13 on: October 08, 2019, 03:22:38 pm »

yes, any user custom fields have to exists in the destination before importing and also make it into the file as a tag. i don't have any calculated custom fields so no experience with it.
Logged
Pages: [1]   Go Up