-
Notifications
You must be signed in to change notification settings - Fork 1
Plex Title Card Finder
Looks up any shows you have against the subreddit r/PlexTitleCards to find any matches, and flag any 'incomplete' asset sets in your library.
Many users are starting to add individual Title Cards for TV Show Episdoes. One of the best sources of these files is the subreddit r/PlexTitleCards
This script will first connect to your Sonarr instances, and for each show in your library will initiate a scan against the subreddit for any submissions matching that name
The latest version will also allow you to scan your assets directory against your episode listing and flag any shows where you have some Title Card assets, but are missing some (eg newly released episodes)
Edit and run the script.
It will generate an output file listing all the shows where it found a match to a submission on Reddit. It will list the name of the post, the user who posted it, and a URL to that post
In order to use this script, you will first need to register an application with Reddit.
- Browse to https://www.reddit.com/prefs/apps
- At the bottom, select 'Create another app'
- Give it any name
- Select
Script
as the type - enter
http://127.0.0.1:65010/authorize_callback
as the redirect url - Select
Create app
- Make a note of your user Client ID & Client Secret that get generated
In this example, my ClientID = TedNtE_IPeymH2g1ur8jhg
and Secret = QGic1MO94WToqH0qBz4WhDM0Ttdqww
In your python terminal, install PRAW
pip install praw
This provides a python wrapper over the Reddit API
You will need to update the Python script with the following;
sonarr_apikey
= your Sonarr API Key
sonarr_url
= your Sonarr URL
sonarr_port
= your Sonarr Port (default = 8989)
client_id
= the ClientID from your reddit application
client_secret
= the Secret from your reddit application
If you want to filter out select users, you can add them to a comma separated list of users, eg
exclude_auth = ["user","user2"]
This is useful when you have a preferred style of Title Card, and want to exclude those that dont fit it
Some submissions are for full seasons / full shows, and others are for single episodes. Use this option to remove single episode submissions
FULL_PACK_ONLY = True|False
Where True
filters out single episodes
If you have any title cards in your assets folder, the script will not attempt to search Reddit for them.
However, it's possible you don't have all files present. If you enable Scan for Missing Assets, the script will compare your assets folder with the episode files you have, and flag any missing files.
You can control this behaviour via the following script settings...
SCAN_FOR_MISSING
set to True
to enable the Scan for Missing service
INCLUDE_SPECIALS
set to True
to include Special seasons in the scan, or False
to exclude them
PRINT_SOURCE
If you keep a source.txt
file along side your assets, setting this flag to True
will extract your source URL's and list the alongside any missing files. This helps speed up locating any missing items.
You only need the plex_title_card_finder.py file.
Open a terminal in the same folder as the file
use the command
[python|python3] plex_title_card_finder.py
(Requires Python3. I have Python mapped to Python3)
this will create an output file for you to review