Forked from AniDB Thanks for Anidb team for publishing the source of this java applet.
Big thanks to @runecalico for testing and providing feedback.
This Version replaces the GUI with a CLI only version. Old Versions still support GUI, see Tag v1.1.1
The following cli commands are available (check designated command help --help
for more information):
tags
: Test your tag system with example dataconfig save
: Convert old config file to new format (or generate a new default config by specifying --default)anidb scan
: Scan given folder for anime, optionally adding them to your mylist and moving the files). Shuts down after scan.anidb watch
: Watch given folder for new anime, optionally adding them to your mylist and moving the files. Will keep running until stopped.anidb connect-to-kodi
: Connect to Kodi and mark episodes as watched in your mylist after watching them.anidb watch-and-kodi
: Combinewatch
andconnect-to-kodi
commands.
This version is meant to be used on headless system (like your NAS) and still have the flexibility and useability of the official applet.
I suggest using a the watch command to monitor your download folder and automatically add new anime to your mylist and move them to your anime folder.
- Install compatible Java (21 or higher, 8 or higher for v1.1.1 or lower)
- Generate config file
- new config
java --enable-preview -jar AniAddCli.jar config save config.conf --default
- from old config
java --enable-preview -jar AniAddCli.jar config save config.conf -c oldconfig.conf
- new config
- Edit configuration file with the editor of your choice, if you use the tagging system to move just replace it with your system
- run AniAddCli to scan and move your files
- scan once:
java --enable-preview -jar AniAddCli.jar -u username -p password -anidb -c config.conf scan /path/to/your/anime/folder
- watch folder:
java --enable-preview -jar AniAddCli.jar -u username -p password -anidb -c config.conf watch /path/to/your/anime/folder
- scan once:
- (optional) run AniAddCli to connect to Kodi and mark episodes as watched in your mylist after watching them
Make sure to enable remote access to JSON-RPC in your Kodi settings
java --enable-preview -jar AniAddCli.jar -u username -p password -anidb -c config.conf connect-to-kodi --kodi-url <your-kodi-ip>
.
There is a docker image available : https://hub.docker.com/r/tyderion/aniadd-cli
mounts:
/shows
: Folder to move the files of anime shows into (configurable in your settings file)/movies
: Folder to move the files of anime movies into (configurable in your settings file)
Env:
ANIDB_USERNAME
[required]: your usernameANIDB_PASSWORD
[required]: your password eANIDB_CONF
[required]: path to your config file, example, needs a corresponding mounted location of course :)LOG_CONFIG_FILE
: Path to a properties file for logging sample. Will be used to update logging configuration and set log levels. Defaults to the linked file.
entrypoint: /app/scan.sh
(default command of docker image)
entrypoint: /app/watch.sh
Runs either scan
or watch
command.
/from
: Folder containing video files to parse and handle [required], configurable via env varSCAN_FOLDER
/unknown
: Folder to move files into that anidb does not know [optional, defaults to /unknown], configurable in your settings file/duplicates
: Folder to move duplicate files to (alternatively those can be deleted, configurable in your settings file)
SCAN_FOLDER
[optional, defaults to/from
]: the folder to scan for new anime
entrypoint: /app/kodi.sh
Runs the connect-to-kodi
command.
KODI_HOST
[required]: the ip/hostname of your kodi instanceKODI_PORT
[optional, default=9090]: the websocket port of your kodi instance
entrypoint: /app/watch-and-kodi.sh
Runs the watch-and-kodi
command which combines watch
and connect-to-kodi
.
entrypoint: /app/noop.sh
Keeps container alive, so you can connect a shell and run commands manually.
entrypoint: /app/run.sh
Enables you to run any command you want by specifying it in an env variable.
COMMAND
[required]: the command to run (see above), any required args must be set
I recommend to use IntelliJ (Community Edition is enough) to develop this project. Be sure to install the Lombok Plugin and enable annotation processing in the settings. It currently only works with Java 21, higher/lower does not work due to the usage of template strings