This script will hash your downloaded Anime from SABnzbd+ or NZBGet and sync it with your anidb.net account. The file will be renamed and moved to your specified target-directory.
To use the script, extract the zip into your sabnzbd script folder and select sabtoanidb.py as your post processing script in your anime category.
First, rename anime.cfg.default to anime.cfg
You have to enter your anidb username and password into the config file. Also you have to modify the target directory in the config file to tell the script, where your anime folder is. (the script will copy the files to a directory with the name of the anime in that folder.)
config field | description |
---|---|
username | your anidb.net username |
password | your anidb.net password |
suffix | only files with these suffix will be processed |
directory | target directory to copy your files to (every anime will get its own sub directory) |
directorymovie | target directory to copy non-tvdb movies (every anime movie will get its own sub directory) |
config field | description |
---|---|
host | hostname or ip for plex media server (if this is empty, plex update is disabled) |
sections | which section of your plex media server should be updated (if more than one, separate by comma)? if this is empty, all sections will be updated |
config field | description |
---|---|
host | hostname or ip for xbmc (if this is empty, xbmc update is disabled) |
port | port of your xbmc |
user | username for xbmc |
password | password for xbmc |
path | library path for updating only the added anime (leave empty to force update of whole library). If more than one episode is added, the whole library will be scanned. |
config field | description |
---|---|
tvformat | rename pattern for tv shows (see below for tags) |
movieformat | rename pattern for movies (see below for tags) |
ovaformat | rename pattern for ova (see below for tags) |
foldername | naming pattern for anime-subfolder (only used when moving file) |
foldernamemovie | naming pattern for anime movie subfolder (only used when moving file) |
TVDBEpisodeFormat | rename pattern for Episodes, when using TVDB (see below for tags) |
TVDBFolderName | rename pattern for Folder, when using TVDB (see below for tags) |
TVDBSeasonFolder | rename pattern for Season Folder, when using TVDB (see below for tags) |
TVDBSpecialsFolder | rename pattern for Specials Folder, when using TVDB (see below for tags) |
config field | help |
---|---|
nzbtoanidb_switches | defines, what nzbToAnidb.py should do (see below for anidb.py switches) |
Note: If you use the delete option to delete the sourcefolder after moving, external sub-files will be lost!
%ATr%: Anime Name (Romaji)
%ATe%: Anime Name (English)
%ATk%: Anime Name (Kanji)
%ETr%: Episode title (romaji)
%ETe%: Episode title (english)
%ETk%: Episode title (kanji)
%GTs%: Group Name (short)
%GTl%: Group Name (long)
%EpHiNo%: Highest (subbed) episode number
%EpCount%: Anime Episode count
%AYearBegin%: The beginning year of the anime
%AYearEnd%: The ending year of the anime
%EpNo%: File's Episode number
%Type%: Anime type, Value: Movie, TV, OVA, Web
%Depr%: File is deprecated if the value is '1'
%Cen%: File is censored if the value is '1'
%Ver%: File version
%Source%: Where the file came from (HDTV, DTV, WWW, etc)
%Quality%: How good the quality of the file is (Very Good, Good, Eye Cancer)
%CurrentFN%: Current Filename
%FCrc% : The file's crc
%FCRC%: The file's crc in upper letters
%FVideoRes%: Video Resolution (e.g. 1920x1080)
%FALng%: List of available audio languages
%FSLng%: List of available subtitle languages
%FACodec%: Codecs used for the Audiostreams
%FVCodec%: Codecs used for the Videostreams
%suf%: File Suffix
Only for TVDB:
%TSTe%: TVDB Anime name
%TETe%: TVDB episode title
%TS%: TVDB Season
%TE%: TVDB Episode Number
%TSE%: TVDB Season/Episode Combination (like S01E12)
Options:
-h, --help show this help message and exit
-u USERNAME, --username=USERNAME
AniDB username.
-p PASSWORD, --password=PASSWORD
AniDB password.
-r, --recursive Recurse into directories.
-s SUFFIX, --suffix=SUFFIX
File suffix for recursive matching.
-c, --no-cache Do not use cached values.
-t, --tvdb Use TVDB
-l, --multihash Calculate additional checksums.
-i, --identify Identify files.
-a, --add Add files to mylist.
-w, --watched Mark files watched.
-n, --rename Rename files.
-m, --move Move Files
-x, --delete Delete Folders after moving files
-d DIRECTORY, --directory=DIRECTORY
Target parent directory.
-k DIRECTORY, --directory-movie=DIRECTORY
Target parent directory for anime movies.
-o, --no-color Disable color output.
-y, --update Refresh Media Server (Plex or XBMC)