Skip to content

Flemmarr/Flemmarr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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