The Emby Webhook Automation is a Python script that serves as a webhook listener for the Emby media server. It's designed to automate the merging of movies in your Emby library based on Tmdb ID received through webhooks.
- Automatically merge two movies in the Emby library based on matching Tmdb ID.
- Logs the merge results, including successful and unsuccessful merges.
- Supports an ignore list to exclude specific libraries from the merge process.
Before using this script, ensure you have the following:
- Python 3.12 installed
- Required Python libraries: Flask, requests
- Docker (optional, for Docker installation)
- Clone the repository.
- Install the requirements using
pip install -r requirements.txt
. - Set up your environment variables.
- Run the application using
python3 main.py
.
If you have Docker and Docker Compose installed, you can use the provided docker-compose.yml
- Set up your environment variables in a
.env
file. - Run
docker-compose up
.
- Go to Emby settings.
- Choose
Webhook
and add a new webhook. - Set the server to the Flask application's endpoint (e.g.,
http://192.168.1.1:5000/emby-webhook
). - Under
Library
, selectNew Media Added
.
- Go to Emby settings.
- Choose
Notification
and add a new notification. - Select
Webhooks
as the notification type. - Set the server to the Flask application's endpoint (e.g.,
http://192.168.1.1:5000/emby-webhook
). - You can set
Request content type
to eithermultipart/form-data
orapplication/json
. - Under
Library
, selectNew Media Added
.
To exclude specific movie libraries from the merge process, you can use the ignore list feature. This is particularly useful if you have separate libraries for different types of content that you do not wish to merge.
- Identify the libraries you want to exclude from the merge process.
- In your
.env
file, set theIGNORE_LIBRARY
variable to a comma-separated list of library paths you wish to ignore. For example: - If your library path is
/data/media/trending
you can setIGNORE_LIBRARY="trending"
Contributions are welcome! Feel free to open issues or submit pull requests for new features, bug fixes, or improvements.
This project is licensed under the MIT License. See the LICENSE file for details.