No description
Find a file
2025-04-30 20:29:54 -04:00
.gitignore Github Repo Updates 2025-04-26 23:17:33 +00:00
anilist.go cache jikan and anilist responses 2025-04-30 20:11:24 -04:00
consumer.go cache jikan and anilist responses 2025-04-30 20:11:24 -04:00
Dockerfile Github Repo Updates 2025-04-26 23:17:33 +00:00
go.mod feat: add response cache to all requests 2025-04-30 17:48:36 -04:00
go.sum feat: add response cache to all requests 2025-04-30 17:48:36 -04:00
helpers.go feat: add response cache to all requests 2025-04-30 17:48:36 -04:00
main.go bump version 2025-04-30 20:16:03 -04:00
mal.go cache jikan and anilist responses 2025-04-30 20:11:24 -04:00
middleware.go refactor, merge seasons, started caching jikan 2025-04-30 19:57:07 -04:00
README.md update README 2025-04-30 20:29:54 -04:00
release.sh bump version 2025-04-30 20:16:03 -04:00

sonarr-anime-importer

Easily create import lists in sonarr with MyAnimeList or AniList queries!

This is basically a wrapper for Jikan and the AniList API that maps IDs to a list with TVDB IDs so that Sonarr can import the results.

Until v1.0.0, breaking changes can happen at any time. Multiple have happened already! Be wary updating.

The "limit" parameter is required for all requests!

Pulls MyAnimeList, AniList, and TVDB ID associations from https://raw.githubusercontent.com/Kometa-Team/Anime-IDs/master/anime_ids.json.

Supported Requests

GET /v1/mal/anime

Searches anime from MyAnimeList

See https://docs.api.jikan.moe/#tag/anime/operation/getAnimeSearch for parameters.

Additional parameters supported:

  • allow_duplicates: skips de-duplication of results
  • merge_seasons: skips seasons of already included shows

Example request:

# fetches the top 10 most popular currently airing tv anime
curl "http://localhost:3333/v1/mal/anime?type=tv&status=airing&order_by=popularity&sort=asc&limit=10"

GET /v1/anilist/anime

Searches anime from AniList

Parameters:

  • isAdult: Boolean
  • search: String
  • format: [MediaFormat]
  • status: MediaStatus
  • countryOfOrigin: CountryCode
  • season: MediaSeason
  • seasonYear: Int
  • year: String
  • onList: Boolean
  • yearLesser: FuzzyDateInt
  • yearGreater: FuzzyDateInt
  • averageScoreGreater: Int
  • averageScoreLesser: Int
  • genres: [String]
  • excludedGenres: [String]
  • tags: [String]
  • excludedTags: [String]
  • minimumTagRank: Int
  • sort: [MediaSort]
  • limit: Int
  • allowDuplicates: Boolean
  • mergeSeasons: Boolean

Example request:

# fetch the top 20, non-adult trending anime that are either TV or ONA and are made in Japan after 2020
curl "http://localhost:3333/v1/anilist/anime?format=TV,ONA&sort=TRENDING_DESC&isAdult=false&countryOfOrigin=JP&yearGreater=20200000&limit=20"

Environment

One configuration environment variable is supported:

  • ALWAYS_SKIP_TVDB_IDS: Comma-separated list of TVDB IDs to always skip. These do not count towards the return limit.

Docker Compose

services:
  sonarr-anime-importer:
    image: gabehf/sonarr-anime-importer:latest
    container_name: sonarr-anime-importer
    ports:
      - 3333:3333
    environment:
      - ALWAYS_SKIP_TVDB_IDS=12345,67890 # Comma-separated
    restart: unless-stopped

Albums that fueled development

Album Artist
Kill la Kill OST Various Artists
Your Name OST RADWIMPS
Kessoku Band Kessoku Band
Oidaki Tota

it only seems right i listen to anime music while i work on this