Automatic follow-up plan | AutoBangumi

Original link: https://www.himiku.com/archives/auto-bangumi.html

“Automatically” is actually not very attractive to me. From the current point of view, there are not many dramas that can be followed, and there is not much motivation to follow. If you want to watch something occasionally, the built-in RSS tool of ” qBittorrent ” is fully capable. Find a good RSS subscription link, and you can easily achieve my automated download needs with a simple operation.

However, idleness is idleness, it is better to find something to do.

AutoBangumi

AutoBangumi ” is a fully automatic fan drama download & organize tool based on ” Mikan Project ” and ” qBittorrent “.

How it works is very simple:

  • “AutoBangumi” compiles the RSS content provided by “Mikan Project” into appropriate RSS rules and imports it into the RSS reader of “qBittorrent”;
  • “qBittorrent” is responsible for tracking RSS information and downloading;
  • After the download is complete, the built-in renaming toolset of “AutoBangumi” will automatically rename the fan drama to the format of “fan drama name EXX”, such as “SPYxFAMILY E01.mp4”;
  • The renamed file complies with Jellyfin/Emby/Plex TV episode naming standards and can be directly identified for episode information.

Simply put, the process of using AutoBangumi to automate the follow-up process is as follows:

注册蜜柑账号→ 订阅番剧→ 获取RSS链接→ 部署AutoBangumi&qBittorrent → 下载番剧→ 等待番剧元数据获取完毕→ 追番

Tangerine Project

About the “Tangerine Project”

“Mikan Project” is a BT resource integration website for fan dramas. Different from traditional torrent sites, its main feature is to integrate the existing subtitle group resources of a certain drama, and classify it according to the broadcast time of the drama for quick indexing.

But in essence, it’s just a BT website with a nicer interface.

Register an account

Since “AutoBangumi” mainly relies on the subscription service of “Mikan Plan”, you need to register an account first.

Registration address: https://mikanani.me/Account/Register

Turn on premium subscription

In order to be able to choose simplified or traditional subtitles when subscribing to fan dramas, you need to enable the ” Premium Subscription ” function of the “Mikan Plan” first. This feature is mostly ignored. Who can notice that the button is in the account settings!

Click on “Account Settings”

Enable “Premium Subscription”

You can call up the subtitle option when subscribing to the show.

Subscribe to the drama

Since AutoBangumi parses all the RSS feeds it gets, be extra careful when subscribing to fan dramas. If you are not careful, the hard disk will be at risk of being burst.

There are two ways to subscribe to fan dramas: “Subscribe to all subtitle groups” and “Subscribe to a single subtitle group”.

  • Click the subscribe button in the lower right corner of the cover of the fan drama to subscribe to the source of all subtitle groups in the fan drama. You can see that all subtitle groups in the demo are subscribed (the hard disk is in danger of life)

If blurred, click to enlarge If blurred, click to enlarge

  • Click on the cover of the fan drama, call out the secondary menu, select a subtitle group, click “Subscribe”, (only if “Advanced Subscription” is enabled) call out the third-level menu, select the desired “Subscription language”, and subscribe to a single subtitle of the subtitle group source (hard drive is not life-threatening)

If blurred, click to enlarge If blurred, click to enlarge

  • Most subtitle groups will provide simplified and traditional subtitles, and some conscience subtitle groups will even provide subtitles in both simplified and Japanese & traditional Japanese. Then, if you want to filter for clarity, the “Mikan Project” is not enough. The filter value needs to be set when AutoBangumi is installed later.

Get RSS address

After subscribing to the fan drama, in the lower right corner of the “My Subtitle Group Subscription Update” category, copy the link in the icon next to “RSS Subscription”.

The link format for RSS subscription is: https://mikanani.me/RSS/MyBangumi?token=xxx%3d%3d

Deploy AutoBangumi

According to the official instructions, it is recommended to use Docker to run AutoBangumi in a NAS or Linux server .

The following tutorials are based on the premise that AutoBangumi / qBittorrent has never been installed.

Deploy on Linux

Install Docker

If you have installed docker, delete it first:

 sudo apt-get remove docker docker-engine docker.io containerd runc

