Can you explain how you know which episodes are missing?
Is the missing episodes already in the metadata for pms?
Is there attribute you key off to know if tvshow is missing or exists(somewhere in a video file)?
admin@NSA325-v2:~> DB="/i-data/5dfe2421/programs/plex/lib/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"
admin@NSA325-v2:~> echo “select id,title from metadata_items where metadata_type=2 and library_section_id in (select id from library_sections where section_type = 2) order by title;” | sqlite3 “${DB}”
Error: near line 1: unable to open database file