When Trakt returns a non-404 error (e.g. 403) for a tmdbId lookup, fetch the imdbId from TMDB's /external_ids endpoint and retry the Trakt call using the imdbId. Trakt often knows a movie/show by its imdbId even when it does not recognise the tmdbId. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Nabarr
Nabarr monitors Newznab/Torznab RSS feeds to find new media to add to Sonarr and or Radarr.
Table of contents
Installing nabarr
Nabarr offers pre-compiled binaries for Linux, MacOS and Windows for each official release. In addition, there is also a Docker image!
Alternatively, you can build the Nabarr binary yourself. To build nabarr on your system, make sure:
- Your machine runs Linux, macOS or Windows
- You have Go installed (1.14 or later preferred)
- Clone this repository and cd into it from the terminal
- Run
make buildfrom the terminal
You should now have a binary with the name nabarr in the appropriate dist sub-directory of the project.
If you need to debug certain Nabarr behaviour, either add the -v flag for debug mode or the -vv flag for trace mode to get even more details about internal behaviour.
Introduction
Nabarr configuration is split into three distinct modules:
- Media
- PVR
- RSS
Media
The media configuration section has only one requirement, a trakt client_id must be present as this will be used to fetch metadata for any shows/movies that appear in your RSS feeds.
media:
trakt:
client_id: trakt-client-id
omdb:
api_key: omdb-api-key
tvdb:
api_key: tvdb-legacy-api-key
tmdb:
api_key: tmdb-api-key
An omdb api_key can be provided which will be used to supplement trakt data with additional information such as:
- Metascore
- RottenTomatoes
- ImdbRating
- ImdbVotes
- Language
- Country
An tvdb api_key can be provided which will be used to supplement trakt data with additional information such as:
- Runtime
- Language
- Genre
- AirsDayOfWeek
- SiteRating
- SiteRatingCount
A tmdb api_key can be provided to enable automatic enrichment of RSS feed items that carry no media ID. When an item has no tvdb/imdb/tmdb ID, Nabarr will parse the release title, extract a clean title and year, then search TMDB to resolve a TMDB ID before processing. Get a free API key at themoviedb.org.
PVR
The pvrs configuration section is where you will specify the PVR's that Nabarr will work with.
pvrs:
- name: sonarr
type: sonarr
url: https://sonarr.domain.com
api_key: sonarr-api-key
quality_profile: WEBDL-1080p
language_profile: English
root_folder: /mnt/unionfs/Media/TV
options:
add_monitored: true
search_missing: true
skip_anime: true
filters:
ignores:
- 'not (FeedTitle matches "(?i)S\\d\\d?E?\\d?\\d?")'
- 'FeedTitle matches "(?i)\\d\\d\\d\\d\\s?[\\s\\.\\-]\\d\\d?\\s?[\\s\\.\\-]\\d\\d?"'
- 'len(Languages) != 1 || "en" not in Languages'
- 'Runtime < 10 || Runtime > 70'
- 'Network == ""'
- 'any (["Hallmark Movies"], {Network contains #})'
- 'not (any(Country, {# in ["us", "gb", "au", "ca"]}))'
- 'Year < 2000'
- 'Year < 2021 && Omdb.ImdbRating < 7.5'
- 'AiredEpisodes > 200'
- 'Year > (Now().Year() + 1)'
- 'any (["WWE", "AEW", "WWF", "NXT", "Live:", "Concert", "Musical", " Edition", "Wrestling"], {Title contains #})'
- 'len(Genres) == 0'
- 'any (Genres, {# in ["anime", "talk-show", "news"]})'
- 'Network in ["Twitch", "Xbox Video", "YouTube"]'
- 'any (["harry", "potter", "horrid", "henry", "minions", "WWE", "WWF"], {Summary contains #})'
- 'Title matches "(?i)ru ?wwe.+events.+"'
- 'Title contains "My 600"'
- 'TvdbId in ["248783"]'
The following options can be set to override the default behaviour when adding content to a PVR (types: Sonarr & Radarr).
add_monitored(default:true) - Add new content as monitoredsearch_missing(default:true) - Add new content and search immediately
The following options can be set to skip adding content to a Sonarr PVR.
skip_anime(default:true) - If the series is of the anime type, do not add it
RSS
The rss configuration section is where you will specify the RSS feeds that Nabarr will work with.
rss:
feeds:
- name: series premiere
url: https://rss.indexer.me/rss-search.php?catid=19,20&user=your-username&api=your-api-key&search=S01E01&langs=11&nuke=1&pw=2&nodupe=1&limit=200
cron: '*/10 * * * *'
pvrs:
- sonarr
In order for Nabarr to process items in these feeds, a tvdb, imdb or tmdb id must be present in the feed items. If no ID is found but a tmdb.api_key is configured, Nabarr will attempt to resolve the ID automatically from the release title.
If there is a tvdb id present, it is assumed that the feed item relates to a TV Series and thus, the item will propagate to any Sonarr PVR specified.
If there is a imdb or tmdb id present, it is assumed that the feed item relates to a Movie and thus, the item will propagate to any Radarr PVR specified.
Full config file
With the examples given in the media, pvr and rss sections, here is what your full config file could look like:
media:
trakt:
client_id: trakt-client-id
omdb:
api_key: omdb-api-key
tvdb:
api_key: tvdb-legacy-api-key
pvrs:
- name: sonarr
type: sonarr
url: https://sonarr.domain.com
api_key: sonarr-api-key
quality_profile: WEBDL-1080p
language_profile: English
root_folder: /mnt/unionfs/Media/TV
filters:
ignores:
- 'not (FeedTitle matches "(?i)S\\d\\d?E?\\d?\\d?")'
- 'FeedTitle matches "(?i)\\d\\d\\d\\d\\s?[\\s\\.\\-]\\d\\d?\\s?[\\s\\.\\-]\\d\\d?"'
- 'not (any(Country, {# in ["us", "gb", "au", "ca", "nz"]})) && not (any(["USA", "UK", "Australia", "Canada", "New Zealand"], {Omdb.Country == #}))'
- 'len(Languages) > 0 && not (any(Languages, {# in ["en", ""]}))'
- 'Omdb.Language != "" && Omdb.Language != "English"'
- 'Tvdb.Language != "" && Tvdb.Language != "en"'
- 'not (any(Languages, {# in ["en", ""]})) && Omdb.Language == "" && Tvdb.Language == ""'
- 'Runtime < 10 || Runtime > 70'
- 'Network == ""'
- 'any (["Hallmark Movies"], {Network contains #})'
- 'Year < 2000'
- 'Year < 2021 && Omdb.ImdbRating < 7.5'
- 'AiredEpisodes > 100'
- 'Year > (Now().Year() + 1)'
- 'any (["WWE", "AEW", "WWF", "NXT", "Live:", "Concert", "Musical", " Edition", "Wrestling"], {Title contains #})'
- 'len(Genres) == 0'
- 'any (Genres, {# in ["anime", "talk-show", "news"]})'
- 'Network in ["Twitch", "Xbox Video", "YouTube"]'
- 'any (["harry", "potter", "horrid", "henry", "minions", "WWE", "WWF"], {Summary contains #})'
- 'Title matches "(?i)ru ?wwe.+events.+"'
- 'Title contains "My 600"'
- 'TvdbId in ["248783"]'
- name: radarr
type: radarr
url: https://radarr.domain.com
api_key: radarr-api-key
quality_profile: Remux
root_folder: /mnt/unionfs/Media/Movies
filters:
ignores:
- 'not (any(Country, {# in ["us", "gb", "au", "ca", "nz"]})) && not (any(["USA", "UK", "Australia", "Canada", "New Zealand"], {Omdb.Country == #}))'
- 'not (any(Languages, {# in ["en"]})) && Omdb.Language != "English"'
- 'Runtime < 60'
- 'len(Genres) == 0'
- '("music" in Genres || "documentary" in Genres)'
- 'Year > (Now().Year() + 1)'
- 'Year < 1980'
- 'Year < 2021 && (Omdb.Metascore < 55 || Omdb.RottenTomatoes < 55)'
- 'Title startsWith "Untitled"'
- 'any (["WWE", "AEW", "WWF", "NXT", "Live:", "Concert", "Musical", " Edition", "Paglaki Ko", "Wrestling ", "UFC on"], {Title contains #})'
- 'any (["harry", "potter", "horrid", "henry", "minions", "WWE", "WWF"], {Summary contains #})'
- 'Title matches "^UFC.?\\d.+\\:"'
- 'ImdbId in ["tt0765458", "tt0892255"]'
- 'TmdbId in ["11910", "8881"]'
rss:
feeds:
- name: series premiere
url: https://rss.indexer.me/rss-search.php?catid=19,20&user=your-username&api=your-api-key&search=S01E01&langs=11&nuke=1&pw=2&nodupe=1&limit=200
cron: '*/10 * * * *'
pvrs:
- sonarr
Other installation options
Docker
The Docker image is built automatically from this repository and pushed to the Gitea container registry on every commit to master.
| Tag | Description |
|---|---|
latest |
Most recent master commit |
master |
Most recent master commit |
Build locale
docker build -t nabarr -f docker/Dockerfile .
Usage
docker run \
--name=nabarr \
-e "PUID=1000" \
-e "PGID=1000" \
-v "/opt/nabarr:/config" \
--restart=unless-stopped \
-d forge.dilain.com/laurent/nabarr:latest
Parameters
| Parameter | Function |
|---|---|
-e PUID=1000 |
UserID to run Nabarr as |
-e PGID=1000 |
GroupID to run Nabarr as |
-e APP_VERBOSITY=0 |
Log verbosity (0 = info, 1 = debug, 2 = trace) |
-v /config |
Config, cache and log directory |
Unraid
Ajouter le registre privé
Dans Settings → Docker → Registry URL, ajouter :
https://forge.dilain.com
Ajouter le conteneur manuellement
Dans l'onglet Docker, cliquer sur Add Container et renseigner :
| Champ | Valeur |
|---|---|
| Name | nabarr |
| Repository | forge.dilain.com/laurent/nabarr:latest |
| Network Type | bridge |
| Restart | unless-stopped |
Ajouter les variables d'environnement :
| Variable | Valeur par défaut | Description |
|---|---|---|
PUID |
99 |
UserID (nobody sur Unraid) |
PGID |
100 |
GroupID (users sur Unraid) |
APP_VERBOSITY |
0 |
Niveau de log (0/1/2) |
Ajouter le volume :
| Container path | Host path |
|---|---|
/config |
/mnt/user/appdata/nabarr |
Note : Placer le fichier
config.ymldans/mnt/user/appdata/nabarr/avant de démarrer le conteneur.
Donate
If you find this project helpful, feel free to make a small donation:
-
Monzo: Credit Cards, Apple Pay, Google Pay
-
GitHub Sponsor: GitHub matches contributions for first 12 months.
-
BTC: 3CiHME1HZQsNNcDL6BArG7PbZLa8zUUgjL