INTERACT FORUM

Please login or register.

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

Author Topic: Library Problem  (Read 2256 times)

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Library Problem
« on: April 13, 2015, 11:44:41 am »

I've noticed on 2 occasions in the last week or so that a whole load of entries have been deleted from my library. It's not deliberate and I don't know why it would be happening. The fact it's happened twice now suggests a gremlin somewhere but I don't know where to look. Can anyone suggest steps to take to debug such a problem?

The attached pic shows the time periods when the deletions must have happened. I have restored from a backup each time. The current jriver logs don't cover the time periods mentioned so I have no logging to refer to.

This is a 20.0.93 server with 1 20.0.93 client connected to it and also android jremote + gizmo in use. Win 8.1 for the OS and all content stored on network drives.

The jmd files in the backups aren't obviously parseable so I can't easily look at the diffs to see if there is a pattern to the entries deleted.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Library Problem
« Reply #1 on: April 13, 2015, 11:58:07 am »

I've noticed on 2 occasions in the last week or so that a whole load of entries have been deleted from my library. It's not deliberate and I don't know why it would be happening. The fact it's happened twice now suggests a gremlin somewhere but I don't know where to look. Can anyone suggest steps to take to debug such a problem?

The attached pic shows the time periods when the deletions must have happened. I have restored from a backup each time. The current jriver logs don't cover the time periods mentioned so I have no logging to refer to.

This is a 20.0.93 server with 1 20.0.93 client connected to it and also android jremote + gizmo in use. Win 8.1 for the OS and all content stored on network drives.

The jmd files in the backups aren't obviously parseable so I can't easily look at the diffs to see if there is a pattern to the entries deleted.

Do you :

a) have auto-import running in the background and
b) have "fix broken links" enabled or set to "protect network drives"?

If so, try disabling fix broken links.  My experience has been that the "protect network drives" option is not 100% reliable (i.e. it does not always protect library entries on momentarily unavailable network drives), so the only way to be sure is to disable fix broken links and selectively enable it when you need the functionality.  I've had MC dump my entire library before, or selectively dump portions of it (because access was reestablished before everything could be deleted).

That's probably the most common reason for sudden losses in library contents.  Another way to tell if this is your issue is if old albums keep showing up at the top of your "Recent Albums" view.  That's caused by the "broken links" getting fixed and then the files are re-imported automatically re-appearing as "recent"
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Library Problem
« Reply #2 on: April 13, 2015, 01:31:43 pm »

Do you :

a) have auto-import running in the background and
b) have "fix broken links" enabled or set to "protect network drives"?
Yes and yes. I don't recall setting those options, are they the default values? If I turn this off, is there a way to find broken links manually?

Another way to tell if this is your issue is if old albums keep showing up at the top of your "Recent Albums" view.  That's caused by the "broken links" getting fixed and then the files are re-imported automatically re-appearing as "recent"
the recent albums view seems to be correct, the recently imported view is a random list of stuff that I imported ages ago. If I look the "date imported" tag though then the recently imported view doesn't correspond to the most recently imported stuff so I don't know what is going on there.

If things were being removed by that fix broken links setting but I have auto import on then shouldn't it have automatically reimported them or does it drop entries and then ignore them in future?
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Library Problem
« Reply #3 on: April 13, 2015, 03:24:19 pm »

Yes and yes. I don't recall setting those options, are they the default values? If I turn this off, is there a way to find broken links manually?
They are default settings, and I'm not aware of a manual option.  When I need to fix broken links (which is very rarely, because I do all of my media file management using MC's library tools), I just backup the library, turn off auto-import in the background, turn on "fix broken links," and run a manual auto-import.  It will tell you in the summary if it "fixed" any links during that import, and list them.  You can confirm that it only fixed the links you wanted fixed.

Quote
the recent albums view seems to be correct, the recently imported view is a random list of stuff that I imported ages ago. If I look the "date imported" tag though then the recently imported view doesn't correspond to the most recently imported stuff so I don't know what is going on there.

When MC "finds" a file that was previously in the library it reimports it and tries to attach it to the old library entry with the old metadata.  So the date imported will be the original date imported (sometimes), if MC correctly identifies the linkage.  If MC doesn't match it up to the old file, it will import it "fresh" and assign a new date imported.  You're probably seeing the former case, and the mismatch between date imported and the recently imported view is confirmation that you're experiencing a "fix broken links" issue.

Quote
If things were being removed by that fix broken links setting but I have auto import on then shouldn't it have automatically reimported them or does it drop entries and then ignore them in future?

My experience is that they usually get reimported eventually, but not necessarily automatically for whatever reason (sometimes they would get picked up on the next manual import I ran).  Ultimately I found the troubleshooting process so onerous that I just disabled fix broken links (it becomes especially hard to diagnose in a client/server scenario).  Use the rename/move/copy tool to do file management, I very rarely have any broken links to begin with.

I've had no issues with any of this since disabling "fix broken links."
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Library Problem
« Reply #4 on: April 13, 2015, 03:30:28 pm »

Thanks for the info. I have turned that option off now so will keep an eye out to see if it recurs. Odd that it seemed to affect the video share only mind you, both shares are served by the same file server.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Library Problem
« Reply #5 on: April 13, 2015, 05:42:04 pm »

I'm not aware of a manual option.

Yep.  There is.

Make a Smartlist or Media View with the following filter:
Code: [Select]
[=IsMissing([Filename])]=1 [Removable]=0 ~sort=[Filename]
You can, of course, add additional filters to make it only show missing files from a particular directory, or type of Media or whatever (and you don't have to use the Filename sort, but that's often convenient).
Logged
"Some cultures are defined by their relationship to cheese."

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

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Library Problem
« Reply #6 on: April 13, 2015, 05:47:39 pm »

Yep.  There is.

Make a Smartlist or Media View with the following filter:
Code: [Select]
[=IsMissing([Filename])]=1 [Removable]=0 ~sort=[Filename]
You can, of course, add additional filters to make it only show missing files from a particular directory, or type of Media or whatever (and you don't have to use the Filename sort, but that's often convenient).

Don't those types of lists have to touch every file and take a long while with large libraries?  I recall trying something similar and finding it was faster just to run the autoimport. 

But maybe I'm thinking of something else/was doing it wrong?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Library Problem
« Reply #7 on: April 13, 2015, 05:50:07 pm »

It is pretty slow, but usually isn't too bad if you filter it to only locations where the files might be missing.

Remember that Searches are processed from left to right (top to bottom in the Wizard), so put the slow one (the IsMissing command in this case) at the very bottom, so the list of possible candidates is as small as is possible before getting to the IsMissing() search.

Of course, my system has fast, local access to all media files (they're on a RAID that can sustain 450MB/s).  If you're accessing a slow NAS storage or something it might be impossible to use.  Running Auto-Import manually with Remove Missing Files set to Yes is a decent "cleanup" mechanism.  I wasn't suggesting otherwise.

If you have missing files that show up in certain directories all the time due to a workflow issue, you might want to check out the MCFileRemover utility I made.  I use it with an IsMissing() smartlist daily to remove some "auto-deleted" files from the Library.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up