[APP] Shell Script to Identify Missing Seasons/Episodes

Hi all,

 

Just wrote a quick bash script that outputs missing episodes.

 

Requirements

  • sqlite3 command line
  • Shell as a user with read access to the Plex sqlite DB file (or root)

Install

  • Just open in a text editor and update the "DB" variable (You likely won't even need to do this on stand distributions)

Usage

  • shell~#./missing-shows.sh # Lists all missing episodes up to your most current downloaded, including missing seasons
  • shell~#./missing-shows.sh all # Same as above
  • shell~#./missing-shows.sh allepisodes # Same as above, but doesn't show missing seasons
  • shell~#./missing-shows.sh episodes # DEFAULT - Only shows episodes missing between your lowest and highest current episode for that season

Download

Nice script, exactly what I was looking for !

Thanks you !

A fantastic tool.

thank you!

This would be really handy. Any way to do something similar but from Windows?

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)?

Ciao,

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

Ok,
scemo io:

sudo ./missing-shows.sh

funziona

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.