[![Sponsor or Donate](https://img.shields.io/badge/-Sponsor%2FDonate-blueviolet?style=plastic)](https://github.com/sponsors/meisnate12)
Your Plex folders are growing out of control. You use overlays from [Plex Meta Manager](https://github.com/meisnate12/Plex-Meta-Manager) (PMM) or upload lots of custom art from [Title Card Maker](https://github.com/CollinHeist/TitleCardMaker) (TCM) that you no longer want to use or need to eliminate. You don't want to perform the [plex dance](https://www.plexopedia.com/plex-media-server/general/plex-dance/) if you can avoid it. This script will free up gigs of space....
Your Plex folders are growing out of control. You use overlays from [Plex Meta Manager](https://github.com/meisnate12/Plex-Meta-Manager) (PMM) or upload lots of custom art from [Title Card Maker](https://github.com/CollinHeist/TitleCardMaker) (TCM) that you no longer want to use or need to eliminate. You don't want to perform the [plex dance](https://www.plexopedia.com/plex-media-server/general/plex-dance/) if you can avoid it. This script can be a solution, and may free up gigs of space....
As well as being able to clean the PhotoTranscoder Directory and running the Plex operations Empty Trash, Clean Bundles, and Optimize DB.
I can also clean the PhotoTranscoder Directory and run the Plex operations Empty Trash, Clean Bundles, and Optimize DB.
Special Thanks to [bullmoose20](https://github.com/bullmoose20) for the original [Plex Bloat Fix](https://github.com/bullmoose20/Plex-Stuff#plex-bloat-fix) (PBF) Script this is based on.
@ -30,6 +30,8 @@ Generally, Plex Image Cleanup can be installed in one of two ways:
GENERALLY SPEAKING, running as a Docker container is simpler, as you won't have to be concerned about installing Python, or support libraries, or any possible system conflicts generated by those actions.
HOWEVER, you will have to give careful consideration to mapping directories into the container.
For this reason, it's generally recommended that you install via Docker rather than directly on the host.
If you have some specific reason to avoid Docker, or you prefer running it as a Python script for some particular reason, then this general recommendation is not aimed at you. It's aimed at someone who doesn't have an existing compelling reason to choose one over the other.
* The `-v <PATH_TO_CONFIG>:/config:rw` and `-v <PATH_TO_PLEX>:/plex:rw` flags mount the location you choose as a persistent volumes to store your files and give access to plex.
* Change `<PATH_TO_CONFIG>` to a folder where your .env and other files are.
* Change `<PATH_TO_PLEX>` to the folder where your Plex Folder is (It contains folders: Cache, Metadata, Plug-in Support).
* Change `<PATH_TO_PLEX>` to the "Plex Media Server" folder inside the Plexx appl data folder (this is the folder that contains `Cache`, `Metadata`, `Plug-in Support`).
* If your directory has spaces (such as "My Documents"), place quotation marks around your directory pathing as shown here: `-v "<PATH_TO_CONFIG>:/config:rw"`
Example Docker Run command:
@ -155,6 +157,8 @@ TRACE=False
LOG_REQUESTS=False
```
IMPORTANT: If you are running this in Docker, remember that these settings are being read *inside the container*, so, for example, `PLEX_PATH` cannot be a path on the host. You will need to map directories into the container [as shown in the docker run command above], then use those mapped directories in the `.env`. Similarly, the URL may need to change depnding on how you have Docker networking set up. An address on your LAN may not work.