nas-tools is an automatic tool for collecting and organizing NAS media library resources.
Features:
The original intention of this software is to realize the automatic management of film and television resources, release your hands and focus on watching movies. A good network environment and a private site are required to obtain a better user experience.
1. Resource retrieval and subscription
- Site RSS aggregation, subscribe to what you want to see, and resources will be updated automatically in real time.
- Aggregate resource search and download through WeChat, Telegram, Slack or WEB interface, one-click search or subscription of the latest popular resources.
- Linked with Douban, mark in Douban that you want to watch the background to automatically retrieve and download, and automatically join the subscription if it is not yet released.
2. Organize the media library
- Monitor the downloading software, automatically identify the real name after the download is complete, hard link to the media library and rename it.
- Monitor the directory, and automatically identify the hard link of the media information to the media library when the file changes and rename it.
- Solve the conflict between species preservation and media library sorting, optimized for the Chinese environment, support domestic dramas and animations, high renaming accuracy, 100% searchable on Emby/Jellyfin/Plex after renaming.
3. Site maintenance
- Comprehensive site statistics, real-time monitoring of your site traffic.
- Fully automated hosting station, support remote downloader.
- The site automatically logs in the security number every day.
4. Message service
- Support ServerChan, WeChat, Slack, Telegram, Bark, PushPlus, Aiyu Feifei and other graphic message notifications
- Support remote control subscription and download via WeChat, Telegram, Slack.
- Emby/Jellyfin/Plex playback status notification.
Install
1. Docker
docker pull jxxghp/nas-tools:latest
see tutorial here if you cannot connect to Github, be careful not to enable the automatic update switch (NASTOOL_AUTO_UPDATE=false).
2. Local operation
Python3 version, if you find that there is a missing dependency package, you need to install it additionally
git clone -b master https://github.com/jxxghp/nas-tools --recurse-submodule
python3 -m pip install -r requirements.txt
export NASTOOL_CONFIG="/xxx/config/config.yaml"
nohup python3 run.py &
3. Windows
Download the exe file, double-click to run it, and the configuration file directory will be automatically generated
https://github.com/jxxghp/nas-tools/releases
4. Synology Suite
Add Mining God Synology SPK package source to install directly:
configuration
1. Apply for the relevant API KEY
2. Basic configuration
Description of file transfer mode: currently supports six modes: copy, hard link, soft link, move, RCLONE, MINIO.
In the copy mode, there are two copies of downloading seeding and media library, which takes up more storage (the size of the download disk determines how many kinds can be saved), and the advantage is that the disk of the media library can be dormant without running 24 hours;
The hard link mode does not require additional storage space, one file has two directories, but the download directory and the media library directory need to be in the same disk partition or storage space; the soft link mode is a shortcut, and the path in the container needs to be consistent with the real path for normal use ;
The move mode will move and delete the original files and directories;
RCLONE mode is only for RCLONE network disk usage scenarios,Note that using RCLONE mode requires mapping the rclone configuration directory to the containerrefer to the small question mark description of the setting item for details;
MINIO is only for S3/cloud native scenarios,Note that using MINIO, the media library should be set to /bucket name/category nameFor example, the name of the bucket is cloud, and the category folder of movies is called movie, then the movie path of the media library is: /cloud/movie, it is best to mount the parent collection to /cloud/movie with s3fs, and read-only is fine.
Start the program and configure: Docker uses port 3000 to start by default (Synology suite defaults to port 3003), default user password: admin/password (docker needs to refer to the tutorial to map the port, download directory, and media library directory in advance). After logging in to the management interface, modify the configuration on the WEB page according to the prompts of each configuration item in the settings and restart it to take effect (the basic settings marked with a red star must be configured, such as TMDB APIKEY, etc.), after each configuration item There is a small question mark, click it to have detailed configuration instructions, it is recommended to read.
3. Set up the media library server
Supports Emby (recommended), Jellyfin, and Plex. After setting up the media server, it can judge the weight of local resources to avoid repeated downloads, and can identify existing local resources:
- In the Webhook plug-in of Emby/Jellyfin/Plex, set the address to: http(s)://IP:PORT/emby, jellyfin, plex to receive playback notifications (optional)
- Configure Emby/Jellyfin/Plex related information to “Settings-“Media Server”
- If the default category is enabled, the media library needs to be set up according to the following directory structure; if it is a custom category, please create a media library directory according to your own definition. For category definitions, please refer to the default-category.yaml category configuration file template. Note that when the secondary classification is enabled, the media library needs to set the directory to the secondary classification subdirectory (multiple subdirectories can be added to one media library, or one subdirectory can be set to one media library), otherwise the media library management software may not be able to Normal search identification.
Movie
Featured Chinese Films Foreign Language Films Animated Films
TV series
Domestic Dramas European and American Dramas Japanese and Korean Dramas Anime Documentaries Variety Shows Children
4. Configure the downloader and download directory
Support qbittorrent (recommended), transmission, aria2, 115 network disk, etc., set the download directory with the button in the upper right corner.
5. Configure the synchronization directory
- Directory synchronization can monitor multiple scattered folders. When there are new media files in the folder, it will automatically identify and rename them, and transfer them to the media library directory or the specified directory according to the configured transfer method.
- If the download directory of the downloaded software is also included in the scope of directory synchronization, it is recommended to disable the download software monitoring function, otherwise it will trigger repeated processing.
5. Configure WeChat/Slack/Telegram remote control
After configuring the WeChat, Slack or Telegram robot, you can directly send the name through the WeChat/Slack/Telegram robot to realize automatic retrieval and download, and control the operation of the program through the menu.
- WeChat message push and callback
Due to official WeChat restrictions, corporate WeChat applications created after June 20, 2022 must have a fixed public IP address and be added to the IP whitelist before they can receive messages. Using a proxy server with a fixed public IP to forward can solve this problem
如使用nginx搭建代理服务,需在配置中增加以下代理配置:
```
location /cgi-bin/gettoken {
proxy_pass https://qyapi.weixin.qq.com;
}
location /cgi-bin/message/send {
proxy_pass https://qyapi.weixin.qq.com;
}
```
如使用Caddy搭建代理服务,需在配置中增加以下代理配置(`{upstream_hostport}` 部分不是变量,不要改,原封不动复制粘贴过去即可)。
```
reverse_proxy https://qyapi.weixin.qq.com {
header_up Host {upstream_hostport}
}
```
注意:代理服务器仅适用于在微信中接收工具推送的消息,消息回调与代理服务器无关。
Configure WeChat message receiving service On the enterprise WeChat self-built application management page – “API receiving message” to enable the message receiving service:
Generate Token and EncodingAESKey on the WeChat page, and fill in the corresponding input items in NASTool Settings->Message Notification->WeChat and save it.
Restart NASTool.
Fill in the URL of the WeChat page address: http(s)://IP:PORT/wechat, click OK to authenticate.
Configure WeChat menu control to run through the menu remote control tool, inhttps://work.weixin.qq.com/wework_admin/frame#apps The application custom menu page maintains the menu as shown in the figure below. The content of the menu is to send a message, and the content of the message is optional.
The order of the first level menu and the first few submenus under the first level menu need to be exactly the sameyou can add other secondary menu items after the sample items that match the screenshots.
- Telegram Bot robot
- Set the external network access address of this program in the NASTool settings, and decide whether to enable the Telegram Webhook switch according to the actual network situation.
Note: WebHook is limited by Telegram. The program running port needs to be set to one of the following ports: 443, 80, 88, 8443, and an Https certificate authenticated by the Internet is required.
- In the Telegram BotFather robot, maintain the bot command menu (to be selected) according to the table below, select the menu or enter the command to run the corresponding service, and enter other content to start the aggregation search.
- Slack
Correspondence between commands and functions
Order | Features |
---|---|
/rss | RSS feed |
/ptt | download file transfer |
/ptr | delete seed |
/pts | site sign in |
/rst | directory synchronization |
/db | watercress want to see |
6. Configure the indexer
Configure the indexer to support searching site resources:
- The tool’s built-in indexer currently supports most mainstream PT sites and some public sites. It is recommended to enable the built-in indexer.
- At the same time, Jackett/Prowlarr is supported. It is necessary to build additional corresponding services and obtain information such as API Key and address, and configure them in Settings->Indexer->Jackett/Prowlarr.
7. Configure the site
The functions of this tool, such as movie and TV series subscription, resource search, site data statistics, streaming, automatic sign-in, etc., all depend on the correct configuration of site information, and it is necessary to maintain the site RSS links and cookies in “Site Management->Site Maintenance”.
When generating the site RSS link, please try to select the category of film and television resources, and check the subtitle.
8. Organize stock media resources
If the directory where your stock resources are located is the same as the source path and destination path configured in your directory synchronization, you can trigger full synchronization through the “Directory Synchronization” button on WEBUI or WeChat/Telegram.
If they are not the same, you can follow the instructions below to manually enter the command to organize the media resources in a specific directory:
Note: The -d parameter is optional, if not entered, it will automatically distinguish movies/tv series/anime and store them in the corresponding media library directory; if the -d parameter is entered, it will be transferred to the -d directory regardless of the type.
- Docker version, run the following command on the host machine, change nas-tools to your docker name, and modify the source directory and destination directory parameters.
docker exec -it nas-tools sh python3 -m pip install -r third_party.txt python3 /nas-tools/app/filetransfer.py -m link -s /from/path -d /to/path
- Synology suite version, ssh to the background to run the following command, and also modify the configuration file path, source directory, and destination directory parameters.
/var/packages/py3k/target/usr/local/bin/python3 -m pip install -r /var/packages/nastool/target/third_party.txt export NASTOOL_CONFIG=/var/packages/nastool/target/config/config.yaml /var/packages/py3k/target/usr/local/bin/python3 /var/packages/nastool/target/app/filetransfer.py -m link -s /from/path -d /to/path
- To run directly locally, cd to the root directory of the program, execute the following commands, and modify the parameters of the configuration file, source directory, and destination directory.
python3 -m pip install -r third_party.txt export NASTOOL_CONFIG=config/config.yaml python3 app/filetransfer.py -m link -s /from/path -d /to/path
thank you
#jxxghpnastools #Homepage #Documentation #Download #NAS #Media #Library #Resource #Collection #News Fast Delivery