INTERACT FORUM

Please login or register.

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

Author Topic: Case insensitivity conundrum  (Read 1658 times)

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Case insensitivity conundrum
« on: June 22, 2021, 09:22:24 pm »

I recently had to restore a library backup due to malfunctioning hardware. Between the time of the last library backup and when my hardware failed I had cleaned up some capitalization problems in my library and subsequently used RM&C to update the filenames.

After restoring the backup I reran Auto-Import and was a bit dismayed to find that none of the renamed files were re-imported into MC (and no "broken links" were fixed either). I tried to play one of the files that had been renamed and unsurprisingly MC complained that it could not find it, as the [Filename] capitalization differs from my filesystem.

The "automatic" method to fix this would be to enable "fix broken links", allow MC to remove the "missing files" and then re-import the new case'd files, however this would lose all of my playback stats/playlists etc. The other option is to hand revert my filenames on the filesystem to match MC's library, or redo all of my changes in the MC library to match the filesystem, neither of which I wish to undertake.

Does anyone have any ideas how I can get out of this mess? I've thought about transferring everything to a case insensitive OS so that MC can access and rename the improperly case'd files to match its database using multiple RM&C steps, but there has to be a better way.
Logged

RemyJ

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1249
Re: Case insensitivity conundrum
« Reply #1 on: June 23, 2021, 01:20:49 pm »

What about doing a tag update on all files using an obscure tag?   The ones that MC can't tag because the name's different should be flagged as a broken link now yes?
Logged
Fedora 40 x86_64 Xfce

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Case insensitivity conundrum
« Reply #2 on: June 23, 2021, 03:06:58 pm »

What about doing a tag update on all files using an obscure tag?   The ones that MC can't tag because the name's different should be flagged as a broken link now yes?

Good idea, thanks. Still a lot of manual labor to retag properly, but that will at least narrow the scope.
Logged

RemyJ

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1249
Re: Case insensitivity conundrum
« Reply #3 on: June 24, 2021, 08:29:27 am »

Thinking more about this...   Wouldn't "Fill Properties from Filename"  do what you want or does that not work if only the case differs?
The other thing you could do is to set the library fields for those files to something stupid then run FPfF.

Logged
Fedora 40 x86_64 Xfce

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Case insensitivity conundrum
« Reply #4 on: June 24, 2021, 09:17:17 am »

I recently had to restore a library backup due to malfunctioning hardware. Between the time of the last library backup and when my hardware failed I had cleaned up some capitalization problems in my library and subsequently used RM&C to update the filenames.

After restoring the backup I reran Auto-Import and was a bit dismayed to find that none of the renamed files were re-imported into MC (and no "broken links" were fixed either). I tried to play one of the files that had been renamed and unsurprisingly MC complained that it could not find it, as the [Filename] capitalization differs from my filesystem.

The "automatic" method to fix this would be to enable "fix broken links", allow MC to remove the "missing files" and then re-import the new case'd files, however this would lose all of my playback stats/playlists etc. The other option is to hand revert my filenames on the filesystem to match MC's library, or redo all of my changes in the MC library to match the filesystem, neither of which I wish to undertake.

Does anyone have any ideas how I can get out of this mess? I've thought about transferring everything to a case insensitive OS so that MC can access and rename the improperly case'd files to match its database using multiple RM&C steps, but there has to be a better way.

Have you tried using the fourth option in the upper left corner of the RM&C  window("update database location" or something like that?).  You can use that to repair broken database entries so they point to the correct files, and I think it should work for case issues too.  This is assuming you can readily identify which files are affected.

Something worth being aware of (that you probably already know, but it gigged me once in a similar situation):  if you're accessing the files on a network share via Samba you won't be able to do anything with case because Samba is case insensitive even when both sides are Linux machines.  I once had a "Nick Cave and the Bad Seeds" directory as well as a "Nick Cave And The Bad Seeds" directory on a linux drive shared via SMB, and only one of those directories was actually reachable from client computers because they "collided."
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 946
Re: Case insensitivity conundrum
« Reply #5 on: June 24, 2021, 10:18:12 am »

Have you tried using the fourth option in the upper left corner of the RM&C  window("update database location" or something like that?).  You can use that to repair broken database entries so they point to the correct files, and I think it should work for case issues too.  This is assuming you can readily identify which files are affected.

Something worth being aware of (that you probably already know, but it gigged me once in a similar situation):  if you're accessing the files on a network share via Samba you won't be able to do anything with case because Samba is case insensitive even when both sides are Linux machines.  I once had a "Nick Cave and the Bad Seeds" directory as well as a "Nick Cave And The Bad Seeds" directory on a linux drive shared via SMB, and only one of those directories was actually reachable from client computers because they "collided."

That's interesting. Is this true for NFS as well? I am using NFS shares as they appear to be less hassle with auto-mounting on my iMac and I might have seen this capitalization problem as well but I am not sure.
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (33.0.37 64 bit): 2784
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (33.0.41 64 bit): 3826
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sequoia 15.1.1 | JRMark (33.0.41 64 bit): 9056
Docker Container (shiomax) DS1819+ | JRMark (33.0.37 64 bit): 1431
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

RemyJ

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1249
Re: Case insensitivity conundrum
« Reply #6 on: June 24, 2021, 10:40:38 am »

That's interesting. Is this true for NFS as well? I am using NFS shares as they appear to be less hassle with auto-mounting on my iMac and I might have seen this capitalization problem as well but I am not sure.

NFS is case sensitive.  Unless of course you're using a Windows NFS client in which case you have to mess with nfs settings to control whether it's case sensitive or not.  I've been using it for years with MC Linux <> Linux and never had an issue.

Logged
Fedora 40 x86_64 Xfce

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2616
Re: Case insensitivity conundrum
« Reply #7 on: June 24, 2021, 10:45:56 am »

Samba case sensitivity is configurable in smb.conf, and the default is case-insensitive. NFS is case-sensitive by default, but also configurable.

smb.conf:
case sensitive = true
default case = lower
preserve case = yes
short preserve case = yes
Logged
Pages: [1]   Go Up