You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+55-27Lines changed: 55 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ That's where rewrite rules come into play. They allow you to translate paths bet
78
78
**Before you begin, make sure you understand how regular expressions work!**\
79
79
Make sure you know how capture groups work, as these are used for the `to` field.
80
80
81
-
Triggers can receive paths from any source: A remote server, a Docker container and the local file system. The `rewrite` field can be defined for each individual trigger. The `from` should be a regexp pattern describing the path from the trigger's perspective. The `to` should then convert this path into a path which is local to Autoscan.
81
+
Triggers can receive paths from any source: A remote server, a Docker container and the local file system. The `rewrite` field can be defined for each individual trigger. This field can contain multiple rewriting rules. Therefore, each rule should have a `-` to indicate the next rule on the list. The `from` should be a regexp pattern describing the path from the trigger's perspective. The `to` should then convert this path into a path which is local to Autoscan.
82
82
83
83
Targets work the other way around. They have to convert the path local to Autoscan to a path understood by the target, which can be a Docker container, remote server, etc. The `from` should be a regexp pattern describing the path from Autoscan's perspective. The `to` should then convert this path into a path which is local to the target.
84
84
@@ -96,24 +96,24 @@ The following config only defines rewrite paths, this should not be used directl
96
96
triggers:
97
97
sonarr:
98
98
- rewrite:
99
-
# /tv contains folders with tv shows
100
-
# This path is used within the Sonarr Docker container
101
-
from: /tv/*
99
+
# /tv contains folders with tv shows
100
+
# This path is used within the Sonarr Docker container
101
+
- from: /tv/*
102
102
103
-
# /mnt/unionfs/Media/TV links to the same folder, though from the host OS
104
-
# This folder is accessed by Autoscan
105
-
to: /mnt/unionfs/Media/TV/$1
103
+
# /mnt/unionfs/Media/TV links to the same folder, though from the host OS
104
+
# This folder is accessed by Autoscan
105
+
to: /mnt/unionfs/Media/TV/$1
106
106
107
107
targets:
108
108
plex:
109
109
- rewrite:
110
-
# Same folder as above, accessible by Autoscan.
111
-
# Note how we strip the "TV" part,
112
-
# as we want both Movies and TV.
113
-
from: /mnt/unionfs/Media/*
110
+
# Same folder as above, accessible by Autoscan.
111
+
# Note how we strip the "TV" part,
112
+
# as we want both Movies and TV.
113
+
- from: /mnt/unionfs/Media/*
114
114
115
-
# This path is used within the Plex Docker container
116
-
to: /data/$1
115
+
# This path is used within the Plex Docker container
116
+
to: /data/$1
117
117
```
118
118
119
119
Let's take a look at the journey of the path `/tv/Westworld/Season 1/s01e01.mkv` coming from Sonarr.
@@ -135,7 +135,7 @@ We plan to support two kinds of triggers in GA:
135
135
136
136
- Daemon processes.
137
137
These triggers run in the background and fetch resources based on a cron schedule or in real-time. \
138
-
*Currently not available, but expected to arrive in GA.*
138
+
*Available, but bugs may still exist.*
139
139
140
140
- Webhooks.
141
141
These triggers expose HTTP handlers which can be added to the trigger's software. \
@@ -152,6 +152,14 @@ Each trigger consists of at least:
152
152
- RegExp-based rewriting rules: translate a path given by the trigger to a path on the local file system. \
153
153
*If the paths are identical between the trigger and the local file system, then the `rewrite` field should be ignored.*
154
154
155
+
#### Daemons
156
+
157
+
Daemons run in the background and continuously fetch new changes based on a [cron expression](https://crontab.guru).
158
+
159
+
The following daemons are currently provided by Autoscan:
160
+
161
+
- Google Drive
162
+
155
163
#### Webhooks
156
164
157
165
Webhooks, also known as HTTPTriggers internally, process HTTP requests on their exposed endpoints.
@@ -183,15 +191,35 @@ authentication:
183
191
port: 3030
184
192
185
193
triggers:
194
+
bernard:
195
+
- account: service-account.json
196
+
cron: "*/5 * * * *" # every five minutes (the "" are important)
197
+
priority: 0
198
+
drives:
199
+
- id: Shared Drive 1
200
+
- id: Shared Drive 2
201
+
202
+
# rewrite drive to the local filesystem
203
+
rewrite:
204
+
- from: ^/Media/*
205
+
to: /mnt/unionfs/Media/$1
206
+
207
+
# filter with regular expressions
208
+
include: # if set, then exclude is ignored
209
+
- "^/mnt/unionfs/Media/*"
210
+
211
+
exclude:
212
+
- "\.srt$"
213
+
186
214
sonarr:
187
215
- name: sonarr-docker # /triggers/sonarr-docker
188
216
priority: 2
189
217
190
218
# Rewrite the path from within the container
191
219
# to your local filesystem.
192
220
rewrite:
193
-
from: /tv/*
194
-
to: /mnt/unionfs/Media/TV/$1
221
+
- from: /tv/*
222
+
to: /mnt/unionfs/Media/TV/$1
195
223
196
224
radarr:
197
225
- name: radarr # /triggers/radarr
@@ -299,8 +327,8 @@ targets:
299
327
- url: https://plex.domain.tld # URL of your Plex server
300
328
token: XXXX # Plex API Token
301
329
rewrite:
302
-
from: /mnt/unionfs/Media/* # local file system
303
-
to: /data/$1 # path accessible by the Plex docker container (if applicable)
330
+
- from: /mnt/unionfs/Media/* # local file system
331
+
to: /data/$1 # path accessible by the Plex docker container (if applicable)
304
332
```
305
333
306
334
There are a couple of things to take note of in the config:
@@ -321,8 +349,8 @@ targets:
321
349
- url: https://emby.domain.tld # URL of your Emby server
322
350
token: XXXX # Emby API Token
323
351
rewrite:
324
-
from: /mnt/unionfs/Media/* # local file system
325
-
to: /data/$1 # path accessible by the Emby docker container (if applicable)
352
+
- from: /mnt/unionfs/Media/* # local file system
353
+
to: /data/$1 # path accessible by the Emby docker container (if applicable)
326
354
```
327
355
328
356
- URL. The URL can link to the docker container directly, the localhost or a reverse proxy sitting in front of Emby.
@@ -366,8 +394,8 @@ triggers:
366
394
# Rewrite the path from within the container
367
395
# to your local filesystem.
368
396
rewrite:
369
-
from: /tv/*
370
-
to: /mnt/unionfs/Media/TV/$1
397
+
- from: /tv/*
398
+
to: /mnt/unionfs/Media/TV/$1
371
399
372
400
radarr:
373
401
- name: radarr # /triggers/radarr
@@ -385,15 +413,15 @@ targets:
385
413
- url: https://plex.domain.tld # URL of your Plex server
386
414
token: XXXX # Plex API Token
387
415
rewrite:
388
-
from: /mnt/unionfs/Media/* # local file system
389
-
to: /data/$1 # path accessible by the Plex docker container (if applicable)
416
+
- from: /mnt/unionfs/Media/* # local file system
417
+
to: /data/$1 # path accessible by the Plex docker container (if applicable)
390
418
391
419
emby:
392
420
- url: https://emby.domain.tld # URL of your Emby server
393
421
token: XXXX # Emby API Token
394
422
rewrite:
395
-
from: /mnt/unionfs/Media/* # local file system
396
-
to: /data/$1 # path accessible by the Emby docker container (if applicable)
423
+
- from: /mnt/unionfs/Media/* # local file system
424
+
to: /data/$1 # path accessible by the Emby docker container (if applicable)
397
425
```
398
426
399
427
## Other installation options
@@ -423,7 +451,7 @@ Autoscan's Docker image provides various versions that are available via tags. T
0 commit comments