OK. I think I have found the issue.
The 'clean up library folders' function looks through each folder that movie/tv files should be stored. If they have no movie files in them it removes them. This is to remove spare directories for new seasons of shows that don't exist yet and movies that are not released yet.
If a TV show uses base folder then it works fine as is looks for videos in that folder and removes them if none are found.
If a TV show uses sub folders for seasons then it works fine as is looks for videos in that season''s folder and removes them if none are found.
If the shows settings are changed:
However, if a TV show uses subfolders and then the settings are changed to just use base folder and the 'clean up library folders' is used. Then it looks in the folder, finds no movie files (they are in subfolders) and deletes it.
The solution is to check that folder and all subfolders for movie files before deleting and this change will be in the next version.
PLEASE stop using 'clean up library folders' until the new version is released.
Thanks