“Clean library” should check if the path of the movies is in the sources, and if not just delete the movie entry from the database.
What happens now is:
Say you changed your nas name, or consolidated various smaller NAS’es into a bigger one and you edit your sources. kodi will now try forever to wake on lan the old sources because the path of the movies in the library points to them. This takes forever, and clean library will never finish and/or Kodi will crash. Since the old path of the files is removed from sources, Kodi should be smart enough to check for this and just delete the movies that have paths that aren’t in the sources anymore.