Install dependencies:

 sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common

The installation steps vary depending on the Linux distribution. The following takes Debian as an example. For Ubuntu, please refer to ” Tsinghua University Open Source Software Mirror Site – Docker Community Edition Image Usage Help “.

Install the GPG public key that trusts Docker:

 curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Add software repository:

 sudo add-apt-repository \ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian \ $(lsb_release -cs) \ stable"

Install docker-ce :

 sudo apt-get update sudo apt-get install docker-ce

Test if Docker is installed:

 docker run --rm hello-world

Output the following, then Docker has been successfully installed

 Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 2db29710123e: Pull complete Digest: sha256:80f31da1ac7b312ba29d65080fddf797dd76acfb870e677f390d5acba9741b17 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/

Install Docker Compose

Docker Compose makes it easy to manage multiple Docker containers. It is recommended to install Compose V2 here. The command is changed from docker-compose to docker compose , which is basically the same as the original command. Lose one less - , Gospel for lazy people.

 sudo apt-get update sudo apt-get install docker-compose-plugin

Test that Docker Compose is installed:

 docker compose version

Output the following, then Docker Compose has been successfully installed

 Docker Compose version v2.3.3

Install qBittorrent & AutoBangumi

Create AutoBangumi folder, create the docker-compose.yml file in it, and fill in the following:

 version: "3.9" services: qBittorrent: image: johngong/qbittorrent:latest container_name: qBittorrent ports: - 8989:8989 environment: - PUID=0 - PGID=0 - QB_WEBUI_PORT=8989 volumes: - ./qb/config:/config - ./Downloads:/Downloads networks: - auto_bangumi restart: unless-stopped AutoBangumi: image: estrellaxd/auto_bangumi:latest container_name: AutoBangumi environment: - TZ=Asia/Shanghai - AB_DOWNLOADER_HOST=ip:8989 - AB_DOWNLOADER_USERNAME=admin - AB_DOWNLOADER_PASSWORD=adminadmin - AB_INTERVAL_TIME=1800 - AB_METHOD=pn - AB_GROUP_TAG=True - AB_NOT_CONTAIN=720|繁体|CHT|JPTC|繁日- AB_DOWNLOAD_PATH=/Downloads - AB_RSS=填入你的RSS订阅链接- AB_DEBUG_MODE=True - AB_EP_COMPLETE=False - AB_SEASON_ONE=True networks: - auto_bangumi restart: unless-stopped networks: auto_bangumi:

The basic commands for Docker Compose are as follows:

Start the container:

 docker compose up -d

Stop the container:

 docker compose down

Update the container:

 docker compose pull

It should be noted that using the docker compose command needs to be done in the folder where docker-compose.yml is stored.

If everything went well (creating RSS rules, renaming files), enter the command docker logs AutoBangumi and you should have the following log output:

 docker logs AutoBangumi 2022-06-12 22:04:05 INFO: _ ____ _ 2022-06-12 22:04:05 INFO: /\ | | | _ \ (_) 2022-06-12 22:04:05 INFO: / \ _ _| |_ ___ | |_) | __ _ _ __ __ _ _ _ _ __ ___ _ 2022-06-12 22:04:05 INFO: / /\ \| | | | __/ _ \| _ < / _` | '_ \ / _` | | | | '_ ` _ \| | 2022-06-12 22:04:05 INFO: / ____ \ |_| | || (_) | |_) | (_| | | | | (_| | |_| | | | | | | | 2022-06-12 22:04:05 INFO: /_/ \_\__,_|\__\___/|____/ \__,_|_| |_|\__, |\__,_|_| |_| |_|_| 2022-06-12 22:04:05 INFO: __/ | 2022-06-12 22:04:05 INFO: |___/ 2022-06-12 22:04:05 INFO: Version 2.4.11 Author: EstrellaXD Twitter: https://twitter.com/Estrella_Pan 2022-06-12 22:04:05 INFO: GitHub: https://github.com/EstrellaXD/Auto_Bangumi/ 2022-06-12 22:04:05 INFO: Starting AutoBangumi... 2022-06-12 22:04:09 INFO: Add RSS Feed successfully. 2022-06-12 22:04:09 INFO: Rebuilding data information... 2022-06-12 22:04:11 INFO: Adding 辉夜大小姐想让我告白究极浪漫Season 1 2022-06-12 22:04:11 INFO: Adding Summer Time Rendering Season 1 2022-06-12 22:04:11 INFO: Adding SPYxFAMILY Season 1 2022-06-12 22:04:11 INFO: Adding Deaimon Season 1 2022-06-12 22:04:11 INFO: Adding Kawaii dake ja Nai Shikimori-san Season 1 2022-06-12 22:04:11 INFO: Start adding rules. 2022-06-12 22:04:11 INFO: Finished. 2022-06-12 22:04:11 INFO: Waiting for downloading torrents... 2022-06-12 22:14:11 INFO: Finished checking 5 files' name. 2022-06-12 22:14:11 INFO: Renamed 0 files. 2022-06-12 22:14:11 INFO: Finished rename process.

