INTERACT FORUM

Please login or register.

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

Author Topic: Library Reimporting Everything (not everything, but a ton)  (Read 1159 times)

hoyt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 863
Library Reimporting Everything (not everything, but a ton)
« on: July 28, 2014, 09:55:53 pm »

This is the second time this has happened in a recent memory.  I have a library server (virtual Win7 box) and two NAS's.  All of the media is on the NAS devices.  I turn the NAS's off on occasion, but the library server is rarely turned off.  I have auto-import set to Fix broken links: Yes (protect files on missing drives).  I just added 3 albums to one of my NAS's and I manually kicked off auto-import because for some reason it wasn't seen right away.  My MC now shows Adding file 2066 of 3254. 

A few months ago it did this same thing, so I killed the import process, and manually recovered an older library backup to see if it was an issue with that particular library.  That didn't help, I went back a few revisions and the import process kept magically finding thousands of files to import that were already there. 

The really annoying part is that MC is now retagging a lot, if not all of these files too.  The status bar says Saving Tag changes 750 remaining. 

Is there anyway to see what happened in the most recent import?  I don't know why it decided to see 3254 new files, when I only added about 40.  Thanks!
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Library Reimporting Everything (not everything, but a ton)
« Reply #1 on: July 28, 2014, 10:34:37 pm »

This is the Fix Broken Links feature, almost certainly.

First: If you have a NAS box, that you turn off sometimes, you probably want to turn Fix Broken Links OFF.  That, or make sure your files are all imported using a UNC-style path, rather than a mounted network drive letter.

I've explained some of the reasons (and something along the lines of what is happening to you) before:
http://yabb.jriver.com/interact/index.php?topic=89377.msg613530#msg613530
http://yabb.jriver.com/interact/index.php?topic=90161.msg619658#msg619658

The second thing, here:

This is the second time this has happened in a recent memory.  I have a library server (virtual Win7 box) and two NAS's.  All of the media is on the NAS devices.  I turn the NAS's off on occasion, but the library server is rarely turned off.  I have auto-import set to Fix broken links: Yes (protect files on missing drives).  I just added 3 albums to one of my NAS's and I manually kicked off auto-import because for some reason it wasn't seen right away.  My MC now shows Adding file 2066 of 3254.

So, when Fix Broken Links removes a file from the MC Database, it actually puts it in a separate Removed Files database.  You can see what is in this separate database if you want.  But basically, it puts them in "purgatory" (much like the Recycle Bin).  When it later sees this exact file again, then it doesn't have to re-import it fully, and re-analyze the file, it can actually just "undelete" it from this purgatory.  This has the added benefit that you don't lose metadata, since it just "restores" the old copy of the database entry.

What it does then, is check to see if the file itself has changed internally (checks all embedded tags and whatnot) and merges changes.  So, that's probably why you see it doing stuff.

The other possibility is if you have Update for external changes enabled in the Auto-Import settings.  In this case, if the files themselves change in any way, then MC updates the Library (the internal database) to match the tags in the files, and re-analyzes them.  This should really only happen if you've actually modified the files in an external application (though this could also be a copy of MC with a different Library loaded).  However...

I don't know for sure, but I can guess that there may be some NAS systems that don't keep perfect track of file modification timestamps (since many of them run a Linux filesystem underneath, and serve it to windows using Samba, which is pretty buggy).  So it is possible that the timestamp on the NAS sometimes doesn't match what MC saw when it originally imported them, and so it is re-checking a big swath of your Library periodically.

I keep that option turned off on my systems, because I always want MC's Library to be The Truth.  And, if I manually tweak a file in another application for one reason or another, then I can just select the file in MC and do Right Click > Library Tools > Update Library (From Tags) to re-sync it manually.  If you regularly re-tag files in a separate application (maybe sharing a music collection between MC and iTunes, for example) then it would be annoying to do it that way, so I can see cases where you'd want it on.  But that could be causing it too.

I still think since you said:

1. It is a NAS.
2. You turn it off sometimes.

It is probably confusing Fix Broken Links.  When files are imported on a drive letter, Windows really doesn't tell applications if the volume is a network one or not.  It is just slow and not always there, and they're left to guess.  So, MC has some logic and tricks it does to decide if a volume is a network one or not, but some NASes confuse it (particularly when being turned on or off, because they launch and mount things in odd orders sometimes).

One alternative thing you CAN do to solve it is to import all of the files using a UNC path (\\server\sharename\path\to\file.flac style).  MC treats all UNC paths as network volumes and always protects those files.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

hoyt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 863
Re: Library Reimporting Everything (not everything, but a ton)
« Reply #2 on: July 29, 2014, 09:25:01 am »

Wow.  Thank you for all the information!  You are right, I have my NAS devices mapped to drive letters, they are not network paths, so MC doesn't know that they're network drives.  I will read up on the links you provided to better understand that option.  Thanks!
Logged
Pages: [1]   Go Up