่ฝป้็บงใ่ทจๅนณๅฐๅฝไปค่กๅทฅๅ ท๏ผไธไธบๅจๆผซๆถ่่ ๆน้ๆด็่ง้ขๆไปถ๏ผๆฏๆ็กฌ้พๆฅๆจกๅผๅฎ็ฐ้ถ้ขๅค็ฉบ้ดๅ ็จใ
anime-organizer๏ผ็ฎ็งฐ aniorg๏ผๆฏไธๆฌพไธไธบๅจๆผซๆถ่่ ่ฎพ่ฎก็ๅฝไปค่กๅทฅๅ ท๏ผๆจๅจ่ชๅจๅๆด็ไธ่ฝฝ็ฎๅฝไธญ็ๅจๆผซ่ง้ขๆไปถใ
ๆ ธๅฟๅ่ฝ๏ผ
- ่ชๅจ่งฃๆๆไปถๅ๏ผ่ฏๅซๅจๆผซๅ็งฐใ้ๆฐใๅๅธ็ป็ญไฟกๆฏ
- ๆฏๆ็กฌ้พๆฅๆจกๅผ๏ผๆด็ๅไธๅ ็จ้ขๅค็ฃ็็ฉบ้ด
- ่ชๅจ็ๆ Kodi ๅ ผๅฎน็ NFO ๅ ๆฐๆฎๆไปถ
- ไธ่ฝฝๅฐ้ขๆตทๆฅๅ่ๆฏๅพ
- ็ๆ MiruPlay ๅฏ็ดๆฅๅฏผๅ
ฅ็ MLIP
library.db๏ผๅนถ่กฅ้ฝ Bangumi ๅ ๆฐๆฎๅๆตทๆฅ - ๆฏๆ RSS ่ฎข้ ๅ 115 ็ฝ็ๅๆญฅ๏ผ้ๅฏ็จ clouddrive feature๏ผ
้็จๅบๆฏ๏ผ
- ๆด็ไธ่ฝฝ็ฎๅฝไธญ็ๅจๆผซๆไปถ
- ่ชๅจๅ็ฎก็ๅจๆผซๅชไฝๅบ
- ไธบ Kodi/Jellyfin/Plex ็ญๅชไฝไธญๅฟ็ๆๅ ๆฐๆฎ
- ๆบ่ฝ่งฃๆ: ่ชๅจ่ฏๅซ
[ๅๅธ็ป] ๅจๆผซๅ - ้ๆฐ [ๆ ็ญพ].extๆ ผๅผ - ็ตๆดปๆด็: ้ๆไธบ
ๅจๆผซๅ/Season N/้ๆฐ [ๆ ็ญพ].ext็ปๆ - ๅค็งๆจกๅผ: ๆฏๆ็งปๅจใๅคๅถใ็กฌ้พๆฅไธ็งๆไฝๆจกๅผ
- ๅ ๆฐๆฎๅฎๅ: ๅบไบ Bangumi ็ๆ Kodi ๅ ผๅฎน็ NFO ๆไปถ
- ๅฐ้ขไธ่ฝฝ: ไผๅ ้่ฟ Bangumi ไธ่ฝฝๆตทๆฅ๏ผTMDB ไฝไธบๅค้ๅนถ่กฅๅ ่ๆฏๅพ๏ผAniDB ไฝไธบๆ็ปๆตทๆฅๅ ๅบ
- ๅซๅๅน้
: ๆฏๆๆฌๅฐ
bangumi.dbๅซๅๅบๅ่ชๅฎไน JSON ่ฆ็๏ผ็ผบๅคฑๆถๅ้ๅฐ Bangumi ๅ็งฐ/ๆ็ดขๅน้ - RSS ่ฎข้
: ๆฏๆ RSS ่ชๅจ่ฎข้
ๅ 115 ็ฝ็ๅๆญฅ๏ผ้
clouddrivefeature๏ผ - ่ทจๅนณๅฐ: ๆฏๆ WindowsใLinuxใmacOS
- ไพฟๆบ้จ็ฝฒ: ๅคงๅคๆฐๅนณๅฐไธบๅๆไปถ๏ผWindows x64 AniFileBERT ๅๅธๅ
้่ฎฉ
DirectML.dllไธaniorg.exeไฟๆๅ็ฎๅฝ - ้ซๆง่ฝ: Rust ๅ็ๅฎ็ฐ๏ผๆ้ๅค็
ไป GitHub Releases ไธ่ฝฝๅฏนๅบๅนณๅฐ็ไบ่ฟๅถๆไปถ๏ผ
| ๅนณๅฐ | ๆไปถ |
|---|---|
| Windows x64 | aniorg-<version>-x86_64-pc-windows-msvc.zip |
| Windows ARM64 | aniorg-<version>-aarch64-pc-windows-msvc.zip |
| Linux x64 | aniorg-<version>-x86_64-unknown-linux-gnu.tar.gz |
| Linux x64 (musl) | aniorg-<version>-x86_64-unknown-linux-musl.tar.gz |
| Linux ARM64 | aniorg-<version>-aarch64-unknown-linux-gnu.tar.gz |
| macOS x64 | aniorg-<version>-x86_64-apple-darwin.tar.gz |
| macOS ARM64 | aniorg-<version>-aarch64-apple-darwin.tar.gz |
Windows x64 ๅ็ผฉๅ
ไธญ็ aniorg.exe ๅ DirectML.dll ๅบไธ่ตท่งฃๅใๅณไฝฟไฝฟ็จ CPU provider๏ผไนๅปบ่ฎฎไฟ็ๅๅธๅ
็ๅฎๆดๅ
ๅฎนใ
git clone https://github.com/ModerRAS/anime-organizer.git
cd anime-organizer
# ้ป่ฎคๆๅปบ๏ผๅฏ็จ metadata feature๏ผ
cargo build --release
# ๅ
จๅ่ฝๆๅปบ
cargo build --release --features "scraper clouddrive torrent-scraper"
# ๅฏ็จๅตๅ
ฅๅผ AniFileBERT ONNX ๆไปถๅ่งฃๆๅจ๏ผCPU๏ผ
cargo build --release --features "anifilebert"
# ๅฏ็จ AniFileBERT + Windows DirectML๏ผGPU๏ผNPU ๅฏๆพๅผ้ๆฉ๏ผ
cargo build --release --features "anifilebert-directml"็ผ่ฏๅ็ไบ่ฟๅถๆไปถไฝไบ target/release/aniorgใANIORG_BERT_PROVIDER=cpu|auto|directml-gpu|directml-npu|directml-any ๆงๅถ ONNX Runtime provider๏ผANIORG_DIRECTML_DEVICE_ID=0 ๅฏๆๅฎ DirectML ่ฎพๅคใๆชๅฏ็จ anifilebert-directml ๆถ้ป่ฎค CPU๏ผๅฏ็จๅ้ป่ฎค auto๏ผไผๅ
ๅฐ่ฏ DirectML GPU๏ผๅคฑ่ดฅๅๅ้ CPUใCPU ็บฟ็จๆฐๅฏ็จ ANIORG_ORT_INTRA_THREADS ๅ ANIORG_ORT_INTER_THREADS ่ฐๆด๏ผ้ป่ฎคๅไธบ 1ใanifilebert-amd-npu ไปๅฏ็จ๏ผๆฏ anifilebert-directml ็ๅ
ผๅฎนๅซๅ๏ผVitisAI ้่ฆ้ขๅค็ ONNX Runtime provider ๅ
๏ผๆชๆพๅ
ฅ้ป่ฎคๆๅปบใ
ๅฆๆๆฌๆบ้ป่ฎคๆฏ GNU Rust ๅทฅๅ
ท้พ๏ผWindows ไธ้ช่ฏ AniFileBERT/DirectML ๆถ่ฏทๆพๅผๆๅฎ MSVC rustcใ่ฅ ONNX Runtime ๅจๆฌๅฐ้พๆฅ้ถๆฎตๆฅ้๏ผๅฏๅฐ ORT_LIB_LOCATION ๆๅ่งฃๅๅ็ ORT ็ฎๅฝ๏ผๅนถ่ฎพ็ฝฎ ORT_PREFER_DYNAMIC_LINK=1 ๆน่ตฐ import-lib/dll ่ทฏ็บฟใ
# ็กฌ้พๆฅๆจกๅผ๏ผ้ป่ฎค๏ผ้ถ้ขๅค็ฉบ้ด๏ผ
aniorg --source="/path/to/downloads"
# ๅคๅถๆจกๅผ
aniorg --source="/path/to/downloads" --mode=copy --target="/path/to/anime"
# ๅฏ็จ็กฌ้พๆฅๅคฑ่ดฅๅ้ไธบๅคๅถ
aniorg --source="/path/to/downloads" --fallback-on-link-failure=copy
# ๅฏ็จๅๅญฃ็ฎๅฝ็ปๆ
aniorg --source="/path/to/downloads" --season-mode --target="/path/to/anime"
# ็ๆ NFO ๅๆตทๆฅ
aniorg --source="/path/to/downloads" --scrape-metadata
# ็ๆ/ๆดๆฐ็ฎๆ ็ฎๅฝๆ น้จ็ MLIP ๅชไฝๅบ็ดขๅผ
aniorg --source="/path/to/downloads" --target="/path/to/anime" --library-index
# ็ๆ MiruPlay ๅฏ็ดๆฅๅฏผๅ
ฅ็ MLIP ๅชไฝๅบ๏ผๅซ Bangumi ๅ
ๆฐๆฎๅๆตทๆฅ๏ผ
aniorg --source="/path/to/downloads" --target="/path/to/anime" --mlip
# ๅช้ๅปบๆไปถ็ดขๅผ๏ผไธ่็ฝใไธไธ่ฝฝๅพ็
aniorg --source="/path/to/empty" --target="/path/to/anime" --library-index --rebuild-library-index
# ้ๅปบ MiruPlay ๆๅๅบ๏ผๅนถ่กฅ้ฝ Bangumi ๅ
ๆฐๆฎๅ็ผบๅคฑๆตทๆฅ
aniorg --source="/path/to/empty" --target="/path/to/anime" --mlip --rebuild-library-indexๅจๅฎ้ ๆไฝๅๅ ้ข่งๅๆด๏ผ
aniorg --source="/path/to/downloads" --dry-run --verbose| ๅๆฐ | ็ผฉๅ | ็ฑปๅ | ๅฟ ๅกซ | ้ป่ฎคๅผ | ่ฏดๆ |
|---|---|---|---|---|---|
--source |
-s |
string | โ | - | ๆบ็ฎๅฝ่ทฏๅพ |
--target |
-t |
string | โ | source | ็ฎๆ ๆ น็ฎๅฝ |
--mode |
-m |
enum | โ | link | ๆไฝๆจกๅผ๏ผmove/copy/link |
--dry-run |
bool | โ | false | ไป ้ข่งไธๆง่ก | |
--include-ext |
string | โ | mp4,mkv,... | ๅค็็ๆฉๅฑๅ๏ผ้ๅทๅ้๏ผ | |
--filename-parser |
enum | โ | rules | ๆไปถๅ่งฃๆๅจ๏ผrulesใanifilebertใauto๏ผ่งๅๅคฑ่ดฅๅๅ้ AniFileBERT๏ผ |
|
--verbose |
-v |
bool | โ | false | ๆพ็คบ่ฏฆ็ปๆฅๅฟ |
--fallback-on-link-failure |
enum | โ | - | ็กฌ้พๆฅๅคฑ่ดฅๆถๅ้ๆจกๅผ๏ผmove ๆ copy๏ผ้ป่ฎคไธๅ้๏ผ | |
--season-mode / --ๅๅญฃ |
bool | โ | false | ๆ ็ชๅ/Season N/ ็ปๆๆด็ๅคๅญฃไฝๅ |
|
--scrape-metadata / --ๅฎๅ |
bool | โ | false | ๅฏ็จ Bangumi ๅ ๆฐๆฎๅฎๅ๏ผTMDB ๅฏ้่กฅๅพ๏ผ | |
--tmdb-api-key |
string | โ | - | TMDB API Key๏ผ็จไบๅค้ๆตทๆฅๅ่ๆฏๅพ | |
--alias-file |
string | โ | - | ่ชๅฎไนๅซๅ JSON ๆไปถ๏ผ่ฆ็ๆฌๅฐ bangumi.db ไธญ็ๅๅ้กน |
|
--no-images |
bool | โ | false | ่ทณ่ฟ Kodi/MLIP ๅพ็ไธ่ฝฝ๏ผไปๅๅ ฅๅฏ็จ็ๆๆฌๅ ๆฐๆฎ | |
--no-episode-metadata |
bool | โ | false | ่ทณ่ฟ Bangumi ๅ้ๆ ้ขใ็ฎไปๅๆถ้ฟๆฅ่ฏข | |
--force-overwrite |
bool | โ | false | ่ฆ็ๅทฒๆ็ NFO ๅๅพ็ๆไปถ | |
--bangumi-cache |
string | โ | ็ณป็ป็ผๅญ็ฎๅฝ | Bangumi Archive ๅ AnimeAtlas SQLite ็ผๅญ็ฎๅฝ๏ผ้ป่ฎคไธๅๅ ฅๅชไฝ target | |
--metadata-source |
string | โ | - | ๆๅฎๆฌๅฐ subject.jsonlines ๆๅ
ถ็ฎๅฝ๏ผๆพๅผๆๅฎๅไฟๆ็ฆป็บฟ๏ผไธ่ชๅจๅทๆฐ AnimeAtlas |
|
--library-index |
bool | โ | false | ็ๆ/ๆดๆฐ็ฎๆ ็ฎๅฝๆ น้จ็ library.db |
|
--mlip |
bool | โ | false | ็ๆ MiruPlay ๆๅๅบ๏ผlibrary.dbใBangumi ๅ
ๆฐๆฎๅ็ผบๅคฑๆตทๆฅ๏ผไธ็ๆ Kodi NFO |
|
--rebuild-library-index |
bool | โ | false | ไธ --library-index ๆ --mlip ๅ็จ๏ผๅ
จ้้ๆซ target๏ผๅ่
่ฟไผ่กฅๅ
ๆฐๆฎๅ็ผบๅคฑๅพ็ |
|
--probe-runtime |
bool | โ | false | ไฝฟ็จ ffprobe ๆขๆต่ง้ขๆถ้ฟๅนถๅๅ
ฅ episode.runtime๏ผ็ง๏ผ |
|
--help |
-h |
bool | โ | false | ๆพ็คบๅธฎๅฉ |
--version |
-V |
bool | โ | false | ๆพ็คบ็ๆฌ |
ๅฏ็จ --scrape-metadata ๅ๏ผ็จๅบไผ๏ผ
- ไผๅ
ไฝฟ็จ
--alias-fileJSON ๅๆฌๅฐๅซๅๅบๅน้ Bangumi ๆก็ฎ๏ผ่ฅๆชๆไพๆฌๅฐanimeatlas.sqlite/bangumi.db๏ผไผ่ชๅจไธ่ฝฝ AnimeAtlas latest release ็animeatlas.sqliteๅฐ็ผๅญ็ฎๅฝ๏ผๅคฑ่ดฅๆถๅ้ๅฐ Bangumi ๅ็งฐ/ๆ็ดขๅน้ - ๅจๅจ็ปๆ น็ฎๅฝ็ๆ
tvshow.nfo - ๅจ
Season N/็ฎๅฝไธ็ๆไธ่ง้ขๅๅ็*.nfo - ไผๅ
ไป Bangumi ไธ่ฝฝ
poster.jpgๅseasonXX-poster.jpg๏ผๅฆๆๆไพไบ TMDB API Key๏ผๅ TMDB ไฝไธบๆตทๆฅๅค้ๅนถ่กฅๅfanart.jpg
้ป่ฎค็ผๅญไฝไบ็ณป็ป็ผๅญ็ฎๅฝ๏ผWindows ไธบ %LOCALAPPDATA%\anime-organizer\bangumi-cache๏ผ็ผบๅคฑๆถๅ้ %APPDATA%๏ผ๏ผLinux/macOS ไผๅ
$XDG_CACHE_HOME/anime-organizer/bangumi-cache๏ผๅฆๅไฝฟ็จ ~/.cache/anime-organizer/bangumi-cacheใ--bangumi-cache ๅฏๆพๅผ่ฆ็ใ็ผๅญไธไผ้ป่ฎคๆพ่ฟๅชไฝ targetใ
ๆชๆๅฎ --metadata-source ๆถ๏ผๅ
ๆฐๆฎๆจกๅผไผๆ้ๅทๆฐ AnimeAtlas ๆๆฐๅๅธ็ animeatlas.sqliteใๆพๅผๆๅฎ --metadata-source ่กจ็คบไฝฟ็จๆฌๅฐๆฐๆฎๅนถไฟๆ็ฆป็บฟ๏ผไธไผ่งฆๅ AnimeAtlas ่ชๅจไธ่ฝฝ๏ผ--alias-file JSON ไปๅ
ทๆๆ้ซไผๅ
็บงใ
--alias-file ๅฏ็ดๆฅๅค็จ extract-aliases ๅฏผๅบ็ JSON ๅฏน่ฑกๆ ผๅผ๏ผไพๅฆ๏ผ
{
"่่่ฒ": {
"bangumi_id": 444444,
"name": "่ฌ้ใฎใใชใผใฌใณ",
"tmdb_id": 209867,
"anidb_id": 18597
}
}ๅฏ็จ --library-index ๅ๏ผ็จๅบไผๅบๅฎ็ฎก็็ฎๆ ็ฎๅฝๆ น้จ็ library.db๏ผ
- ๅฆๆ
library.dbไธๅญๅจ๏ผๆด็ๅฎๆๅๆซๆๆดไธช target๏ผๅๅงๅๅปบๅบใ - ๅฆๆ
library.dbๅทฒๅญๅจ๏ผ้ป่ฎคๅชๆๆฌๆฌกๆด็ๆๅ็ๆฐๆไปถๅข้ๆดๆฐ่ฟๅปใ - ๅฆๆๅๆถไผ ๅ
ฅ
--rebuild-library-index๏ผๆด็ๅฎๆๅ้ๆฐๆซๆๆดไธช target ๅนถ้ๅปบๆฐๆฎๅบใ --dry-runไธๅชๆๅฐๅฐๆง่ก็ๆจกๅผๅ็ป่ฎก๏ผไธๅๅปบๆไฟฎๆนๆฐๆฎๅบใ
--library-index ๅชๅๆไปถ็ดขๅผ๏ผไธ่็ฝใไธไธ่ฝฝๅพ็ใ็ป MiruPlay ไฝฟ็จๆถๆจ่ --mlip๏ผๅฎไผ็ๆ library.db๏ผๅๅ
ฅ Bangumi ไฝๅไธๅ้ๅ
ๆฐๆฎ๏ผๅนถๆ็ผบๅคฑ็ poster.jpg ๅ seasonXX-poster.jpg ไธ่ฝฝๅฐๅฏนๅบๅชไฝ็ฎๅฝใๅทฒๆๅพ็้ป่ฎคไฟ็๏ผ--force-overwrite ๆไผ้ๆฐไธ่ฝฝ่ฆ็๏ผ--no-images ๅๅฎๅ
จ่ทณ่ฟๅพ็ไธ่ฝฝใKodi NFO ไปๅช็ฑ --scrape-metadata ็ๆใ
ๅฆๆๆไพ TMDB API Key๏ผTMDB ไผไฝไธบๆตทๆฅๅค้ๆฅๆบๅนถ่กฅๅ
fanart.jpgใBangumi ๅ้ๆฐๆฎๆ duration_seconds ๆถไผๅๅ
ฅ episode.runtime๏ผๅฆ้ไปฅๆฌๅฐ่ง้ขไธบๅ๏ผๅฏ้ขๅคไผ ๅ
ฅ --probe-runtime ไฝฟ็จ ffprobe ๆขๆตๅฎ้
ๆถ้ฟใ้ป่ฎคไธไผๆขๆต่ง้ข๏ผ้ฟๅ
ๅฏน NASใWebDAV ๆไบ็้ๆไปถ่ฏปๅใ
ๅ
จ้ๆซๆๅทฒๆด็็ target ๆถ๏ผ็ดๆฅ็ถ็ฎๅฝ Season N ๆฏๅญฃๅท็ๆๅจๆฅๆบใๆ น็ฎๅฝ็ดๆพ็ S1 ๆไปถใSeason 1 ๅญ็ฎๅฝๅๅ็ปญ Season N ๅฏไปฅๅจๅไธๅชไฝๅบไธญๅ
ฑๅญ๏ผ็ฎๅฝๅญฃๅทไธๆไปถๅๅญฃๅทๅฒ็ชๆถไปฅ็ฎๅฝไธบๅใๅพ็่ทฏๅพๅง็ป็ธๅฏนๅฎ้
ๅชไฝ็ฎๅฝๅๅ
ฅ๏ผไธไผๆ่งฃๆๅ็ๅซๅๅฆๅปบ็ฎๅฝใ
ๆฌๆฐๆฎๅบๆฏๅช่ฏปๅ่ฎฎใไปปไฝๆญๆพๅจไธๅพไฟฎๆนๆฌๆฐๆฎๅบ๏ผๆญๆพๅๅฒใๆถ่ใ็ปง็ปญๆญๆพ็ญๆฐๆฎๅฟ ้กปไฟๅญๅจๆญๆพๅจ่ชๅทฑ็ๆฐๆฎๅบใ
้ฆๆฌกๅฏ็จๆถ๏ผlibrary.db ไธๅญๅจ๏ผ็จๅบไผๅ
ๅฎๆๆฌๆฌกๆด็๏ผๅๆซๆๆดไธช target ็ฎๅฝๅปบ็ซ็ดขๅผ๏ผ
aniorg \
--source="/path/to/downloads" \
--target="/path/to/anime" \
--library-index็ๆ็ปๆๅบๅฎๆพๅจ็ฎๆ ็ฎๅฝๆ น้จ๏ผ
/path/to/anime/
โโโ library.db
โโโ Bocchi the Rock!/
โ โโโ 01 [1080P].mkv
โโโ Spy x Family/
โโโ Season 2/
โโโ 01 [1080P].mkv
ไปฅๅ็ปง็ปญๆด็ๆฐไธ่ฝฝๆถ๏ผไป็ถไฝฟ็จๅไธไธชๅฝไปคใๅช่ฆ library.db ๅทฒๅญๅจ๏ผ้ป่ฎคๅฐฑๆฏๅข้ๆดๆฐ๏ผๅชๆๆฌๆฌกๆด็ๆๅ็ๆไปถๅๅ
ฅ็ดขๅผ๏ผไธไผ้ๆฐๆซๆๆดไธช็ฎๆ ็ฎๅฝใไธบๅ
ผๅฎน NASใWebDAV ๅ CloudDrive๏ผ็จๅบไผๅ
ๆ library.db ๅคๅถๅฐ็ณป็ปไธดๆถ็ฎๅฝๅฎๆ SQLite ไบๅก๏ผๅ้กบๅบไธไผ ๅนถๆฟๆข่ฟ็จๆฐๆฎๅบ๏ผ้ฟๅ
ๅจ่ฟ็จๆไปถไธ้ๆบๅๅ
ฅใ
aniorg \
--source="/path/to/new-downloads" \
--target="/path/to/anime" \
--library-indexๅฆๆไฝ ๆๅจๅพ็ฎๆ ็ฎๅฝๆทปๅ ใๅ ้คใ็งปๅจไบๆไปถ๏ผๆ่
ๆณ้ๆฐ็ๆๆดไธช็ดขๅผ๏ผไฝฟ็จ --rebuild-library-indexใๅฆๆๅชๆณๆซๆ็ฐๆ target ่ไธๆด็ไปปไฝๆฐๆไปถ๏ผ่ฎฉ --source ๆๅไธไธชๅญๅจ็็ฉบ็ฎๅฝ๏ผ
# ่ฃธ็ดขๅผ๏ผไธ่็ฝใไธไธ่ฝฝๅพ็
aniorg \
--source="/path/to/empty" \
--target="/path/to/anime" \
--library-index \
--rebuild-library-index
# MiruPlay ๆๅๅบ๏ผ่กฅๅ
ๆฐๆฎๅ็ผบๅคฑๅพ็
aniorg \
--source="/path/to/empty" \
--target="/path/to/anime" \
--mlip \
--rebuild-library-index--source ็ฎๅฝๅฟ
้กปๅญๅจใ็ฉบๆบไธไผ็งปๅจใๅคๅถๆ็กฌ้พๆฅๅชไฝ๏ผๅชไผๆซๆ targetใ--rebuild-library-index ๅฟ
้กปๅ --library-index ๆ --mlip ไธ่ตทไฝฟ็จ๏ผๅฆๆ source ไธๆฏ็ฉบ็ฎๅฝ๏ผๆฌๆฌกๆๅๆด็็ๆฐๆไปถไนไผๅ
ๅซๅจ้ๅปบ็ปๆไธญใ
็ป MiruPlay ๅข้็ๆๆๅๅบๆถ๏ผไฝฟ็จ --mlip๏ผๅฎ้ป่ฎคไธ่ฝฝ็ผบๅคฑๅพ็๏ผไฝไธไผ็ๆ Kodi NFO๏ผ
aniorg \
--source="/path/to/downloads" \
--target="/path/to/anime" \
--mlipๅฆๆ่ฟๆณ่กฅๅ
TMDB ่ๆฏๅพ๏ผๅฏไปฅ้ขๅคไผ ๅ
ฅ --tmdb-api-keyใ
ๅฆๆๅๆถๆณ็ๆ Kodi NFOใๅพ็ๅ MLIP ็ดขๅผ๏ผๅฏไปฅไธ่ตทๅผๅฏๅ ๆฐๆฎๅฎๅ๏ผ
aniorg \
--source="/path/to/downloads" \
--target="/path/to/anime" \
--scrape-metadata \
--tmdb-api-key="YOUR_TMDB_KEY" \
--library-index้ข่งๆถๅฏไปฅ็ปๅ --dry-runใๆญคๆถไธไผๅๅปบๆไฟฎๆน library.db๏ผๅชไผๆๅฐๅฐๆง่กๅๅงๅใๅข้ๆดๆฐ่ฟๆฏ้ๅปบ๏ผ
aniorg \
--source="/path/to/downloads" \
--target="/path/to/anime" \
--library-index \
--dry-run \
--verboseๅฆๆไธไผ --target๏ผ็ฎๆ ็ฎๅฝๆฒฟ็จ็ฐๆ่งๅ็ญไบ source๏ผๆไปฅ็ดขๅผไผๅๅฐ <source>/library.dbใๆญๆพๅจ่ฏปๅๆถๅบๆ media_file.path ๅฝไฝ็ธๅฏน library.db ๆๅจ็ฎๅฝ็่ทฏๅพๅค็๏ผ่ทฏๅพๅ้็ฌฆ็ปไธไธบ /ใ
-- ============================================================
-- Media Library Index Protocol (MLIP)
--
-- Version : 1
-- Storage : SQLite 3
--
-- ่ฎพ่ฎกๅๅ๏ผ
-- 1. ไธๆซๆ็ฎๅฝๅณๅฏๆๅปบๅชไฝๅบ
-- 2. ไธไพ่ตๅจ็บฟๅฎๅ
-- 3. ๆฏๆ้ฟๆๆฉๅฑ
-- 4. ๆๆๆฐๆฎๅๅฏ็ฑๆด็ๅจ้ๆฐ็ๆ
-- 5. ไธไฝฟ็จ polymorphic association / JSON / EAV
-- ============================================================
PRAGMA foreign_keys = ON;
CREATE TABLE meta
(
key TEXT PRIMARY KEY,
value TEXT NOT NULL
);
-- meta keys:
-- schema = 2
-- protocol = MLIP
-- generator = AnimeOrganizer
-- generator_version = <cargo package version>
-- library_uuid = <uuid>
-- library_root = <canonical target path>
-- generated_at = <RFC3339 timestamp>
CREATE TABLE series
(
id INTEGER PRIMARY KEY,
uuid TEXT UNIQUE NOT NULL,
title TEXT NOT NULL,
original_title TEXT,
sort_title TEXT,
summary TEXT,
year INTEGER,
-- series_type:
-- 1 TV
-- 2 Movie
-- 3 OVA
-- 4 ONA
-- 5 SP
series_type INTEGER NOT NULL DEFAULT 1
);
CREATE INDEX idx_series_title ON series(title);
CREATE TABLE series_release_date
(
series_id INTEGER PRIMARY KEY,
air_date TEXT NOT NULL, -- YYYY-MM-DD when known
FOREIGN KEY(series_id)
REFERENCES series(id)
ON DELETE CASCADE
);
CREATE TABLE episode
(
id INTEGER PRIMARY KEY,
uuid TEXT UNIQUE NOT NULL,
series_id INTEGER NOT NULL,
season INTEGER NOT NULL DEFAULT 1,
episode REAL NOT NULL,
sort_order REAL NOT NULL,
title TEXT,
summary TEXT,
runtime INTEGER, -- seconds
FOREIGN KEY(series_id)
REFERENCES series(id)
ON DELETE CASCADE,
UNIQUE(series_id, season, episode)
);
CREATE INDEX idx_episode_series ON episode(series_id);
CREATE TABLE media_file
(
id INTEGER PRIMARY KEY,
episode_id INTEGER NOT NULL,
path TEXT NOT NULL UNIQUE,
size INTEGER,
modified_time INTEGER,
FOREIGN KEY(episode_id)
REFERENCES episode(id)
ON DELETE CASCADE
);
CREATE INDEX idx_media_path ON media_file(path);
CREATE INDEX idx_media_episode ON media_file(episode_id);
-- Required in MLIP v2. Each subtitle belongs to one concrete media file.
CREATE TABLE media_subtitle
(
id INTEGER PRIMARY KEY,
media_file_id INTEGER NOT NULL,
path TEXT NOT NULL,
language TEXT,
title TEXT,
sort_order INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY(media_file_id)
REFERENCES media_file(id)
ON DELETE CASCADE,
UNIQUE(media_file_id, path)
);
CREATE INDEX idx_media_subtitle_file ON media_subtitle(media_file_id);
CREATE TABLE series_artwork
(
id INTEGER PRIMARY KEY,
series_id INTEGER NOT NULL,
-- artwork_kind:
-- 1 poster
-- 2 fanart
-- 3 banner
-- 4 logo
-- 5 thumb
-- 6 clearart
-- 7 season_poster
artwork_kind INTEGER NOT NULL,
path TEXT NOT NULL,
FOREIGN KEY(series_id)
REFERENCES series(id)
ON DELETE CASCADE,
UNIQUE(series_id, artwork_kind, path)
);
CREATE INDEX idx_series_artwork_series ON series_artwork(series_id);
CREATE TABLE episode_artwork
(
id INTEGER PRIMARY KEY,
episode_id INTEGER NOT NULL,
artwork_kind INTEGER NOT NULL,
path TEXT NOT NULL,
FOREIGN KEY(episode_id)
REFERENCES episode(id)
ON DELETE CASCADE,
UNIQUE(episode_id, artwork_kind, path)
);
CREATE INDEX idx_episode_artwork_episode ON episode_artwork(episode_id);
CREATE TABLE genre
(
id INTEGER PRIMARY KEY,
name TEXT UNIQUE NOT NULL
);
CREATE TABLE series_genre
(
series_id INTEGER NOT NULL,
genre_id INTEGER NOT NULL,
PRIMARY KEY(series_id, genre_id),
FOREIGN KEY(series_id)
REFERENCES series(id)
ON DELETE CASCADE,
FOREIGN KEY(genre_id)
REFERENCES genre(id)
ON DELETE CASCADE
);
CREATE TABLE series_external_id
(
series_id INTEGER NOT NULL,
-- provider:
-- 1 bangumi
-- 2 tmdb
-- 3 anidb
provider INTEGER NOT NULL,
value TEXT NOT NULL,
PRIMARY KEY(series_id, provider, value),
FOREIGN KEY(series_id)
REFERENCES series(id)
ON DELETE CASCADE
);
CREATE TABLE episode_external_id
(
episode_id INTEGER NOT NULL,
provider INTEGER NOT NULL,
value TEXT NOT NULL,
PRIMARY KEY(episode_id, provider, value),
FOREIGN KEY(episode_id)
REFERENCES episode(id)
ON DELETE CASCADE
);
CREATE TABLE capability
(
name TEXT PRIMARY KEY,
enabled INTEGER NOT NULL
);
-- v2 capabilities:
-- artwork = 1
-- genre = 1
-- external_id = 1
-- release_date = 1
-- people = 0
-- subtitle = 1
-- media_technical = 0
-- multi_file = 1
PRAGMA user_version = 2;v2 ๆฐๅขๅฟ
้่กจ media_subtitle๏ผๅนถๅฐ subtitle capability ่ฎพไธบ 1ใๆฏๆกๅญๅนๅ
ณ่ๅฐๅ
ทไฝ media_file๏ผๆด็ๅจไผๅๆญฅๅค็ไธ่ง้ขๅ็ฎๅฝใๅ stem ๆๅธฆ่ฏญ่จๅ็ผ็ .srtใ.assใ.ssaใ.vtt ๆไปถใ.sub ๅ ้่ฆ้
ๅฏน .idx๏ผๆไธๆฏๆใๅฏนๆขๆ v1 ๆฐๆฎๅบๆง่กๅข้ๆดๆฐๆถไผ่ชๅจๅ็บงไธบ v2ใ
[ๅๅธ็ป] ๅจๆผซๅ็งฐ๏ผๅฏๅซๅญฃๅบฆ๏ผ - ้ๆฐ [ๆ ็ญพไฟกๆฏ].ๆฉๅฑๅ
็คบไพ๏ผ
[ANi] ๅฆๆชๆ ้คจ็ๆฅญไธญ ่ฒณ - 07 [1080P][Baha][WEB-DL][AAC AVC][CHT].mp4[SubsPlease] ้ด่ฐ่ฟๅฎถๅฎถ - 12 [1080p].mkv[EMBER] ่ฟๅป็ๅทจไบบ The Final Season - 01 [1080p][Multiple Subtitle].avi
ๅจๆผซๅ็งฐ๏ผๅซๅญฃๅบฆ๏ผ/
โโโ Season 1/
โ โโโ 01 [ๆ ็ญพไฟกๆฏ].ๆฉๅฑๅ
โ โโโ 02 [ๆ ็ญพไฟกๆฏ].ๆฉๅฑๅ
โโโ Season 2/
โ โโโ 01 [ๆ ็ญพไฟกๆฏ].ๆฉๅฑๅ
โ โโโ ...
โโโ tvshow.nfo
โโโ poster.jpg
โโโ fanart.jpg
็กฌ้พๆฅๆฏๆจ่็ๆด็ๆนๅผ๏ผๅ ทๆไปฅไธไผๅฟ๏ผ
- ้ถ้ขๅค็ฉบ้ด: ไธๅ ็จ้ขๅค็ฃ็็ฉบ้ด
- ๅฟซ้ๆไฝ: ๅ ไน็ฌ้ดๅฎๆ
- ๆไปถๅๆญฅ: ๆบๆไปถๅ็ฎๆ ๆไปถๅ ๅฎนๅฎๅ จๅๆญฅ
- ๅไธๆไปถ็ณป็ป: ๆบๆไปถๅ็ฎๆ ๅฟ ้กปๅจๅไธๅๅบ/NASๅท
- ๆไปถ็ณป็ปๆฏๆ: ext4ใNTFSใAPFS ็ญๅๆฏๆ
- ๆ้่ฆๆฑ: ้่ฆๅฏนๆบๅ็ฎๆ ็ฎๅฝๆๅๅ ฅๆ้
ๅฆๆๆบๆไปถๅ็ฎๆ ไธๅจๅไธๆไปถ็ณป็ป๏ผไผๆพ็คบ้่ฏฏ๏ผ
็กฌ้พๆฅๅคฑ่ดฅ๏ผๆบๆไปถๅ็ฎๆ ๅฟ
้กปๅจๅไธๆไปถ็ณป็ป
ๆญคๆถๅฏ้ๆฉ๏ผ
- ๅฐ็ฎๆ ็ฎๅฝๆนไธบไธๆบๆไปถๅไธๆไปถ็ณป็ป
- ไฝฟ็จๅคๅถๆจกๅผ (
--mode=copy)๏ผๆ้่ฟ--fallback-on-link-failure=copy่ชๅจๅ้ - ไฝฟ็จ็งปๅจๆจกๅผ (
--mode=move)๏ผๆ้่ฟ--fallback-on-link-failure=move่ชๅจๅ้
# ๅฎๅ่ฟๆๆดๆฐ
cargo run --features scraper -- scrape --days 7 --format json
# ๅน้
ๅซๅๆๆก
cargo run --features scraper -- match --input scraped.json --format github
# ๆๅปบ SQLite ๅซๅๅบ
cargo run --features scraper -- build-db --output bangumi.db
# ไป dump ๆๅๅซๅ
cargo run --features scraper -- extract-aliases --download
# ๅๅนถๆฐๅซๅๅฐๆฐๆฎๅบ
cargo run --features scraper -- merge-aliases --input new_aliases.json
# ๅบ็จๅน้
็ๅซๅๆๆก
cargo run --features scraper -- apply-matches --input proposals.json
# ๅๅปบๅซๅ่ฏทๆฑ issue
cargo run --features scraper -- create-alias-issues --input uncertain.json --repo ModerRAS/anime-organizer# ๅๅบ่ฎข้
aniorg rss --list-subscriptions
# ๆทปๅ ่ฎข้
aniorg rss --add-subscription \
--rss-url "https://example.com/rss" \
--rss-target "/anime" \
--rss-filter "720p"
# ๅๆฌกๆง่ก
aniorg rss --single-shot \
--clouddrive-url http://localhost:19798 \
--rss-url "https://example.com/rss" \
--rss-target "/anime"
# Daemon ๆจกๅผ๏ผๆ็ปญ็ๆง๏ผ
aniorg rss --daemon \
--clouddrive-url http://localhost:19798 \
--rss-interval 300่ฎค่ฏๆฏๆไธค็งๆนๅผ๏ผ็ดๆฅไผ --clouddrive-token๏ผๆไฝฟ็จ --clouddrive-user + --clouddrive-pass ็ปๅฝ่ทๅไปค็ใ่ฎข้
ๅๅป้็ถๆ้ป่ฎคไฟๅญๅจ Windows ็ %LOCALAPPDATA%\anime-organizer\rss.dbใ
# ็ดๆฅๆไบค magnet ๆ torrent URL ๅฐ็ฆป็บฟไธ่ฝฝ
aniorg add-offline "magnet:?xt=urn:btih:..." \
--target "/anime" \
--clouddrive-url http://localhost:19798 \
--clouddrive-token "YOUR_TOKEN"
# ๆต่งไบ็็ฎๅฝ
aniorg list-folder "/anime" \
--clouddrive-url http://localhost:19798 \
--clouddrive-token "YOUR_TOKEN"# ๆด็ไธ่ฝฝ็ฎๅฝ
aniorg --source="D:\Downloads\Anime"
# ๆด็ๅฐๆๅฎ็ฎๅฝ
aniorg -s "/home/user/Downloads" -t "/media/anime"
# ็กฌ้พๆฅๆจกๅผ
aniorg -s "/home/user/Downloads" -m link -t "/mnt/anime"
# ๅคๅญฃไฝๅๆ Season ็ฎๅฝๆด็
aniorg -s "/path/to/downloads" -t "/path/to/anime" --season-mode
# ้ข่งๅๆดๅนถๆพ็คบ่ฏฆ็ปๆฅๅฟ
aniorg -s "/path/to/downloads" --dry-run -v
# ๆๅฎๆไปถ็ฑปๅ
aniorg -s "/path/to/downloads" --include-ext="mp4,mkv"
# ไฝฟ็จ่ชๅฎไนๅซๅๅบ
aniorg -s "/path/to/downloads" --alias-file="./my-aliases.json"
# ๅผบๅถ่ฆ็ๅทฒๆ NFO
aniorg -s "/path/to/downloads" --scrape-metadata --force-overwriteanime-organizer (aniorg) is a command-line tool designed for anime collectors to automatically organize video files in download directories.
Core Features:
- Auto-parse filenames to extract anime name, episode number, publisher info
- Support hard link mode - organize files without using extra disk space
- Generate Kodi-compatible NFO metadata files
- Generate a MiruPlay-ready MLIP
library.dbwith Bangumi metadata and artwork - Download poster and fanart images
- RSS subscription and 115 cloud drive sync (requires clouddrive feature)
Use Cases:
- Organize anime files in download directories
- Automate anime media library management
- Generate metadata for Kodi/Jellyfin/Plex media centers
- Smart Parsing: Auto-recognize
[Publisher] AnimeName - Episode [Tags].extformat - Flexible Organization: Restructure to
AnimeName/Season N/Episode [Tags].ext - Multiple Modes: Support move, copy, and hard link operations
- Metadata Scraping: Generate Kodi-compatible NFO files from Bangumi metadata
- Artwork Download: Download anime posters from Bangumi first, use TMDB as a backup and fanart source, then AniDB as the final poster fallback
- Alias Matching: Local
bangumi.dbaliases plus optional custom JSON overrides, with Bangumi title/search fallback - RSS Subscription: RSS auto-subscription and 115 cloud drive sync (requires
clouddrivefeature) - Cross-Platform: Support Windows, Linux, macOS
- Portable Deployment: Single-file on most platforms; keep
DirectML.dllbesideaniorg.exefrom the Windows x64 AniFileBERT release - High Performance: Native Rust implementation
Download from GitHub Releases. Windows x64 users should extract both aniorg.exe and DirectML.dll from the versioned ZIP and keep them in the same directory.
git clone https://github.com/ModerRAS/anime-organizer.git
cd anime-organizer
# Default build (metadata feature enabled)
cargo build --release
# Full features
cargo build --release --features "scraper clouddrive torrent-scraper"
# Embedded AniFileBERT ONNX filename parser (CPU)
cargo build --release --features "anifilebert"
# AniFileBERT plus Windows DirectML (GPU; NPU can be selected explicitly)
cargo build --release --features "anifilebert-directml"The compiled binary is located at target/release/aniorg. ANIORG_BERT_PROVIDER=cpu|auto|directml-gpu|directml-npu|directml-any controls the ONNX Runtime provider; ANIORG_DIRECTML_DEVICE_ID=0 pins a DirectML device. Without anifilebert-directml, the parser uses CPU. With it, the default is auto: try DirectML GPU first, then fall back to CPU. CPU threads can be tuned with ANIORG_ORT_INTRA_THREADS and ANIORG_ORT_INTER_THREADS; both default to 1. anifilebert-amd-npu remains as a compatibility alias for anifilebert-directml; VitisAI requires an additional ONNX Runtime provider package and is not part of the default build.
If your local Windows machine defaults to the GNU Rust toolchain, validate AniFileBERT/DirectML builds with the MSVC rustc explicitly. If ONNX Runtime fails during the local link step, point ORT_LIB_LOCATION at the extracted ORT directory and set ORT_PREFER_DYNAMIC_LINK=1 to use the import-lib/dll path.
# Hard link mode (default, zero extra space)
aniorg --source="/path/to/downloads"
# Preview mode
aniorg --source="/path/to/downloads" --dry-run --verbose
# Enable automatic fallback to copy when hard link fails
aniorg --source="/path/to/downloads" --fallback-on-link-failure=copy
# Organize multi-season releases into Season folders
aniorg --source="/path/to/downloads" --season-mode --target="/path/to/anime"
# Generate NFO files and artwork
aniorg --source="/path/to/downloads" --scrape-metadata
# Generate or update the MLIP library index in the target root
aniorg --source="/path/to/downloads" --target="/path/to/anime" --library-index
# Generate a MiruPlay-ready MLIP library with Bangumi metadata and posters
aniorg --source="/path/to/downloads" --target="/path/to/anime" --mlip
# Rebuild only the offline file index
aniorg --source="/path/to/empty" --target="/path/to/anime" --library-index --rebuild-library-index
# Rebuild a MiruPlay-ready library and download missing artwork
aniorg --source="/path/to/empty" --target="/path/to/anime" --mlip --rebuild-library-index| Argument | Short | Type | Required | Default | Description |
|---|---|---|---|---|---|
--source |
-s |
string | โ | - | Source directory path |
--target |
-t |
string | โ | source | Target root directory |
--mode |
-m |
enum | โ | link | Operation mode: move/copy/link |
--dry-run |
bool | โ | false | Preview only, no actual changes | |
--include-ext |
string | โ | mp4,mkv,... | File extensions to process | |
--filename-parser |
enum | โ | rules | Filename parser: rules, anifilebert, or auto (fall back to AniFileBERT after rules fail) |
|
--verbose |
-v |
bool | โ | false | Show detailed logs |
--fallback-on-link-failure |
enum | โ | - | Fallback when hard link fails: move or copy (disabled by default) | |
--season-mode / --ๅๅญฃ |
bool | โ | false | Group multi-season titles as Series/Season N/ |
|
--scrape-metadata / --ๅฎๅ |
bool | โ | false | Enable Bangumi metadata scraping with optional TMDB artwork | |
--tmdb-api-key |
string | โ | - | TMDB API key for backup posters and fanart | |
--alias-file |
string | โ | - | Custom alias JSON file overriding same-name entries from local bangumi.db |
|
--no-images |
bool | โ | false | Skip Kodi/MLIP artwork downloads while retaining available text metadata | |
--no-episode-metadata |
bool | โ | false | Skip Bangumi episode title, summary, and duration lookup | |
--force-overwrite |
bool | โ | false | Overwrite existing NFO and image files | |
--bangumi-cache |
string | โ | system cache dir | Cache for Bangumi Archive and AnimeAtlas SQLite; kept outside the media target by default | |
--metadata-source |
string | โ | - | Local subject.jsonlines or its directory; explicit use stays offline and disables AnimeAtlas refresh |
|
--library-index |
bool | โ | false | Generate/update library.db in the target root |
|
--mlip |
bool | โ | false | Generate library.db, Bangumi metadata, and missing artwork without Kodi NFO |
|
--rebuild-library-index |
bool | โ | false | Full target rescan; with --mlip, also refresh metadata and download missing artwork |
|
--probe-runtime |
bool | โ | false | Use ffprobe to probe video duration and write episode.runtime in seconds |
|
--help |
-h |
bool | โ | false | Show help |
--version |
-V |
bool | โ | false | Show version |
When --scrape-metadata is enabled, the tool will:
- Prefer aliases from
--alias-fileJSON and a local alias database; when no localanimeatlas.sqlite/bangumi.dbis available, it downloads AnimeAtlas latest-releaseanimeatlas.sqliteinto the cache directory and falls back to Bangumi title/search matching if that download fails - Generate
tvshow.nfoin the series root - Generate per-episode
*.nfofiles beside organized videos inSeason N/ - Download
poster.jpgandseasonXX-poster.jpgfrom Bangumi first; when a TMDB API key is provided, TMDB is used as a poster backup and forfanart.jpg
The default cache is %LOCALAPPDATA%\anime-organizer\bangumi-cache on Windows (falling back to %APPDATA%) and $XDG_CACHE_HOME/anime-organizer/bangumi-cache or ~/.cache/anime-organizer/bangumi-cache on Linux/macOS. Override it with --bangumi-cache; the cache is not placed inside the media target by default.
Without --metadata-source, metadata modes refresh the latest released AnimeAtlas animeatlas.sqlite as needed. An explicit --metadata-source selects local offline data and does not trigger AnimeAtlas downloads. A JSON --alias-file remains the highest-priority override.
The --alias-file JSON can reuse the object output format from extract-aliases, for example:
{
"Frieren": {
"bangumi_id": 444444,
"name": "่ฌ้ใฎใใชใผใฌใณ",
"tmdb_id": 209867,
"anidb_id": 18597
}
}--library-index manages a fixed library.db in the target root. It only writes the file index: it does not fetch metadata or artwork. For MiruPlay, prefer --mlip; it writes Bangumi series and episode metadata and downloads missing poster.jpg and seasonXX-poster.jpg files into the physical media directory. Existing artwork is preserved unless --force-overwrite is set; --no-images skips downloads. Kodi NFO files are still generated only by --scrape-metadata.
A TMDB API key is optional and only adds backup poster/fanart coverage. When Bangumi episodes include duration_seconds, it is written to episode.runtime; pass --probe-runtime to use ffprobe and prefer actual local video duration. Runtime probing stays disabled by default to avoid reading every file on NAS, WebDAV, or cloud-backed libraries.
During a full target scan, an immediate Season N parent is authoritative. Flat season-one files, a Season 1 subdirectory, and later Season N directories may coexist; when a filename season conflicts with its directory, the directory wins. Artwork paths always follow the physical top-level media directory instead of creating a separate parser-derived directory.
The first run creates the database by scanning the full target directory after organization finishes:
aniorg \
--source="/path/to/downloads" \
--target="/path/to/anime" \
--library-indexLater runs with the same command are incremental when library.db already exists: only files successfully organized in the current run are upserted. For NAS, WebDAV, and CloudDrive targets, library.db is copied to the system temp directory, updated locally, then uploaded and replaced sequentially instead of being randomly written in place.
aniorg \
--source="/path/to/new-downloads" \
--target="/path/to/anime" \
--library-indexUse --rebuild-library-index when files were manually added, removed, or moved. To rebuild an existing target without organizing new media, point --source at an existing empty directory:
# Offline file index only
aniorg \
--source="/path/to/empty" \
--target="/path/to/anime" \
--library-index \
--rebuild-library-index
# MiruPlay-ready metadata and missing artwork
aniorg \
--source="/path/to/empty" \
--target="/path/to/anime" \
--mlip \
--rebuild-library-indexThe source directory must exist. An empty source performs no move, copy, or hard-link operations; it only scans the target. --dry-run --library-index does not create or modify library.db; it only reports whether the command would initialize, incrementally update, or rebuild the index. media_file.path values are stored relative to the directory containing library.db and always use / separators.
Matching .srt, .ass, .ssa, and .vtt sidecars are organized with their video and exported through the required MLIP v2 media_subtitle table. A sidecar must share the video stem or append a language-style suffix; .sub is excluded because VobSub requires a paired .idx. Incremental writes migrate existing v1 databases to v2.
Hard linking is the recommended mode:
- Zero Extra Space: No additional disk space used
- Fast Operation: Almost instant
- File Sync: Source and target share the same content
If hard linking fails due to cross-filesystem layouts or lack of support, you can opt in to automatic fallback via --fallback-on-link-failure=copy or --fallback-on-link-failure=move; otherwise, the failure is reported and the file is skipped.
Requirements:
- Source and target must be on the same filesystem
- Filesystem must support hard links (ext4, NTFS, APFS, etc.)
- Write permission required for both directories
# Scrape recent updates
cargo run --features scraper -- scrape --days 7 --format json
# Match alias proposals
cargo run --features scraper -- match --input scraped.json --format github
# Build SQLite alias database
cargo run --features scraper -- build-db --output bangumi.db
# Extract aliases from dump
cargo run --features scraper -- extract-aliases --download
# Merge new aliases into database
cargo run --features scraper -- merge-aliases --input new_aliases.json
# Apply confident match proposals
cargo run --features scraper -- apply-matches --input proposals.json
# Create alias request issues
cargo run --features scraper -- create-alias-issues --input uncertain.json --repo ModerRAS/anime-organizer# List subscriptions
aniorg rss --list-subscriptions
# Add subscription
aniorg rss --add-subscription \
--rss-url "https://example.com/rss" \
--rss-target "/anime" \
--rss-filter "720p"
# Single shot execution
aniorg rss --single-shot \
--clouddrive-url http://localhost:19798 \
--rss-url "https://example.com/rss" \
--rss-target "/anime"
# Daemon mode (continuous monitoring)
aniorg rss --daemon \
--clouddrive-url http://localhost:19798 \
--rss-interval 300Authentication supports either --clouddrive-token or --clouddrive-user + --clouddrive-pass. Subscription and dedupe state is stored in %LOCALAPPDATA%\anime-organizer\rss.db on Windows.
# Submit a magnet or torrent URL directly to offline download
aniorg add-offline "magnet:?xt=urn:btih:..." \
--target "/anime" \
--clouddrive-url http://localhost:19798 \
--clouddrive-token "YOUR_TOKEN"
# Browse a cloud folder
aniorg list-folder "/anime" \
--clouddrive-url http://localhost:19798 \
--clouddrive-token "YOUR_TOKEN"# Scrape DMHY torrent titles
aniorg torrent-scrape --source dmhy --output dmhy_titles.txt
# Scrape Nyaa torrent titles
aniorg torrent-scrape --source nyaa --query "anime" --output nyaa_titles.txt
# Scrape both sources
aniorg torrent-scrape --source all --pages 3 --output all_titles.txt# Run tests
cargo test
# Run with verbose output
cargo run -- --source="/path/to/downloads" --verbose
# Build release binary
cargo build --release
# Build with all features
cargo build --release --features "scraper clouddrive torrent-scraper"AGPL-3.0 License - see LICENSE for details.