Install Emby (optional)

Add the following under the above docker-compose.yml :

 emby: image: lovechen/embyserver:latest container_name: emby # network_mode: host ports: - 8096:8096 - 8920:8920 - 1900:1900/udp - 7359:7359/udp environment: - PUID=0 - PGID=0 - GIDLIST=0 - TZ=Asia/Shanghai - HTTP_PROXY="http://你的代理IP:端口/" - HTTPS_PROXY="http://你的代理IP:端口/" devices: - /dev/dri:/dev/dri volumes: - ./emby:/config - ./Downloads:/media/Bangumi networks: - auto_bangumi restart: unless-stopped

Configuration instructions

The description of the above configuration is as follows:

  • qBittorrent chooses the version ” qBittorrent-qBittorrentEE ” made by ” johngong ” that integrates qBittorrent EE . I personally recommend installing this version of qBittorrent for the best experience.
  • By default, the port of qBittorrent’s WEBUI is exposed. If you have custom requirements, you need to change the port settings in ports and environment at the same time. If you want to change to 1234 , then you need to modify the above configuration to:
 ports: - 1234:1234 environment: - QB_WEBUI_PORT=1234
  • AB_DOWNLOADER_HOST in AB_DOWNLOADER_HOST needs to fill in the webui link of qBittorrent. Since AutoBangumi has strict network requirements for connecting to qBittorrent, it is recommended to fill in the ip address of the server instead of localhost or 127.0.0.1 .
  • AB_DOWNLOADER_USERNAME is the webui username of qBittorrent, the default is admin ; AB_DOWNLOADER_PASSWORD is the webui password of qBittorrent, the default is adminadmin . If there is a need to change the qBittorrent username and password, be sure to modify the AutoBangumi settings at the same time after modification.
  • AB_NOT_CONTAIN is an option to set qBittorrent subscription rules, which supports the use of regular expressions. Regular I don’t either, but | means “and”. If the premium subscription is not enabled in the Mikan plan, AB_NOT_CONTAIN=720|繁体|CHT|JPTC|繁日in the configuration can basically kill most traditional subtitles.
  • AB_RSS needs to fill in your own RSS subscription link. like:

     AB_RSS=https://mikanani.me/RSS/MyBangumi?token=xxx%3d%3d
  • AB_DOWNLOAD_PATH needs to fill in the path in qBittorrent, such as /Downloads or /Downloads/Bangumi

For more configuration instructions, please refer to the ” Parameter Description ” section below.

Deploy on NAS

The following takes the Synology DSM 7.1-42661 Update 1 system as an example to introduce the specific steps to install AutoBangumi using the Docker kit.

Install the Docker suite

Search for “Docker” in Package Center and install it.

Open the installed Docker application, click “Registry” – “Settings”

Select the currently enabled “Docker hub” repository and edit it. Check “Enable Registry Mirror”, and fill in Tencent Cloud’s Docker hub accelerated mirror in “Registry mirror URL” to speed up the download speed of the mirror.

 https://mirror.ccs.tencentyun.com

After saving, restart the Docker application as prompted.

Install qBittorrent

Search “johngong/qbittorrent” in “Registry” to download the latest version.

After the image is downloaded, double-click the image to install it.

Select “bridge” for network settings

Rename the container name, such as “qb”, check “Enable automatic restart”, and then click “Advanced Settings”

According to ” Parameter Description of qBittorrent “, if you want to customize the port, you need to modify the value of QB_WEBUI_PORT here

Others can be left as default.

The port can only reserve one 8989 and expose the webui.

In the storage space setting, be sure to mount the config folder into the NAS.

Then enable it.

Install AutoBangumi

The installation steps are basically the same as those for installing qBittorrent in the previous section.

Search “estrelaxd/auto_bangumi” in “Registry” to download the latest version.

Enabled after the download is complete. Select “bridge” for network settings, check “Enable automatic restart”, and then click “Advanced settings”.

Click the Add button and fill in the following new variables in sequence:

variable value
AB_DOWNLOADER_HOST 192.168.31.123:8989
AB_DOWNLOADER_USERNAME admin
AB_DOWNLOADER_PASSWORD adminadmin
AB_INTERVAL_TIME 1800
AB_METHOD pn
AB_GROUP_TAG True
AB_NOT_CONTAIN 720
AB_DOWNLOAD_PATH /Downloads
AB_RSS Fill in your RSS feed link
AB_DEBUG_MODE True
AB_EP_COMPLETE false
AB_SEASON_ONE True

Please choose according to your needs. For a description of the variables, please refer to the ” Configuration Description ” section above.

No need to set storage space, just enable it directly.

If all goes well, select the AutoBangumi container and click Details.

Click “Log”, the following log output should be displayed:

Effect

Off topic

Be careful to open the AB_EP_COMPLETE historical drama download function, otherwise it will be like this:

Which then results in this:

The webui that comes with qBittorrent is not good-looking and can be replaced with ” qb-web ” (as shown above). The functions provided are functional and intuitive and easy to operate.

Parameter Description

AutoBangumi

environment variable effect parameter
TZ Time zone Asia/Shanghai
AB_INTERVAL_TIME Intervals 1800
AB_DOWNLOADER_HOST qBittorrent address and port number localhost:8080
AB_DOWNLOADER_USERNAME qBittorrent username admin
AB_DOWNLOADER_PASSWORD Password for qBittorrent adminadmin
AB_METHOD Renaming method normal retains subtitle group information, pn is pure mode pn
AB_GROUP_TAG Whether to add group name to download rules False
AB_DOWNLOAD_PATH Download path in qBittorrent Required fields
AB_RSS RSS feed address Required fields
AB_NOT_CONTAIN Enter the element you want to filter 720
AB_DEBUG_MODE debug mode False
AB_EP_COMPLETE Download historical dramas False
AB_SEASON_ONE After opening, if there is no Season information, it will be automatically added as S01 True
AB_REMOVE_BAD_BT When encountering a collection that cannot be renamed, etc., automatically delete the torrent False

qBittorrent

See Docker Hub for details

parameter illustrate
--name=qbittorrent container name
-p 8989:8989 Web access port IP: 8989 ; (default username: admin; default password: adminadmin); This port must be consistent with the container port and environment variables, otherwise it cannot be accessed
-p 6881:6881 BT download listening port
-p 6881:6881/udp BT download DHT listening port
-v /配置文件位置:/config qBittorrent configuration file location
-v /下载位置:/Downloads qBittorrent download location
-e UID=1000 uid setting, the default is 1000
-e GID=1000 gid setting, the default is 1000
-e UMASK=022 umask setting, the default is 022
-e TZ=Asia/Shanghai System time zone setting, the default is Asia/Shanghai
-e QB_WEBUI_PORT=8989 web access port environment variable
-e QB_EE_BIN=false (true/false) Set to use qBittorrent-EE, not used by default
-e QB_TRACKERS_UPDATE_AUTO=true (true/false) Automatically update qBittorrent trackers, enabled by default
-e QB_TRACKERS_LIST_URL= trackers update address settings, only support ngosang format, the default is https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt

refer to

This article is reprinted from: https://www.himiku.com/archives/auto-bangumi.html
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment