jl94x4 / ColleXions

ColleXions automates the process of pinning collections to your Plex home screen, making it easier to showcase your favorite content. With customizable features, it enhances your Plex experience by dynamically adjusting what is displayed, randomly.
MIT License
31 stars 1 forks source link

Build Status Scrutinizer Code Quality

ColleXions

ColleXions automates the process of pinning collections to your Plex home screen, making it easier to showcase your favorite content. With customizable features, it enhances your Plex experience by dynamically adjusting what is displayed either controlled or completely randomly - the choice is yours. Version 1.11+ includes collaboration with @defluophoenix

Key Features

Category Processing:

[!TIP] If you have more than 20 collections per category it is recommended to use true

Include & Exclude Collections

How Include & Exclude Work Together

Collection Priority Enforcement

The ColleXions tool organizes pinned collections based on a defined priority system to ensure important or seasonal collections are featured prominently:

If no special collections or categories are defined, ColleXions will automatically fill all slots with random collections, ensuring your library's home screen remains populated with the amounts specified in your config.

Selected Collections

A file titled selected_collections.json is created on first run and updated each run afterwards and keeps track of what's been selected to ensure collections don't get picked repeatedly leaving other collections not being pinned as much. It resets after 3 days so hopefully you will only see a collection once every three days at most. This will depend on the amount of collections you have available and the amount you are asking ColleXions to pin will also play a part.

Installation

Extract the files in the location you wish to run it from

Run pip install -r requirements.txt to install dependencies

Update the config.json file with your Plex URL, token, library names, and exclusion/inclusion lists.

Run python3 ColleXions.py

Docker Run

[!CAUTION] You should never share your Plex token with anyone else.

Download the config.json and edit to your liking

https://github.com/jl94x4/ColleXions/blob/main/config.json

docker run -it --name ColleXions \
  -v /path/to/collexions/config.json:/app/config.json \
  -v /path/to/collexions/logs:/app/logs \
  docker.io/jl94x4/collexions

Docker Compose


services:
  collexions:
    image: jl94x4/collexions
    container_name: collexions
    volumes:
      - /path/to/collexions/config.json:/app/config.json
      - /path/to/collexions/logs:/app/logs
    restart: unless-stopped

Then run docker-compose up -d

[!TIP] pinning_interval is in minutes

Discord Webhooks (optional)

ColleXions now includes a Discord Webhook Integration feature. This enhancement enables real-time notifications directly to your designated Discord channel whenever a collection is pinned to the Home and Friends' Home screens.

Configuration: Include your Discord webhook URL in the config.json file.

Notifications: Every time a collection is successfully pinned, the tool sends a formatted message to the specified Discord channel, highlighting the collection name in bold.

This feature helps you keep track of which collections are being pinned, allowing for easy monitoring and tweaks to ensure diversity and relevance.

Logging

After every run collexions.log will be created with a full log of the last successful run. It will be overwritten on each new run.

Acknowledgments

Thanks to the PlexAPI library and the open-source community for their support. Thanks to defluophoenix for the additional work they've done on this

License

This project is licensed under the MIT License.