Git Product home page Git Product logo

edcm's Introduction

Emby Dynamic Collections Manager

EDCM - A Companion Tool For Emby To Manage Emby Collections Based On User Specified Rules

Overview

EDCM is a small Python app that reads a config file containing rules for collections, searches for media that satisfies those rules, and creates/updates the collection with the results. This allows users to create more specific collections.

Installation

First, generate an API token following the official documentation.

Next, follow your preferred installation method:

Option 1: Docker (Recommended)

Run the command after replacing values within << >>:

Note: For all options see Options section below

docker run -d \
  --name=edcm \
  -e EMBY_ADDRESS=<<emby-ip-address-here>> \
  -e EMBY_TOKEN=<<your-emby-api-token-here>> \
  -v <</path/to/config/dir>>:/config \
  --restart unless-stopped \
  ghcr.io/steveharsant/edcm:latest

Or, for Docker Compose:

services:
  edcm:
    container_name: edcm
    image: ghcr.io/steveharsant/edcm:latest
    environment:
      - EMBY_ADDRESS=<<emby-ip-address-here>>
      - EMBY_TOKEN=<<your-emby-api-token-here>>
    volumes:
      - <</path/to/config/dir>>:/config
    restart: unless-stopped

Option 2: Direct

  1. Clone this repository
  2. cd to the src subdirectory
  3. Run pip install -r requirements.txt
  4. Run python app.py

Options

The following environment variables provide configuration to EDCM:

Name Default Value Required
EDCM_CONFIG_PATH /config/config.ini False
EMBY_ADDRESS N/A True
EMBY_PORT 8096 False
EMBY_TOKEN N/A True
EDCM_SCAN_INTERVAL (seconds) 600 False
EDCM_USE_SSL False False

Creating Collection Rules

  1. Find the config.ini
  2. Update the config to match your desired collections. For example:
[Highly Rated HBO Series]
Type=Series
Studios = HBO
MinCommunityRating = 8

[Comedies]
Genres = comedy

This example config has 2 collections, Highly Rated HBO Series and Comedies.

Highly Rated HBO Series will contain and HBO TV show with a rating of 8.0 and above, whilst the Comedies collection will contain any TV Show or Movie that is tagged as a comedy by genre.

For a full list of supported rules, see the official Get Items Swagger documentation

edcm's People

Contributors

steveharsant avatar

Stargazers

Wesley Ashkinazy avatar  avatar  avatar  avatar SS avatar Jordan avatar RXWatcher avatar  avatar  avatar  avatar

Watchers

 avatar

edcm's Issues

Crashing instead of adding to collections

Hey, getting this error when trying to use it:

2024-06-09 14:34:39.863 | INFO | main::73 - Starting EDCM
2024-06-09 14:34:39.863 | SUCCESS | main::76 - Config watcher registered
2024-06-09 14:34:39.864 | SUCCESS | functions:load_config:45 - Found collection rule sets: Netflix
2024-06-09 14:34:39.864 | INFO | main:main:18 - Requesting library information
2024-06-09 14:34:39.868 | INFO | main:main:23 - Processing 'Netflix' collection rule set
2024-06-09 14:34:39.931 | SUCCESS | main:main:58 - Processed items. 21 matches found
Traceback (most recent call last):
File "/app/app.py", line 83, in
main(config)
File "/app/app.py", line 66, in main
if emby_api.update_collection(rule_set, ids):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api.py", line 44, in update_collection
if DEBUG is True:

^^^^^
NameError: name 'DEBUG' is not defined

This is my docker compose:

version: '3.8'
services:
edcm:
container_name: edcm
image: ghcr.io/steveharsant/edcm:latest
environment:
- EMBY_ADDRESS=192.168.0.xx
- EMBY_TOKEN=xx
volumes:
- /home/lk/docker/edcm:/config
restart: unless-stopped
labels:
- com.centurylinklabs.watchtower.enable=true

My config is just:

[Netflix]
Studios = Netflix

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.