INTERACT FORUM

Please login or register.

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

Author Topic: Playlist field has been cleared unprovokedly  (Read 3574 times)

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Playlist field has been cleared unprovokedly
« on: February 09, 2018, 08:59:05 am »

Hi,

I switched to MC 23 a couple of months ago in connection with a change to a new computer.
Now I just discovered that almost all my playlists have lost a substantial parts of its tracks. In other words, the Playlist field has been cleared for a lot of files for an unknown reason.

When I launched MC 23 I used the latest MC 22 library backup.

What could have happened here? Did I perhaps miss something when upgrading?

Thanks!
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Playlist field has been cleared unprovokedly
« Reply #1 on: February 09, 2018, 09:18:38 am »

Hi,

I switched to MC 23 a couple of months ago in connection with a change to a new computer.
Now I just discovered that almost all my playlists have lost a substantial parts of its tracks. In other words, the Playlist field has been cleared for a lot of files for an unknown reason.

When I launched MC 23 I used the latest MC 22 library backup.

What could have happened here? Did I perhaps miss something when upgrading?

Thanks!
¨
I have had similar problems, and it seems to be connected with files moving, drives not being mapped up yet on the new computer, or possible user accounts. If MC can't find the file, it might just remove it without warning from a lot of playlists. I am not a very big fan of this behavior.
Logged

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Playlist field has been cleared unprovokedly
« Reply #2 on: February 09, 2018, 11:33:04 pm »

Quote
I have had similar problems, and it seems to be connected with files moving, drives not being mapped up yet on the new computer, or possible user accounts. If MC can't find the file, it might just remove it without warning from a lot of playlists. I am not a very big fan of this behavior.

So perhaps there are other issues as well, which I have not yet come a cross, or...?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: Playlist field has been cleared unprovokedly
« Reply #3 on: February 10, 2018, 08:11:53 am »

Disable the setting called "Fix broken links".

MC can correct the database if a drive is missing.
Logged

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Playlist field has been cleared unprovokedly
« Reply #4 on: February 10, 2018, 09:50:09 am »

Quote
Disable the setting called "Fix broken links".
MC can correct the database if a drive is missing.

Sorry, but I'm not sure I grasp the point here. I have 'Fix broken links' enabled since it is the default but how could a change to disable restore the Playlist field...? Or should I take additional steps?

Furthermore, I've had some problems with my external hard drives now and then. If it turns out that 'Fix broken links' is not foolproof, could it even had led to files removal?

Thanks!
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: Playlist field has been cleared unprovokedly
« Reply #5 on: February 10, 2018, 10:25:53 am »

Try disabling it.  It may not fix the problem which may have occurred when they were in a different location.

The wiki has a topic called Moving Files.  In it, you can find information about using find and replace to change the file location.
Logged

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Playlist field has been cleared unprovokedly
« Reply #6 on: February 11, 2018, 12:11:48 am »

Ok.

I can just say I always have used the Rename, Move, & Copy Files tool to move files, including new hard drives. And so I did when upgrading to MC 23/switching to a new hard drive.

And what about the risk of deleted files if MC loses contact with external hard drives when having 'Fix broken links' enabled?
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Playlist field has been cleared unprovokedly
« Reply #7 on: February 11, 2018, 06:11:24 am »

No

MC does not accidentally delete files
Logged

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Playlist field has been cleared unprovokedly
« Reply #8 on: February 11, 2018, 08:15:58 am »

How should I read/interpret the information on the wiki page:
 
https://wiki.jriver.com/index.php/Fix_Broken_Links

where you could read:

"The Protect files on missing drives option is useful with external and network volumes (such as USB drives or NAS devices) that may sometimes be disconnected or offline. With this option enabled, when it finds missing files, Auto-Import will try to determine if the drive itself is entirely offline, or if the drive exists but the files are actually missing, and only remove them in the latter case. This is important if your drive might go offline occasionally because otherwise Media Center would happily remove all files on a drive when it becomes disconnected! Please note that the OS does not always provide a clean way to make this determination and this setting is not 100% foolproof. If you experience difficulty with files on external or network volumes being removed from and re-imported into Media Center, disable this setting entirely."

