GithubHelp home page GithubHelp logo

plex-housekeeping's Introduction

Plex Housekeeping Scripts

Collection of scripts to manage/cleanup a plex instance


Clone the repo

git clone https://github.com/rwobig93/plex-housekeeping.git

Current scripts list

Script Name Script Options Purpose
plex-cleanup.py Options/Details Cleanup collections and movie title names

Plex Cleanup

Configuration

NOTE: Running the script for the first time will generate a config file you can modify called plex-cleanup.json

NOTE: All variables below can be used as environment variables by using uppercase using the -e argument on the script

NOTE: Using the -c argument for continuous running you can also provide -i for the run interval or SCRIPT_INTERVAL as an environment variable

Setting Name Example Detail
plex_url https://192.168.1.1:32400/ Required: URL pointing to your plex instance, can be public or private
api_key aBCde12F3gh4IJklmno5 Required: API key from your Plex.TV account, please see Finding Plex Token for more details
movie_libraries ["Movies","4K","Hidden"] Optional: List of your movie library names, any not included will be skipped
minimum_collection_size 2 Optional: Number indicating collection size for cleanup, collection cleanup will look at any collections with less movies than the number indicated here, so 2 would mean all collections with 1 or 0 movies will be cleaned
delete_undersized_collections false Optional: Whether to delete collections based on the size indicated, if false then any collections that would be cleaned up will instead be printed to the terminal and logged, if true then collections will be deleted
enforce_movie_names_match_file_names false Optional: Whether to enforce movie names to match file names after sanitization
movie_name_enforce_skip_characters [':', '-', '.', '?'] Optional: List of characters to ignore when comparing movie title and movie file names for name enforcement
enforce_movie_names_exclude ['Star Wars'] Optional: List of movie title names to ignore when enforcing movie title and file names, each entry is case sensitive and checks by doing a 'contains' operation

Installing required dependencies

pip install -r requirements.txt

Run the script manually

python3 plex-cleanup.py

Run using docker cli

Run in interactive mode

docker run registry.gitlab.wobigtech.net/public-registry/plex-cleanup:latest -e "PLEX_URL=https://192.168.1.1:32400/" -e "API_KEY=aBCde12F3gh4IJklmno5"

Run in detached mode (non-interactively)

docker run registry.gitlab.wobigtech.net/public-registry/plex-cleanup:latest -e "PLEX_URL=https://192.168.1.1:32400/" -e "API_KEY=aBCde12F3gh4IJklmno5" -d

Run using docker-compose

See docker-compose.yml for a real-world example

plex-housekeeping's People

Contributors

rwobig93 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.