Skip to content

kevbentz/Media-Scripts

 
 

Repository files navigation

Media-Scripts

Misc scripts and tools. Undocumented scripts probably do what I need them to but aren't finished yet.

Requirements

  1. A system that can run Python 3.7 [or newer]

  2. 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.

  3. A basic knowledge of how to run Python scripts.

Setup

if you use direnv:

  1. clone the repo
  2. cd into the repo dir
  3. run direnv allow as the prompt will tell you to
  4. direnv will build the virtual env and keep requirements up to date

if you don't use direnv:

  1. install direnv
  2. go to the previous section

ok no

  1. clone repo

    git clone https://github.com/chazlarson/Media-Scripts.git
    
  2. cd to repo directory

    cd Media-Scripts
    
  3. Install 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.

After you've done one of the above:

Once you have the requirements installed via whatever means, you are ready to set up the script-specific stuff.

  1. cd to script directory [Plex, Kometa, TMDB, etc] for example:

    cd Plex
    
  2. Copy .env.example to .env

    Linux or Mac:

    cp .env.example .env
    

    Windows:

    copy .env.example .env
    
  3. Edit .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.

  4. Run the desired script.

All these scripts use the same .env and requirements.

Plex scripts:

  1. adjust-added-dates.py - fix broken added and perhaps originally available dates in your library
  2. user-emails.py - extract user emails from your shares
  3. reset-posters-tmdb.py - reset all artwork in a library to TMDB default
  4. reset-posters-plex.py - reset all artwork in a library to Plex default
  5. grab-all-IDs.py - grab [into a sqlite DB] ratingKey, IMDB ID, TMDB ID, TVDB ID for everything in a library from plex
  6. grab-all-posters.py - grab some or all of the artwork for a library from plex
  7. image_picker.py - simple web app to make choosing active art from the images downloaded by grab-all-posters simpler
  8. grab-all-status.py - grab watch status for all users all libraries from plex
  9. apply-all-status.py - apply watch status for all users all libraries to plex from the file emitted by the previous script
  10. show-all-playlists.py - Show contents of all user playlists
  11. delete-collections.py - delete most or all collections from one or more libraries
  12. refresh-metadata.py - Refresh metadata individually on items in a library
  13. list-item-ids.py - Generate a list of IDs in libraries and/or collections
  14. actor-count.py - Generate a list of actor credit counts
  15. crew-count.py - Generate a list of crew credit counts
  16. list-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.

Kometa scripts

  1. extract-collections.py - extract collections from a library
  2. kometa-trakt-auth.py - generate trakt auth block for Kometa config.yml
  3. kometa-mal-auth.py - generate mal auth block for Kometa config.yml
  4. original-to-assets.py - Copy image files from an "Original Posters" directory to an asset directory

See the Kometa Scripts README for details.

TMDB scripts

  1. tmdb-people.py - retrieve TMDB images for a list of people

See the TMDB Scripts README for details.

Other script repos of interest

  1. bullmoose
  2. Casvt
  3. maximuskowalski

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.1%
  • HTML 3.5%
  • Shell 1.3%
  • Dockerfile 0.1%