Misc scripts and tools. Undocumented scripts probably do what I need them to but aren't finished yet.
A system that can run Python 3.7 [or newer]
Python 3.7 [or newer] installed on that system
One of the requirements of these scripts is alive-progress 2.4.1, which requires Python 3.7.
A basic knowledge of how to run Python scripts.
if you use direnv:
- clone the repo
- cd into the repo dir
- run
direnv allowas the prompt will tell you to - direnv will build the virtual env and keep requirements up to date
if you don't use direnv:
- install direnv
- go to the previous section
ok not really
if you don't use direnv:
clone repo
git clone https://github.com/chazlarson/Media-Scripts.gitcd to repo directory
cd Media-ScriptsInstall requirements with
python3 -m pip install -r requirements.txt[I'd suggest doing this in a virtual environment]Creating a virtual environment is described here; there's also a step-by-step in the local walkthrough in the Kometa wiki.
Once you have the requirements installed via whatever means, you are ready to set up the script-specific stuff.
cd to script directory [
Plex,Kometa,TMDB, etc] for example:cd PlexCopy
.env.exampleto.envLinux or Mac:
cp .env.example .envWindows:
copy .env.example .envEdit .env to suit your environment [plex url, token, libraries] and your requirements [what to do, where to download things, etc.]; the settings for each script are detailed in the readme within each folder as shown below.
Edit the file with whatever text editor you wish.
Run the desired script.
All these scripts use the same .env and requirements.
adjust-added-dates.py- fix broken added and perhaps originally available dates in your libraryuser-emails.py- extract user emails from your sharesreset-posters-tmdb.py- reset all artwork in a library to TMDB defaultreset-posters-plex.py- reset all artwork in a library to Plex defaultgrab-all-IDs.py- grab [into a sqlite DB] ratingKey, IMDB ID, TMDB ID, TVDB ID for everything in a library from plexgrab-all-posters.py- grab some or all of the artwork for a library from plexgrab-all-status.py- grab watch status for all users all libraries from plexapply-all-status.py- apply watch status for all users all libraries to plex from the file emitted by the previous scriptshow-all-playlists.py- Show contents of all user playlistsdelete-collections.py- delete most or all collections from one or more librariesrefresh-metadata.py- Refresh metadata individually on items in a librarylist-item-ids.py- Generate a list of IDs in libraries and/or collectionsactor-count.py- Generate a list of actor credit countscrew-count.py- Generate a list of crew credit countslist-low-poster-counts.py- Generate a list of items that have fewer than some number of posters in Plex
See the Plex Scripts README for details.
extract-collections.py- extract collections from a librarykometa-trakt-auth.py- generate trakt auth block for Kometa config.ymlkometa-mal-auth.py- generate mal auth block for Kometa config.ymloriginal-to-assets.py- Copy image files from an "Original Posters" directory to an asset directorymetadata-extractor.py- Back up all metadata into a Kometa-compatible metadata file
See the Kometa Scripts README for details.
tmdb-people.py- retrieve TMDB images for a list of people
See the TMDB Scripts README for details.
This presents a web UI that lets you scroll through the images that Plex provides for each item [movie, show, season, episode], selecting the one you want by clicking a button, which downloads it to an asset directory
See the Plex Image Picker README for details.
- Dockerize
- add a top-level console UI
- go to a YAML-based config