I have always since version 17 had the 'Fix broken links' option enabled. And in addition this failure with keeping the Playlist field in order when moving to MC 23/new hard drive. Hence my worry.

Thanks!
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: Playlist field has been cleared unprovokedly
« Reply #9 on: February 11, 2018, 08:31:30 am »

MC only removes the file from its database.  It won't remove the file from the computer.
Logged

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Playlist field has been cleared unprovokedly
« Reply #10 on: February 11, 2018, 08:50:40 am »

Okay, thanks for clearing this out!  :)
Logged

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Playlist field has been cleared unprovokedly
« Reply #11 on: February 20, 2018, 12:42:57 am »

Quote
Disable the setting called "Fix broken links".
MC can correct the database if a drive is missing.

Unfortunately the playlist field is still 'broken'. So three wonderings arise:
  • How can I restore the playlist field? I guess the easiest/only way is to use a library backup from MC 22 and export/import the playlists from that version, or?
  • How can I prevent this from happening again? What can I check/control? Any precautions to take?
  • And what about other fields? Could some more data has been affected? I have only noticed the empty playlist field so far.
Thanks!
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: Playlist field has been cleared unprovokedly
« Reply #12 on: February 20, 2018, 07:08:31 am »

Did you try restoring a backup again?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Playlist field has been cleared unprovokedly
« Reply #13 on: February 20, 2018, 09:52:25 pm »

Okay, all of this is pretty straightforward.

How can I restore the playlist field? I guess the easiest/only way is to use a library backup from MC 22 and export/import the playlists from that version, or?

As you have been running MC23 for a couple of months, no doubt you have made lots of changes to your Library since the last MC22 backup. So yes, export/import of the Playlists is the best way to restore them.
Backup your MC23 Library first of course.
Restore your last MC22 backup.
Export all your Playlists from MC22. That will create separate files for each Playlist and SmartList in a directory something like "C:\Users\[UserID]\AppData\Roaming\J River\Media Center 23\Library\Playlists".
Restore the MC23 backup you made above.
Import only the Playlists that you want to fix. Note that this seems to create a new Playlist under the "Imported Playlist" group rather than merge Playlists of the same name. So you may need to do some work merging the Playlists manually, or just replace the current Playlist with the imported one. There doesn't appear to be an automatic Playlist merge process, but you can just drag and drop between the two versions and if that creates duplicates, just click the "Remove Duplicates" button to fix the issue. Then delete the Playlist you no longer need.

How can I prevent this from happening again? What can I check/control? Any precautions to take?

You said;
Furthermore, I've had some problems with my external hard drives now and then. If it turns out that 'Fix broken links' is not foolproof, could it even had led to files removal?

Which I take to mean that sometimes your external hard drives weren't visible in Windows, or maybe Windows gave them the wrong drive letter at boot time, and therefore MC couldn't find the drive it expected. In that case, and when you have "Fix Broken Links" set to "Yes" in Auto Import, and Auto Import is set to run in the background, this is what happens.

You create a Playlist with tracks in your Library. MC actually just creates a record of the Playlists a file belongs to in its [Playlists] tag.
You close MC and probably shut down your PC.
Some time later you start your PC and MC, or MC starts with Windows.
But your external hard drive is having some trouble. Perhaps slow to start, or just doesn't get detected by Windows straight away, or is given a different drive letter to the previous value.
MC detects that it can't find files on your external hard drive, because it can't find the drive. It removes the files it can't find from your Library. Of course, it doesn't delete the files from the hard drive.
Your external hard drive finally makes an appearance, either soon after the above happened, or some time later. Maybe even another day. Or you fix the drive letter assignment in Windows.
MC imports the files it has now found on your external hard drive. But it doesn't restore the values in the Playlists tag, even though it knows what the previous values were, as it has stored them in the Removed database in the MC Library.1

End result: All your tracks are still in your MC Library, but lots of tracks have disappeared from your Playlists.

So, as long as you are having trouble with your external hard drives you need to change the "Fix Broken Links" to either "Yes (protect files on missing drives)" or "No". I prefer to use "Yes (protect files on missing drives)".

