Kodi Community Forum
Case change causes files to not be found but can't be cleaned from Library - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Case change causes files to not be found but can't be cleaned from Library (/showthread.php?tid=354751)



Case change causes files to not be found but can't be cleaned from Library - Sadge23 - 2020-05-26

This is a repeatable issue I've had over the course of the past couple of years.  I think this is the correct place to post, but please forgive me if it isn't.

Quick setup: Multiple HTPCs running Windows 10 Kodi from Microsoft store.  Synology NAS which holds the database for syncing (MariaDB 10).

File structure: I *used* to manually name files, so they would be named as such: "Seinfeld - s01e01 - The Seinfeld Chronicles".  Now, I use FileBot to rename files and they are as such: "Seinfeld - S01E01 - The Seinfeld Chronicles".  Notice the capitalization.

Issue: Sometimes I update my files (usually to add subtitles or things like upgrading resolution from 480 to 1080 for example).  When I need to update a whole series (I'm using Seinfeld in this example, but I've had the same issue with Game of Thrones and others), I completely delete the folder on the NAS, log out all of the PCs connected to Kodi, and clean the library to remove the show.  Then, I create a new folder and add the updated files and scan them back into Kodi.  The problem is that if it's a show I used to manually name (with lowercase letters) which currently has uppercase letters, Kodi will scan the file in correctly, but throw a "No longer available - remove from library?" error when you try to playback.  If you look at the path in the info screen, the path to the show will be with the old lowercase letters.  No amount of removing and rescanning will update the path to uppercase.  When you look at the file using the Video -> files path, it shows the correct uppercase before it is scanned into the library, but once again reverts to lowercase when scanned in and then will not play/says is no longer there.

If I log into the DB on my NAS, I can manually locate the path and change it from lowercase to uppercase and the file will then play correctly; however, you can understand with a show like Seinfeld where there are 150+ episodes this is a task.

Is there a way to fix this without nuking the entire library or manually editing the DB?

Here is a link to an imgur album showing the issue (I hope links are okay): https://imgur.com/a/94S2Vkw


RE: Case change causes files to not be found but can't be cleaned from Library - Sadge23 - 2020-05-26

(2020-05-26, 06:31)Sadge23 Wrote: This is a repeatable issue I've had over the course of the past couple of years.  I think this is the correct place to post, but please forgive me if it isn't.

Quick setup: Multiple HTPCs running Windows 10 Kodi from Microsoft store.  Synology NAS which holds the database for syncing (MariaDB 10).

File structure: I *used* to manually name files, so they would be named as such: "Seinfeld - s01e01 - The Seinfeld Chronicles".  Now, I use FileBot to rename files and they are as such: "Seinfeld - S01E01 - The Seinfeld Chronicles".  Notice the capitalization.

Issue: Sometimes I update my files (usually to add subtitles or things like upgrading resolution from 480 to 1080 for example).  When I need to update a whole series (I'm using Seinfeld in this example, but I've had the same issue with Game of Thrones and others), I completely delete the folder on the NAS, log out all of the PCs connected to Kodi, and clean the library to remove the show.  Then, I create a new folder and add the updated files and scan them back into Kodi.  The problem is that if it's a show I used to manually name (with lowercase letters) which currently has uppercase letters, Kodi will scan the file in correctly, but throw a "No longer available - remove from library?" error when you try to playback.  If you look at the path in the info screen, the path to the show will be with the old lowercase letters.  No amount of removing and rescanning will update the path to uppercase.  When you look at the file using the Video -> files path, it shows the correct uppercase before it is scanned into the library, but once again reverts to lowercase when scanned in and then will not play/says is no longer there.

If I log into the DB on my NAS, I can manually locate the path and change it from lowercase to uppercase and the file will then play correctly; however, you can understand with a show like Seinfeld where there are 150+ episodes this is a task.

Is there a way to fix this without nuking the entire library or manually editing the DB?

Here is a link to an imgur album showing the issue (I hope links are okay): https://imgur.com/a/94S2Vkw

Edited to add: this post: https://forum.kodi.tv/showthread.php?tid=339833&pid=2813631&highlight=capital+file+name#pid2813631 seems to have the same issue/


RE: Case change causes files to not be found but can't be cleaned from Library - Klojum - 2020-05-26

A few things...

Yes, you do not have editing powers of your posts yet. This is because some anti-spam settings have been enabled for new forum users. These settings will change after a short time and number of posts.

You do not need to quote an entire post in our forum. You can mark/highlight the most important text with your mouse, and a Reply option will appear at the bottom left of the post. Clicking this will copy&paste the selected text into the reply text box as a quote.

As far as your upper/lower case problem is concerned: Your Synology NAS runs on a variant of the Linux operating system. Linux will handle filenames and folders with similar names in a different case as separate entries. Kodi also uses the same approach. Windows' disk/file system however doesn't give a crap and doesn't (want to) see the difference.

One solution would be to rename the Seinfeld folder to something else temporarily, and then perform a Clean Video Database action. That should remove the whole Seinfeld show from the Kodi video database.
My personal preferences is to always use the uppercase S01E01 variant when (re)naming your TV episode files. FileBot is one tool, but there are other generic batch renaming tools out there as well which should be able to fix the upper/lower case challenge.

After all that, rescrape your TV show(s) into the Kodi library.


RE: Case change causes files to not be found but can't be cleaned from Library - Sadge23 - 2020-05-26

Thanks for the info.  I already changed Seinfeld to uppercase manually in the database, but I did do the "Clean Video Database" from the add on after your suggestion.  It did remove some entries so we'll see.  Thanks again.