|
Bogdan Timofte
authored
2 weeks ago
|
1
|
# Agent Notes
|
|
|
2
|
|
|
|
3
|
## Media importer lineage
|
|
|
4
|
|
|
|
5
|
AutoNAS derives its unattended camera import behavior from:
|
|
|
6
|
|
|
|
7
|
```text
|
|
|
8
|
/Users/bogdan/Documents/Workspaces/Bogdan/Media Importer/media-importer.sh
|
|
|
9
|
```
|
|
|
10
|
|
|
|
11
|
Before changing `scripts/autonas-media-importer.sh`, read the upstream note:
|
|
|
12
|
|
|
|
13
|
```text
|
|
|
14
|
/Users/bogdan/Documents/Workspaces/Bogdan/Media Importer/AGENTS.md
|
|
|
15
|
```
|
|
|
16
|
|
|
|
17
|
The Raspberry Pi importer/wrapper direction from the old Media Importer repo is a dead end and must not be used as a reference design unless that direction is explicitly reopened.
|
|
|
18
|
|
|
|
19
|
## Unattended safety rules
|
|
|
20
|
|
|
|
21
|
AutoNAS runs from udev/systemd and is therefore unattended by default. Changes must preserve the upstream data-loss protections:
|
|
|
22
|
|
|
|
23
|
- no overwrite of existing destination files;
|
|
|
24
|
- destination conflicts resolved before copy/move;
|
|
|
25
|
- planned destination paths reserved during one run;
|
|
|
26
|
- move mode implemented as copy, verify, then delete source;
|
|
|
27
|
- source deletion only after destination verification succeeds;
|
|
|
28
|
- destination temp files cleaned on copy/verify failures;
|
|
|
29
|
- `VERIFY_MODE=size` default with `strict` available;
|
|
|
30
|
- GoPro timestamp changes require regression testing against real MP4/THM/LRV cases.
|
|
|
31
|
|
|
|
32
|
If any of these protections are missing, do not recommend AutoNAS unattended import.
|
|
|
33
|
|
|
|
34
|
## Required validation
|
|
|
35
|
|
|
|
36
|
For importer changes, compare behavior with upstream `media-importer.sh` and, when possible, run upstream tests:
|
|
|
37
|
|
|
|
38
|
```bash
|
|
|
39
|
cd "/Users/bogdan/Documents/Workspaces/Bogdan/Media Importer"
|
|
|
40
|
./test_runner.sh timestamp-collision
|
|
|
41
|
./test_runner.sh verify-mode
|
|
|
42
|
./test_runner.sh dest-in-source
|
|
|
43
|
./test_runner.sh gopro-sidecar-sync
|
|
|
44
|
./test_runner.sh gopro-no-sidecar-reimport
|
|
|
45
|
```
|
|
|
46
|
|
|
|
47
|
If these cannot be run, mark the AutoNAS importer as partially validated only.
|
|
|
48
|
|