If you are having this sort of trouble with your external hard drives though, you had better fix that. It may be that they are about to fail completely. Of course, you have full and up to date backups of all your music files, right?


And what about other fields? Could some more data has been affected? I have only noticed the empty playlist field so far.

Interesting question. As noted, MC knows what tracks have been removed from its Library. I am assuming that it also knows what tracks it has removed from the Library because it couldn't find them. That would seem a reasonable assumption. Are there other tags that don't get restored when a track is removed and re-imported? Maybe, but probably not. MC seems to pretty reliably reinstate tags when it re-imports a track that it previously knew about. I think the [Playlists] tag is a special case, for the reasons outlined in the Note below.



Note 1: I have to assume that this was a design decision, so that files re-imported into MC aren't automatically added back into the Playlists that they previously belonged to. That seems like a reasonable decision, as otherwise you would just start to see old files pop back up in Playlists without expecting them to. Imagine deleting files that you used to love but now hated from your "Favourites" Playlist, only to decide later to re-imported them so you can play them occassionally, only to have them start playing again when you play your Favourites? Could be heartbreaking, depending on the provinence of the track.
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

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Playlist field has been cleared unprovokedly
« Reply #14 on: February 20, 2018, 11:36:21 pm »

Did you try restoring a backup again?

No, I want to avoid a complete restore because I have made a lot of changes in the library.
If I can identify the specific 'damage' I'll just be more than happy to 'manually' put MC back in its original library state again.
Logged

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Playlist field has been cleared unprovokedly
« Reply #15 on: February 27, 2018, 01:31:57 am »

RoderickGI, thank you very much for taking your time explaining this! :)

Quote
Note 1: I have to assume that this was a design decision, so that files re-imported into MC aren't automatically added back into the Playlists that they previously belonged to. That seems like a reasonable decision, as otherwise you would just start to see old files pop back up in Playlists without expecting them to. Imagine deleting files that you used to love but now hated from your "Favourites" Playlist, only to decide later to re-imported them so you can play them occassionally, only to have them start playing again when you play your Favourites? Could be heartbreaking, depending on the provinence of the track.

I could argue for another decision. From a users perspective; if I don't want a track in a playlist,  I simply remove it from the list. If I delete a file I don't like, why should MC even bother about the consequences if I regret my decision? Why should they decide or take any notice how I want the file to be 'restored'? 
And why should even any 'rankin data' be kept? For example, MC removes the playlist field but keeps the rating field intact. Logical?

Why assume that all playlists should be removed just because I have deleted the file? Some playlist could be relevant for a lot of purposes, not only favorites.

I advice MC to keep its fingers away in these kind of scenarios! Let the users deal with what will happen if they delete files they for some reason later want to have back! ;)

Thanks!
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Playlist field has been cleared unprovokedly
« Reply #16 on: February 27, 2018, 02:19:39 am »

No, I want to avoid a complete restore because I have made a lot of changes in the library.
If I can identify the specific 'damage' I'll just be more than happy to 'manually' put MC back in its original library state again.
You could try this totally unsupported thing...
Make a fresh library backup, and then close MC completely.
Using Windows Explorer, browse to the library backups folder and pick one you think has good playlists data. The further back in time you go, the less likelyhood of this working.
Open the zip file.
Look for the file named "playlistx.jmd" and extract only that file.
Move that file to your active MC library folder replacing the existing file.
Launch MC.

How's the playlists look now?

If they're all good, and you're happy, then, excellent, and you can turn your attention to your drives and find out what's occurring there.
If it's a complete mess, just restore from the backup you just made and you'll be back where you started.

Will take but a couple of minutes to do, won't be destructive, might be constructive.

-marko

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Playlist field has been cleared unprovokedly
« Reply #17 on: February 27, 2018, 10:31:20 am »

You could try this totally unsupported thing...
Make a fresh library backup, and then close MC completely.
Using Windows Explorer, browse to the library backups folder and pick one you think has good playlists data. The further back in time you go, the less likelyhood of this working.
Open the zip file.
Look for the file named "playlistx.jmd" and extract only that file.
Move that file to your active MC library folder replacing the existing file.
Launch MC.

marko, thank you very much for your tip! I should consider it.
Logged
Pages: [1]   Go Up