Find out how many films are on your Plex server

12 October 2021

It turns out there is an easy way to find out how many films you have on your Plex server

In /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases

echo "SELECT library_sections.name AS Libary, metadata_series.title as Series, metadata_season.'index' AS Season, metadata_media.title AS Title FROM media_items
INNER JOIN metadata_items as metadata_media
ON media_items.metadata_item_id = metadata_media.id
LEFT JOIN metadata_items as metadata_season
ON metadata_media.parent_id = metadata_season.id
LEFT JOIN metadata_items as metadata_series
ON metadata_season.parent_id = metadata_series.id
INNER JOIN section_locations
ON media_items.section_location_id = section_locations.id
INNER JOIN library_sections
ON library_sections.id = section_locations.library_section_id" | sqlite3 com.plexapp.plugins.library.db | grep Films | wc

Ref: this post in the Plex forums