Code Monkey home page Code Monkey logo

jellyfin-whatsapp-notifier's Introduction

Jellyfin WhatsApp Notifier

This application serves as a bridge between Jellyfin Media Server and WhatsApp, sending notifications about Jellyfin events to a specified WhatsApp group.

Features

  • Receives webhook notifications from Jellyfin
  • Processes various Jellyfin event types:
    • Item Added
    • Playback Start
    • Playback Stop
    • Authentication Success
    • Authentication Failure
  • Sends formatted notifications to a WhatsApp group
  • Automatically reconnects to WhatsApp if disconnected

Prerequisites

  • Node.js (v14 or later recommended)
  • npm (Node Package Manager)
  • A Jellyfin server with webhook capabilities
  • A WhatsApp account for the bot

Installation

  1. Clone this repository:
git clone https://github.com/Myjellyfin/Jellyfin-WhatsApp-notifier.git
cd Jellyfin-Whatsapp-notifier
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory with the following content: PORT=3000 WHATSAPP_GROUP_ID=your_whatsapp_group_id Replace your_whatsapp_group_id with the actual ID of your WhatsApp group.

Usage

  1. Start the server:
npm run start
  1. The first time you run the app, you'll need to scan a QR code to authenticate the WhatsApp session.

  2. Configure your Jellyfin server to send webhook notifications to http://your-server-ip:3000/webhook

API Endpoints

  • POST /webhook: Receives notifications from Jellyfin
  • GET /groups: Lists available WhatsApp groups (useful for finding group IDs)

Notification Formats

  • Item Added: New {ItemType} Added\nName: {Name}\nRuntime: {RunTime}\nPremiere Date: {PremiereDate}
  • Playback Start: {NotificationUsername} started watching\n{Name}
  • Playback Stop: {NotificationUsername} stopped watching\n{Name}
  • Authentication Success: Successful Login\n{NotificationUsername} Logged in
  • Authentication Failure: Failed Login Attempt\n{Username} login attempt failed

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

jellyfin-whatsapp-notifier's People

Contributors

aethervoyager avatar

Watchers

 avatar

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.