Giter Club home page Giter Club logo

shart's Introduction

Shart

Use Discord to manage your Radarr and Sonarr applications

Commands:

  • search <title> (for new media)
  • clear (remove messages if there's too much clutter)
  • add <tmdb-id> to be monitored
  • quality to retrieve avilable quality profiles
  • folders to retrieve avilable root folders
  • set-quality <profile-id> to set quality profile to make a valid add request
  • set-folder <folder-path-or-id> to set folder path make a valid add request

Install

  • Install the Go compiler
  • Install go dep
  • clone this project
  • run dep ensure in project folder
  • run go build -o shart
  • run ./shart -token <discord-token> -radarr-url http://192.168.1.15:7878 -radarr-key abc123 -sonarr-url http://192.168.1.15:8989 -sonarr-key abc123

To get a discord token go to https://discordapp.com/developers/applications/me

  • click New App
  • fill out required information
  • click save
  • click create a bot user
  • click on generate oauth2 url
  • check send messages and manage messages
  • copy and go to url
  • authorize bot to access your discord server
  • go back to https://discordapp.com/developers/applications/me
  • click on token to retrieve discord token

Docker

Simply pull the docker image from docker hub

docker pull jrudio/shart

then

  • run docker run -d jrudio/shart -token abc123 -radarr-url http://192.168.1.15:7878 -sonarr-url http://192.168.1.15:8989 -radarr-key abc123 -sonarr-key abc123

Build Image Yourself (BIY)

  • clone this repo onto target machine
  • make sure you're in the repo directory
  • run docker build -t jrudio/shart .
  • run docker run -d jrudio/shart -token abc123 -radarr-url http://192.168.1.15:7878 -sonarr-url http://192.168.1.15:8989 -radarr-key abc123 -sonarr-key abc123

OPTIONAL:

  • use docker-compose for an easy startup
  • edit docker-compose.yml to match your discord/sonarr/radarr url and api key
  • run docker-compose up -d shart

Usage

This bot will respond to the trigger word shart

if you would like to search for movies use: shart search movie sicario

the bot will respond with:

Here are your search results for sicario:
    - Sicario 2015 (273481)
    - Sicario 1994 (95700)
    - Sicario: Day of the Soldado 2018 (400535)

use the id in parenthesis to add that movie

shart add movie 400535

you must set a default quality profile id and root folder path for both radarr and sonarr

shart set-quality movie 3

shart set-quality show 4

shart set-folder movie 3 or shart set-folder movie /home/user1/movies

shart set-folder show 2 or shart set-folder show /home/user1/shows

otherwise you will get both of these errors:

aborting... a root folder path must be set

aborting... a profile quality must be set

once you set those adding a movie will give you a success message: successfully added Sicario: Day of the Soldado - (2018)

Develop

Build a binary with versioning

go build -i -v -ldflags="-X main.version=v0.1.0-$(git describe --always --long --dirty)" -o shart

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.