56 lines
2.2 KiB
YAML
56 lines
2.2 KiB
YAML
name: move_to_destination
|
|
|
|
summary: >
|
|
Move a file or folder to a destination, creating parent directories as needed.
|
|
|
|
description: |
|
|
Performs an actual move on disk. Uses the system 'mv' command, so on the
|
|
same filesystem (e.g. ZFS) this is an instant rename. Creates the parent
|
|
directory of the destination if it doesn't exist yet, then moves. Returns
|
|
before/after paths on success, or an error if the destination already
|
|
exists or the source can't be moved.
|
|
|
|
when_to_use: |
|
|
Use after one of the resolve_*_destination tools returned status=ok, to
|
|
perform the move it described. The 'source' and 'destination' arguments
|
|
come directly from the resolved paths.
|
|
|
|
when_not_to_use: |
|
|
- Never move when status was not 'ok' (clarification still pending or
|
|
error happened) — that would leave the library in a half-broken state.
|
|
- Don't use this for the seed-link step; use create_seed_links for that.
|
|
|
|
next_steps: |
|
|
- After a successful move: call manage_subtitles to place any subtitle
|
|
tracks, then create_seed_links to keep qBittorrent seeding.
|
|
- On error: surface the message; do not retry blindly — check whether
|
|
the destination already exists or the source path is correct.
|
|
|
|
parameters:
|
|
source:
|
|
description: Absolute path to the source file or folder to move.
|
|
why_needed: |
|
|
The thing being moved. Comes from the user's download folder or from
|
|
a previous tool's output.
|
|
example: /downloads/Oz.S03.1080p.WEBRip.x265-KONTRAST
|
|
|
|
destination:
|
|
description: Absolute path of the destination — must not already exist.
|
|
why_needed: |
|
|
Where to put the source. Comes from a resolve_*_destination call so
|
|
that the path matches the library's naming convention.
|
|
example: /tv_shows/Oz.1997.1080p.WEBRip.x265-KONTRAST/Oz.S03.1080p.WEBRip.x265-KONTRAST
|
|
|
|
returns:
|
|
ok:
|
|
description: Move succeeded.
|
|
fields:
|
|
source: Absolute path of the source (now gone).
|
|
destination: Absolute path of the destination (now in place).
|
|
|
|
error:
|
|
description: Move failed.
|
|
fields:
|
|
error: Short error code (source_not_found, destination_exists, mkdir_failed, move_failed).
|
|
message: Human-readable explanation of what went wrong.
|