ani-auto 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -50
- package/package.json +2 -3
- package/src/cli.js +331 -183
- package/src/config.js +5 -3
- package/src/daemon.js +90 -30
- package/src/db.js +39 -7
- package/src/engine.js +44 -23
- package/src/network.js +88 -0
- package/src/notify.js +70 -47
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
# ani-auto
|
|
12
12
|
|
|
13
|
-
automatically downloads new anime episodes
|
|
13
|
+
automatically downloads new anime episodes. works with your AniList watching list or a manual list — no account required.
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
@@ -26,28 +26,42 @@ npm install -g ani-auto
|
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
ani-auto setup
|
|
29
|
-
ani-auto
|
|
29
|
+
ani-auto download
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
> **Tip:** connecting your AniList account lets the daemon know exactly when episodes air and download them automatically. without AniList, you can still add anime manually and the daemon will check every 2 hours.
|
|
33
|
+
|
|
32
34
|
---
|
|
33
35
|
|
|
34
36
|
## features
|
|
35
37
|
|
|
36
38
|
**1. anilist sync**
|
|
37
|
-
stays in sync with your watching list — only downloads episodes you haven't seen yet.
|
|
39
|
+
stays in sync with your watching list — only downloads episodes you haven't seen yet. supports multiple statuses (watching, paused, planning, repeating).
|
|
38
40
|
|
|
39
|
-
**2.
|
|
40
|
-
|
|
41
|
+
**2. manual list**
|
|
42
|
+
no AniList account? add any anime manually with `ani-auto add "title"` and it will be tracked and downloaded just like AniList entries.
|
|
41
43
|
|
|
42
|
-
**3.
|
|
43
|
-
|
|
44
|
+
**3. quality control**
|
|
45
|
+
choose your preferred quality on each run or set a default. set a different quality per anime with `ani-auto quality`.
|
|
44
46
|
|
|
45
|
-
**4.
|
|
46
|
-
|
|
47
|
+
**4. smart daemon**
|
|
48
|
+
connects to your AniList to know exactly when each episode airs and downloads at the right time. falls back to checking every 2 hours for manual list entries or when AniList is not connected.
|
|
49
|
+
|
|
50
|
+
**5. offline recovery**
|
|
51
|
+
if your device loses internet, the daemon detects it instantly and resumes the moment connection is restored.
|
|
47
52
|
|
|
48
|
-
**
|
|
53
|
+
**6. episode range**
|
|
54
|
+
download a specific range of episodes in one run — useful for catching up on a series.
|
|
55
|
+
|
|
56
|
+
**7. telegram notifications**
|
|
49
57
|
get notified on your phone when episodes download, fail, or the daemon starts. message @userinfobot on telegram to get your chat id, then run `ani-auto setup`.
|
|
50
58
|
|
|
59
|
+
**8. pause & resume**
|
|
60
|
+
disable any anime at any time without losing your download history.
|
|
61
|
+
|
|
62
|
+
**9. retry failed episodes**
|
|
63
|
+
re-attempt all failed downloads in one command with `ani-auto retry`.
|
|
64
|
+
|
|
51
65
|
---
|
|
52
66
|
|
|
53
67
|
## commands
|
|
@@ -55,24 +69,25 @@ get notified on your phone when episodes download, fail, or the daemon starts. m
|
|
|
55
69
|
```
|
|
56
70
|
Usage: ani-auto [options] [command]
|
|
57
71
|
|
|
58
|
-
Automatic anime episode downloader — AniList-aware
|
|
59
|
-
|
|
60
72
|
Options:
|
|
61
73
|
-V, --version output the version number
|
|
62
74
|
-h, --help display help for command
|
|
63
75
|
|
|
64
76
|
Commands:
|
|
65
77
|
setup Interactive first-time configuration wizard
|
|
66
|
-
|
|
78
|
+
download Run one download cycle immediately
|
|
67
79
|
list Show all tracked anime and their episode download status
|
|
68
|
-
add [options] <title> Search AniList and add an anime to the manual
|
|
69
|
-
remove [title] Remove an anime from the manual list
|
|
80
|
+
add [options] <title> Search AniList and add an anime to the manual list
|
|
81
|
+
remove [title] Remove an anime from the manual list
|
|
70
82
|
enable Re-enable downloads for an anime
|
|
71
83
|
disable Pause downloads for an anime (keeps history)
|
|
72
|
-
|
|
84
|
+
quality [title] Set per-anime quality override
|
|
85
|
+
retry Re-attempt all failed episode downloads
|
|
86
|
+
status [options] Show recent run log or per-anime episode breakdown
|
|
87
|
+
notify [action] Enable or disable Telegram notifications (on, off)
|
|
73
88
|
config [options] View, update, or open config file
|
|
74
89
|
update Check for updates and install the latest version
|
|
75
|
-
daemon [
|
|
90
|
+
daemon [action] Manage the background daemon (install, start, stop, restart, status, logs)
|
|
76
91
|
help [command] display help for command
|
|
77
92
|
```
|
|
78
93
|
|
|
@@ -84,7 +99,8 @@ Commands:
|
|
|
84
99
|
ani-auto config --set-quality 1080p
|
|
85
100
|
ani-auto config --set-concurrency 3
|
|
86
101
|
ani-auto config --set-output ~/videos/anime
|
|
87
|
-
ani-auto config --set-interval
|
|
102
|
+
ani-auto config --set-interval 120
|
|
103
|
+
ani-auto config --set-airing-buffer 5
|
|
88
104
|
ani-auto config --open
|
|
89
105
|
```
|
|
90
106
|
|
|
@@ -92,42 +108,18 @@ ani-auto config --open
|
|
|
92
108
|
|
|
93
109
|
## background service (linux)
|
|
94
110
|
|
|
95
|
-
|
|
111
|
+
install and start the daemon as a systemd service with one command:
|
|
96
112
|
|
|
97
113
|
```bash
|
|
98
|
-
|
|
99
|
-
NODE_BIN=$(which node) && \
|
|
100
|
-
DAEMON_PATH=$(npm root -g)/ani-auto/src/daemon.js && \
|
|
101
|
-
cat > ~/.config/systemd/user/ani-auto.service << SERVICE
|
|
102
|
-
[Unit]
|
|
103
|
-
Description=ani-auto daemon
|
|
104
|
-
After=network-online.target
|
|
105
|
-
|
|
106
|
-
[Service]
|
|
107
|
-
ExecStart=$NODE_BIN $DAEMON_PATH
|
|
108
|
-
Restart=on-failure
|
|
109
|
-
RestartSec=10
|
|
110
|
-
|
|
111
|
-
[Install]
|
|
112
|
-
WantedBy=default.target
|
|
113
|
-
SERVICE
|
|
114
|
-
systemctl --user daemon-reload && \
|
|
115
|
-
systemctl --user enable --now ani-auto && \
|
|
116
|
-
echo "ani-auto daemon installed and started"
|
|
114
|
+
ani-auto daemon install
|
|
117
115
|
```
|
|
118
116
|
|
|
119
|
-
**
|
|
117
|
+
**other daemon commands:**
|
|
120
118
|
|
|
121
119
|
```bash
|
|
122
|
-
#
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
#
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
# restart
|
|
129
|
-
systemctl --user restart ani-auto
|
|
130
|
-
|
|
131
|
-
# stop
|
|
132
|
-
systemctl --user stop ani-auto
|
|
120
|
+
ani-auto daemon start # start the service
|
|
121
|
+
ani-auto daemon stop # stop the service
|
|
122
|
+
ani-auto daemon restart # restart the service
|
|
123
|
+
ani-auto daemon status # check if running
|
|
124
|
+
ani-auto daemon logs # stream live logs
|
|
133
125
|
```
|
package/package.json
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ani-auto",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Automatic anime episode downloader",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ani-auto": "./src/cli.js"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
9
|
"start": "node src/daemon.js",
|
|
10
|
-
"
|
|
10
|
+
"download": "node src/cli.js download",
|
|
11
11
|
"setup": "node src/cli.js setup"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"chalk": "^4.1.2",
|
|
15
15
|
"cli-progress": "^3.12.0",
|
|
16
16
|
"commander": "^12.0.0",
|
|
17
|
-
"cron": "^3.1.6",
|
|
18
17
|
"inquirer": "^8.2.6",
|
|
19
18
|
"node-fetch": "^2.7.0",
|
|
20
19
|
"ora": "^5.4.1",
|