Skip to content

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

🎬 Plex Watched Maintenance

An interactive Python script to help manage watched movies and TV episodes in your Plex library.
Keep your storage lean by choosing to delete files, mark items as unwatched, or skip for manual review—all with a final confirmation step before any changes are applied.

✨ Features

  • Smart Detection: Automatically finds watched movies and TV episodes across your libraries.
  • Interactive Prompts: Choose to Delete, Skip, Unwatch, or flag for Manual review.
  • Episode Grouping: Groups consecutive episodes of the same show for faster batch decisions.
  • Dry-run Mode: Preview exactly what will happen without touching your files or database.
  • Safety First: Shows a final summary of all pending actions before execution.
  • Secure: Uses .env files to keep your Plex credentials out of your code.

📦 Installation

  1. Clone the repository: bash git clone cd plex-watched-maintenance

  2. Install dependencies: pip install -r requirements.txt

  3. Configure Environment Variables: Create a .env file in the root directory and add your credentials:

PLEX_USERNAME=your_username
PLEX_PASSWORD=your_password
PLEX_URL=http://your-plex-server:32400

🚀 Usage

Run the script using Python:

python plex.py
Select Mode: Choose between Dry-Run (preview) or Live mode at startup.
Review Items: Follow the interactive prompts to categorize your watched content.
Confirm: Review the final action summary.

⚠️ Safety Notes
Deletion is permanent: Files removed from your OS cannot be recovered unless you have a separate backup system.
Test first: Always run in dry-run mode initially to ensure the script targets the correct files.
Security: Never commit your .env file to a public repository. The included .gitignore is configured to prevent this.

📂 Project Structure
plex-watched-maintenance/
├── README.md           # Project documentation
├── plex_cleanup.py     # Main script logic
├── plex_cleanup.bat    # Windows batch shortcut
├── .env                # Template for environment variables
├── requirements.txt    # Python dependencies
└── .gitignore          # Prevents sensitive files from being tracked

🛠 Requirements

Python 3.8+

python-dotenv

PlexAPI

📜 License This project is licensed under the MIT License. Feel free to use, modify, and share as you see fit.

🤝 Contributing Contributions make the community great! If you want to add features like CLI flags, logging, or improved batch operations:

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages