OneKuma

OneKuma's Blog

One Lonely Kuma.
github
bilibili
twitter

Tinkering with Aliyun Pan + AList + Rclone + AnimePaste

AnimePaste Refactoring Plan:

  • Delete the original upload to OSS, only keep the file directory, and synchronize the work to various WebDAV;
  • Delete the original handcrafted media library and better compatibility with media library software such as Jellyfin.

Therefore, this article pre-researches and tries the WebDAV synchronization solution and makes some records for easy reproduction later.

Local#

AList#

Use AList to manage various cloud drives and expose them in the form of WebDAV.

Being lazy, I directly downloaded its desktop version. In its Web UI, I mounted Aliyun Drive to the directory /alidriver of AList.

Rclone#

Configuration file rclone config file.

[alist]
type = webdav
url = http://127.0.0.1:5244/dav/
user = admin
pass = xxxyyyzzz

Mount the folder /alidriver/anime in the Aliyun Drive mount point of AList to the local directory D:\.mount\anime and the cache directory D:\.cache\rclone. Configure the mount to start automatically in the background on startup, see Configuring rclone to Start Automatically on Windows.

# mount-anime.ps1

rclone mount alist:/alidriver/anime "D:\.mount\anime" `
  --header "Referer:https://www.aliyundrive.com/" `
  --vfs-cache-mode full --vfs-read-chunk-size-limit 1G --vfs-read-chunk-size 512M `
  --cache-dir "D:\.cache\rclone" --dir-cache-time 1m --buffer-size 128M

Password has been hidden.

AnimePaste#

See AnimePaste, modify the local directory in the configuration file to D:\.mount\anime.

Server#

aliyundrive-webdav#

This solution has been deprecated in the actual environment and replaced with deploying AList, see Deploying Jellyfin with WebDAV on a Server.
This solution is only used for initial idea verification.

Use aliyundrive-webdav to expose Aliyun Drive as WebDAV on the server and forward file read requests to Aliyun Drive without going through the server's bandwidth.

#!/usr/bin/bash

docker stop aliyundrive-webdav > /dev/null
docker rm aliyundrive-webdav > /dev/null

docker run -d --name=aliyundrive-webdav --restart=unless-stopped -p 8080:8080 \
  -v /etc/aliyundrive-webdav/:/etc/aliyundrive-webdav/ \
  -e REFRESH_TOKEN='ooooooooo' \
  -e WEBDAV_AUTH_USER=aaabbbccc \
  -e WEBDAV_AUTH_PASSWORD=xxxyyyzzz \
  messense/aliyundrive-webdav /usr/bin/aliyundrive-webdav --auto-index --workdir /etc/aliyundrive-webdav --redirect

Password has been hidden.

Finally#

  • Use AnimePaste to automatically download new anime locally
  • AList and Rclone synchronize files to Aliyun Drive
  • Use aliyundrive-webdav on the server to expose it to the public network.
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.