Giter Club home page Giter Club logo

omegabrr's Introduction

OMEGABRR

Omegabrr transforms items monitored by arrs or lists into autobrr filters. Useful for automating your filters for monitored media or racing criteria.

Config

You can set multiple filters per arr. Find the filter ID by going into the webui and get the ID from the url like http://localhost:7474/filters/10 where 10 is the filter ID.

Create a config like config.yaml somewhere like ~/.config/omegabrr. mkdir ~/.config/omegabrr && touch ~/.config/omegabrr/config.yaml.

server:
  host: 0.0.0.0
  port: 7441
  apiToken: GENERATED_TOKEN
schedule: "0 */6 * * *"
clients:
  autobrr:
    host: http://localhost:7474
    apikey: YOUR_API_KEY
  arr:
    - name: radarr
      type: radarr
      host: https://yourdomain.com/radarr
      apikey: YOUR_API_KEY
      filters:
        - 15 # Change me
      #matchRelease: false / true

    - name: sonarr
      type: sonarr
      # host: http://localhost:PORT
      # host: http://sonarr
      host: https://yourdomain.com/sonarr
      apikey: YOUR_API_KEY
      basicAuth:
        user: username
        pass: password
      filters:
        - 14 # Change me
      #matchRelease: false / true
      #excludeAlternateTitles: false/ true # only works for Sonarr and defaults to false

    - name: lidarr
      type: lidarr
      host: https://yourdomain.com/lidarr
      apikey: YOUR_API_KEY
      filters:
        - 13 # Change me
      #matchRelease: false / true

    - name: readarr
      type: readarr
      host: https://yourdomain.com/readarr
      apikey: YOUR_API_KEY
      filters:
        - 12 # Change me

    - name: whisparr
      type: whisparr
      host: https://yourdomain.com/whisparr
      apikey: YOUR_API_KEY
      filters:
        - 69 # Change me
      matchRelease: true # needed as we grab site names

lists:
  - name: Latest TV Shows
    type: mdblist
    url: https://mdblist.com/lists/garycrawfordgc/latest-tv-shows/json
    filters:
      - 1 # Change me

  - name: Anticipated TV
    type: trakt
    url: https://api.autobrr.com/lists/trakt/anticipated-tv
    filters:
      - 22 # Change me

  - name: Upcoming Movies
    type: trakt
    url: https://api.autobrr.com/lists/trakt/upcoming-movies
    filters:
      - 21 # Change me

  - name: Upcoming Bluray
    type: trakt
    url: https://api.autobrr.com/lists/trakt/upcoming-bluray
    filters:
      - 24 # Change me

  - name: Popular TV
    type: trakt
    url: https://api.autobrr.com/lists/trakt/popular-tv
    filters:
      - 25 # Change me
  
  - name: StevenLu
    type: trakt
    url: https://api.autobrr.com/lists/stevenlu
    filters:
      - 23 # Change me

  - name: New Albums
    type: metacritic
    url: https://api.autobrr.com/lists/metacritic/new-albums
    filters:
      - 9 # Change me

  - name: Upcoming Albums
    type: metacritic
    url: https://api.autobrr.com/lists/metacritic/upcoming-albums
    filters:
      - 20 # Change me

  - name: Steam Wishlist
    type: steam
    url: https://store.steampowered.com/wishlist/id/USERNAME/wishlistdata
    filters:
      - 20 # Change me

If you're trying to reach radarr or sonarr hosted on swizzin from some other location, you need to do it like this with basic auth:

  arr:
    - name: radarr
      type: radarr
      host: https://domain.com/radarr
      apikey: YOUR_API_KEY
      basicAuth:
        user: username
        pass: password
      filters:
        - 15 # Change me

Same goes for autobrr if it's behind basic auth.

  autobrr:
    host: http://localhost:7474
    apikey: YOUR_API_KEY
    basicAuth:
      user: username
      pass: password

Tags

This works for both sonarr and radarr.

If you want to match only certain tags you can use the tagsInclude.

- name: sonarr
  type: sonarr
  host: http://localhost:8989
  apikey: API_KEY
  filters:
    - 14 # Change me
  tagsInclude:
    - mytag

If you want to exclude certain tags, you can use the tagsExclude.

- name: sonarr
  type: sonarr
  host: http://localhost:8989
  apikey: API_KEY
  filters:
    - 14 # Change me
  tagsExclude:
    - myothertag

Lists

Formerly known as regbrr and maintained by community members is now integrated into omegabrr! We now maintain the lists of media.

Trakt

If you are using the Trakt api directly you need to have an API key which you can set via the headers object along with any other header needed for the request.

lists:
  - name: Some custom Trakt endpoint
    type: trakt
    url: https://api.trakt.tv/calendars/all
    headers:
      trakt-api-key: your_key_goes_here
    filters:
      - 22 # Change me

Optionally use Match Releases field in your autobrr filter

By setting matchRelease: true in your config, it will use the Match releases field in your autobrr filter instead of fields like Movies / Shows and Albums.

Readarr will only use the Match releases field for now, so setting matchRelease: false for Readarr will be ignored.

Exclude alternative titles from Sonarr

You can drop alternate show titles from being added by setting excludeAlternateTitles: true for Sonarr in your config.

Plaintext lists specific options

Plaintext lists can be anything, therefore you can optionally set matchRelease: true or album: true to use these fields in your autobrr filter. If not set, it will use the Movies / Shows field.

lists:
  - name: Personal list
    type: plaintext
    url: https://gist.githubusercontent.com/autobrr/somegist/raw
    filters:
      - 27 # change me

Commands

Available commands.

generate-token

Generate an API Token to use when triggering via webhook. Copy the output and put in your config like

server:
  host: 0.0.0.0
  port: 7441
  apiToken: MY_NEW_LONG_SECURE_TOKEN

Call with omegabrr generate-token If you are using docker docker exec omegabrr omegabrr generate-token Optionally call with --length <number>for a custom length.

arr

Call with omegabrr arr --config config.yaml

Supports to run with --dry-run to only fetch shows and skip filter update.

lists

Call with omegabrr lists --config config.yaml

Supports to run with --dry-run to only fetch shows and skip filter update.

run

Run as a service and process on cron schedule. Defaults to every 6 hour 0 */6 * * *.

Service

When run as a service it exposes an HTTP server as well. Generate an API Token (see instructions above) and add to your config.

To refresh the filters you can make a POST or GET request to the following:

  • http://localhost:7441/api/webhook/trigger/arr?apikey=MY_NEW_LONG_SECURE_TOKEN - This will trigger all arr filters. (Use this in you arr instances)
  • http://localhost:7441/api/webhook/trigger/lists?apikey=MY_NEW_LONG_SECURE_TOKEN - This will trigger all lists filters.
  • http://localhost:7441/api/webhook/trigger?apikey=MY_NEW_LONG_SECURE_TOKEN - This will trigger all filters.

The API Token can be set as either an HTTP header like X-API-Token, or be passed in the url as a query param like ?apikey=MY_NEW_LONG_SECURE_TOKEN.

Docker compose

Check the docker-compose.yml example.

  1. Set user: 1000:1000 with your user id you can get with the id command, or remove to run as root.
  2. Set the volume so it matches your system. To run from the same path as the docker-compose first create a config dir like mkdir config, and place this ./config:/config in the compose file. This will create a default config on the first run.

If you have custom networks then make sure to add those, so it can communicate with autobrr, sonarr and radarr.

Systemd

On Linux-based systems it is recommended to run omegabrr as a systemd service.

Download the latest binary for your system and place it in /usr/local/bin.

Example: Download binary

wget https://github.com/autobrr/omegabrr/releases/download/$VERSION/omegabrr_$VERSION_linux_x86_64.tar.gz

Extract

tar -xvf omegabrr_$VERSION_linux_x86_64.tar.gz ~/

Move to somewhere in $PATH. Needs to be edited in the systemd service file if using other location.

sudo mv ~/omegabrr /usr/local/bin/

After that create the config directory for your user:

mkdir -p ~/.config/omegabrr

You will then need to create a service file in /etc/systemd/system/ called [email protected].

touch /etc/systemd/system/[email protected]

Then place the following content inside the file (e.g. via nano/vim/ed) or copy the file .

[Unit]
Description=omegabrr service for %i
After=syslog.target network-online.target

[Service]
Type=simple
User=%i
Group=%i
ExecStart=/usr/local/bin/omegabrr run --config=/home/%i/.config/omegabrr/config.yaml

[Install]
WantedBy=multi-user.target

Start the service. Enable will make it startup on reboot.

sudo systemctl enable -q --now omegabrr@$USERNAME

Make sure it's running and active

sudo systemctl status omegabrr@$USERNAME.service

By default, the config is set to listen on only 127.0.0.1. It's highly advised to put it behind a reverse-proxy like nginx or traefik etc.

If you are not running a reverse proxy change host in the config.toml to 0.0.0.0.

On first run it will create a default config, ~/.config/omegabrr/config.yaml that you will need to edit.

After the config is edited you need to restart the service systemctl restart omegabrr@$USERNAME.service.

omegabrr's People

Contributors

brettpetch avatar dependabot[bot] avatar martylukyy avatar nuxencs avatar quorn23 avatar s0up4200 avatar spencerhughes avatar zze0s 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

omegabrr's Issues

ability to merge multiple lists in one filter

for doing quick freelech, I want to have multiple TV and movies lists into the same filter.

with my current config, only the last list is persisted into the filter

lists:
  - name: Latest TV Shows
    type: mdblist
    url: https://mdblist.com/lists/garycrawfordgc/latest-tv-shows/json
    filters:
      - 2  # quick freelech

  - name: Anticipated TV
    type: trakt
    url: https://api.autobrr.com/lists/trakt/anticipated-tv
    filters:
      - 2  # quick freelech

  - name: Popular TV
    type: trakt
    url: https://api.autobrr.com/lists/trakt/popular-tv
    filters:
      - 2  # quick freelech

  - name: Upcoming Movies
    type: trakt
    url: https://api.autobrr.com/lists/trakt/upcoming-movies
    filters:
      - 2  # quick freelech

the workaround is to make one filter per list by duplicating it. not optimal because keeping the other settings in sync is not optimal

open to do the PR if agreed

Improve Whisparr transformation into filters

Using Omegabrr to generate filters from Whisparr will not work with site names that contain two or more words, as the site name is usually not separated by dots or spaces like it is the case with movies and TV shows.

For example:
Vixen.24.03.15.foo.bar
RealityJunkies.24.03.22.foo.bar

A generated filter from Whisparr's monitored items looks like this:
*Vixen*
*Reality?Junkies*

The single word site name matches without a problem but the site with more than two word in the name will not because there is nothing between the words.

{
  "level": "debug",
  "module": "filter",
  "method": "CheckFilter",
  "time": "2024-03-22T06:01:40+01:00",
  "message": "(Whisparr Omegabrr) for release: RealityJunkies.24.03.22.Vanessa.Sky.My.Sister.Is.A.Slut.XXX.1080p.HEVC.x265.PRT[XvX] rejections: (match release not matching. got: RealityJunkies.24.03.22.Vanessa.Sky.My.Sister.Is.A.Slut.XXX.1080p.HEVC.x265.PRT[XvX] want: *Reality?Junkies*,*Vixen*)"
}

Trace/breakpoint trap

When trying to run the omegabrr binary from omegabrr_1.10.0_linux_x86_64.tar.gz, I get Trace/breakpoint trap.
This happens whether I call it with generate-token or nothing at all.

OS: Debian GNU/Linux 10
CPU:

Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
Address sizes:       43 bits physical, 48 bits virtual
CPU(s):              128
On-line CPU(s) list: 0-127
Thread(s) per core:  2
Core(s) per socket:  64
Socket(s):           1
NUMA node(s):        4
Vendor ID:           AuthenticAMD
CPU family:          25
Model:               1
Model name:          AMD EPYC 7713 64-Core Processor
Stepping:            1
CPU MHz:             3096.431
CPU max MHz:         3720.7029
CPU min MHz:         1500.0000
BogoMIPS:            4000.14
Virtualization:      AMD-V
L1d cache:           32K
L1i cache:           32K
L2 cache:            512K
L3 cache:            32768K
NUMA node0 CPU(s):   0-31
NUMA node1 CPU(s):   32-63
NUMA node2 CPU(s):   64-95
NUMA node3 CPU(s):   96-127

Config Created with arr and --config passed to a non-existent file

bakerboy448@hetz-baker-2004:~/.config/omegabrr$ rm config.yaml
bakerboy448@hetz-baker-2004:~/.config/omegabrr$ omegabrr arr --config ~/.config/omegabrr/config.yaml
2022-11-28T13:53:21-06:00 DBG starting filter processing...
2022-11-28T13:53:21-06:00 DBG gathering titles... client=sonarr type=sonarr
2022-11-28T13:53:21-06:00 DBG gathering titles... client=radarr4k type=radarr
2022-11-28T13:53:21-06:00 DBG gathering titles... client=radarr type=radarr
2022-11-28T13:53:21-06:00 ERR Something went wrong trying to update filters! Total time: 2.647045ms error="api.Get(series): failed:  (status: 401 Unauthorized): invalid status code, <200||>299: "

Instead of generating the config and error should be thrown that the config is missing

bakerboy448@hetz-baker-2004:~/.config/omegabrr$ omegabrr version
Version: 1.0.1
Commit: 62573067a39e79af98a8feb86daead94ce9f0075

[Parsing]: Special Characters

If special character is end of string it might be best to swap to doing just * instead of the special character as some sources do not release with special character in the name.

Relay from Discord Issue report:

Example:

{"level":"debug","module":"release","indexer":"REDACTED","filter":"SONARR","release":"American.Dad.S19E21.Echoes.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb","time":"2022-12-14T14:54:48+01:00","message":"release rejected: match release not matching. got: American.Dad.S19E21.Echoes.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb want: *American?Dad!*

Issue seems to be that the filter added the !

Parsing the ! character

American Dad! has a exclamation point at the end. Omegabrr adds that to the list of shows but the release name doesnt include it.

{"level":"debug","module":"release","indexer":"btn","filter":"!SONARR","release":"American.Dad.S19E21.Echoes.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb","time":"2022-12-14T14:54:48+01:00","message":"release rejected: match release not matching. got: American.Dad.S19E21.Echoes.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb want: *American?Dad!*

Filling a filter with torrent titles currently in qbittorrent

Might be nice to be able to fill a filter with the strings of current torrents in qbittorrent, to help with setting up cross-seed.
Would only work when title based torrent matching is used, but that's probably fine for most users.
Happy to contribute back, just wanted to start a discussion about it first before pushing a PR

Unable to run bin file direct

No matter where I put the config, the omegabrr executable can't find the config.
Due to the way my host is setup with segmentation, I can't access the hosts from a docker container.
I'm hoping there is a way to work around this.
Opensuse Tumbleweed x64

Thanks.

Do not empty out Match Releases field.

With the new change of using the Movies/Shows field instead of the Match Releases field,
there could be room for additional filtering with the match releases field.
However when omegabrr is running it will currently empty out the field on each run.
I would suggest for omegabrr to not empty out the Match Releases field and leave as it is for the user to do additional filtering.

Whisparr v2 support

Looking at

if err := s.radarr(ctx, arrClient, dryRun, a); err != nil {
it looks like whisparr is configured for radarr which may have been the v1 whisparr. v2 uses sonarr which results in this fail:

2023-08-30T21:08:50-04:00 DBG gathering titles... client=whisparr type=radarr 2023-08-30T21:08:50-04:00 ERR error while processing Whisparr, continuing with other clients error="api.Get(movie): failed: (status: 404 Not Found): invalid status code, <200||>299: " client=whisparr type=whisparr 2023-08-30T21:08:50-04:00 WRN Run complete, with errors. 2023-08-30T21:08:50-04:00 WRN Errors encountered during processing: 2023-08-30T21:08:50-04:00 WRN Whisparr - whisparr: api.Get(movie): failed: (status: 404 Not Found): invalid status code, <200||>299:

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.