Add a Trash view to see and empty .jellymove-trash (#3)
CI / test (push) Successful in 1m18s
CI / test (push) Successful in 1m18s
Moved folders sat in each library's .jellymove-trash until removed by hand on the server. The new Trash tab lists them on either server with
size, file count, when and where they went, and empties one item, a library or everything after a confirmation.
- trash.rs: list and empty entries. Entries are referred to by an opaque ID and resolved by scanning; only real folders directly inside a trash folder can be deleted.
- Each move now gets its own trash entry folder, with a small metadata file. Fixes moves failing when the same item had been trashed before.
- Peer API: GET /trash, POST /trash/empty, and /exports/{id}/complete now records the job and destination.
- e2e tests for listing, emptying from either side, refusing paths as IDs, and moving the same item away twice.
Closes #3
This commit is contained in:
1 parent
38319e0987
commit
4c6217bd40
16 files changed
+935
-23
No files matched your search
@@ -38,7 +38,8 @@ forwarding.
|
||||
| `POST /exports {item_id}` | Source: start checking, hashing and capturing user data. Idempotent per item. |
|
||||
| `GET /exports/{id}` | Poll: `Preparing` → `Ready` (with `ExportInfo`) or `Failed` |
|
||||
| `GET /exports/{id}/files/{idx}` | Range-capable download of manifest entry `idx` |
|
||||
| `POST /exports/{id}/complete` | Source: move folder to trash and rescan. Idempotent. |
|
||||
| `POST /exports/{id}/complete {job_id?, moved_to?}` | Source: move folder to a new trash entry and rescan. Idempotent. |
|
||||
| `GET /trash`, `POST /trash/empty {ids}` | List the source's trash entries; delete entries by ID (never by path) |
|
||||
| `POST /jobs`, `GET /jobs` | Create or list jobs on the peer (destination) |
|
||||
|
||||
## Job stages
|
||||
|
||||
Reference in new issue
Block a user