Giter VIP home page Giter VIP logo

flemmarr's Introduction

Flemmarr

Flemmarr

flemmard (noun or adj.): lazy, slacker, idler in French ๐Ÿ‡ซ๐Ÿ‡ท (cf. Wiktionary)

Flemmarr is a simple Python script that parses a configuration written in YAML and can apply it to any of the -arr apps (Sonarr, Radarr, Lidarr, Readarr, Prowlarr) using their API.

Installation

The easiest way to use it is to run it using Docker alongside your other -arr applications.

docker run pierremesure/flemmarr:latest -v ./config/flemmarr:config

You can also just add it to your docker-compose.yml

version: "3"
services:
  flemmarr:
    container_name: flemmarr
    image: pierremesure/flemmarr
    volumes:
      - "./config/flemmarr:/config"

Check out the example docker-compose.yml with flemmarr alongside all other -arr apps.

Configuration

To configure your apps, simply put a file called config.yml in the config folder.

For each app, you need to provide the address and the port under the server key.

Regarding the actual configuration, both keys and values need to be the ones used by the apps to communicate with their user interface through the API.

For instance, in order to change the app's language to French, a call would be made to /config/ui with a payload containing uiLanguage: 2. To add a new root folder, the call would go to /rootfolder and send the folder's name, path and some more metadata.

These two examples are displayed below:

lidarr:
  server:
    address: localhost
    port: 8686
  config:
    ui:
      uiLanguage: 2 # 1 = English, 2 = French, 3 = Spanish...
  rootfolder:
    - name: Music
      path: /data/music
      defaultTags: []
      defaultQualityProfileId: 1
      defaultMetadataProfileId: 1

Check out the example config.yml with more settings for various apps.

NB: Unfortunately, I found the APIs for all -arr tools to be of poor quality. Oftentimes, some fields are needed for no reason, default values are not the same as the ones applied by the GUI.

If you cannot find how to change a specific part of the configuration in this file, you will have to find out by yourself how it should look like. You can for instance:

  • browse the API docs of the app (Sonarr, Radarr, Lidarr, Readarr, Prowlarr)
  • use your browser inspector to identify which call is sent by the GUI
  • use a REST client such as Insomnia to tinker your payload and see exactly which values work and don't
  • ask for help here by creating an issue.

Once you've found the solution, please add it to the example config file so others can benefit from your knowledge.

Contributing

I created Flemmarr because I was shocked when I couldn't find a way to write configuration as code for any of the -arr applications. I hope it is useful to more.

I do not actually use any of the -arr apps in my daily life, I was just helping a friend to install them. So I don't plan on spending too much time on maintaining or improving the project. Feel free to submit your issues and your suggestions though! And feel free to have a look at the (very simple) code and documentation and try to make them better.

Some ideas I have

  • document more of the configuration's possible values, required fields
  • make the service idempotent (not easy considering how the APIs are designed)
  • make it possible to declare a common config for several apps to avoid redundancy in the file (maybe with group configs)
  • add automated testing
  • repackage the Python script as an Ansible package (if there is demand)

Credits

Cute cartoon vector created by catalyststuff - freepik.com

flemmarr's People

Contributors

anthonyenr1quez avatar appkins avatar pierremesure avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

flemmarr's Issues

Enhancement back up existing config

It would be nice if you wanted to share your setup with a friend there was some program to directly read the database or use the API to back up your setup then send them a config file and then setup their stuff exactly like your setup. You could also use this to back up your setting. I say settings because your friend might like different shows or movies or music, so sending them your entire database file would have stuff in it they are not interested in. So basically share your setup with your friend or others online but not your list of media.

Noting my support for an Ansible module

Hey, love the project, thank you for making this! Automating the configuration of the 'arrs was an issue for me for a long time. After starting again from scratch, I'm configuring everything with Flemmarr and it's been superb so far!

I saw you noted this in the readme:

repackage the Python script as an Ansible package (if there is demand)

I just wanted to add my support for this; it'd be really useful. I'm currently deploying the containers with Ansible and simply have a handler to run Flemmarr when the config file is changed, but being able to do all of this with Ansible without the need for a container would be amazing.

As much as I'd love to help with implementing this, it's a little beyond me, as a Python novice. However, I'd be more than happy to help with testing or anything like that.

Error when 'arr is has authentication enabled

When an 'arr app has authentication enabled, Flemmarr cannot apply the config and exits with the following error:

Trying to connect to sonarr
Traceback (most recent call last):
  File "//run.py", line 16, in <module>
    api.initialize()
  File "/api.py", line 83, in initialize
    api_root = bits[1]
IndexError: list index out of range

It would be great if an API key could be specified in the config so Flemmarr can still function even when /initialize.js is behind a login prompt.

Enhancement: Support Custom Formats

I would like to see these options supported:

Lists (examples, IMDB top 250, Criterion Collection, etc)
Custom Formats (supported from Radarr? Audio codecs, Video codecs, etc for ranking/preferences to download)
Release Profiles (supported from Sonarr? Audio codecs, Video codecs, etc for ranking/preferences to download)
Quality Definitions (STV, DVD, WEB, Bluray, etc, bitrates and file sizes)
Connections (connect with Jellyfin to update it, post processing scripts, etc)
Metadata (create metadata files for video files)

Basically every single option to setup the *arrs so I can duplicate and save my setup since I have my stuff setup highly configured.

Multiple instances of apps?

Does this project support multiple servers of the same type? I couldn't see in the sample config how to set htis.

e.g. two instances of sonarr or radarr?

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.