Git Product home page Git Product logo

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 Projects

flemmarr icon flemmarr

Flemmarr makes it easy to automate configuration for your -arr apps

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.