Organize Files
Use moviepilot_api for every MoviePilot business operation. Retired file,
recognition, transfer, and history tools are not available.
Workflow
- Establish scope. If the user provides a path, use it. If they identify a
downloader task, use
downloader-operation and its fixed
scripts/mp-downloader.py helper to discover the instance and call
tasks.list. If they only name a configured root, call storage.settings.
Use storage.list to inspect the selected directory. Do not process a broad
shared root without an explicit, bounded scope.
- Classify files into movie, TV, one music recording, one complete album,
subtitle/sidecar, or unrelated content. Do not group unrelated media merely
because they share a directory.
- Call
media.recognize with the representative title or path. If uncertain,
call media.search; if several exact candidates remain, use
ask_user_choice. Never invent or translate an ID.
- Preserve the exact
media_source + media_id. For TV, verify season detail
with media.detail when numbering is ambiguous. For music, a recording is one
track, an album is one multi-track directory, and an artist is browse-only.
- When duplicate risk matters, call
library.exists. If an existing transfer
record affects reorganization, inspect transfer.history.
- Before a state-changing transfer, summarize the source, target identity,
media type, season/music entity, storage, and mode. Continue only when the
user's request already authorizes that exact action or after confirmation.
- Call
transfer.file once per verified unit. For an album, transfer the album
directory once only after its supported audio-file count is consistent with
the selected album detail.
- If requested, call
media.scrape after a successful transfer. Report actual
tag, cover, and lyrics counts; never assume all lyrics were found.
Structured Calls
- Directory listing:
storage.list with storage/path/paging/sort in body.
- Recognition:
media.recognize with title/path in query.
- Search:
media.search with title/type/source constraints in query.
- Detail:
media.detail with path_params.media_id and identity/type in query.
- Library check:
library.exists with the exact identity in query.
- Transfer:
transfer.file with the manual-transfer request in body.
- Actual transfer responses include
data.items even when the batch reports
failure. Inspect every item's state: accepted and retry_wait mean that
background work remains; only completed confirms execution and settlement.
manual_review requires resolving the task in the transfer queue first;
failed and skipped do not mean imported. Do not resubmit an entire batch
that already contains accepted or completed items. Preview responses remain
planning data and do not contain execution states.
- Scrape:
media.scrape with path_params.storage, file item in body, and
exact identity/type fields in query.
Stop and report instead of transferring when the source is missing, directory
configuration is absent, identity remains ambiguous, an album appears mixed or
incomplete, or the requested target would overwrite unrelated media.
1---2name: organize-files3description: Use this skill when the user asks MoviePilot to identify and organize a local or downloaded video/music file, season folder, recording, album directory, or mixed folder that automatic transfer did not handle. If failed transfer history IDs are supplied, use transfer-failed-retry instead.4---56# Organize Files78Use `moviepilot_api` for every MoviePilot business operation. Retired file,9recognition, transfer, and history tools are not available.1011## Workflow12131. Establish scope. If the user provides a path, use it. If they identify a14 downloader task, use `downloader-operation` and its fixed15 `scripts/mp-downloader.py` helper to discover the instance and call16 `tasks.list`. If they only name a configured root, call `storage.settings`.17 Use `storage.list` to inspect the selected directory. Do not process a broad18 shared root without an explicit, bounded scope.192. Classify files into movie, TV, one music recording, one complete album,20 subtitle/sidecar, or unrelated content. Do not group unrelated media merely21 because they share a directory.223. Call `media.recognize` with the representative title or path. If uncertain,23 call `media.search`; if several exact candidates remain, use24 `ask_user_choice`. Never invent or translate an ID.254. Preserve the exact `media_source` + `media_id`. For TV, verify season detail26 with `media.detail` when numbering is ambiguous. For music, a recording is one27 track, an album is one multi-track directory, and an artist is browse-only.285. When duplicate risk matters, call `library.exists`. If an existing transfer29 record affects reorganization, inspect `transfer.history`.306. Before a state-changing transfer, summarize the source, target identity,31 media type, season/music entity, storage, and mode. Continue only when the32 user's request already authorizes that exact action or after confirmation.337. Call `transfer.file` once per verified unit. For an album, transfer the album34 directory once only after its supported audio-file count is consistent with35 the selected album detail.368. If requested, call `media.scrape` after a successful transfer. Report actual37 tag, cover, and lyrics counts; never assume all lyrics were found.3839## Structured Calls4041- Directory listing: `storage.list` with storage/path/paging/sort in `body`.42- Recognition: `media.recognize` with title/path in `query`.43- Search: `media.search` with title/type/source constraints in `query`.44- Detail: `media.detail` with `path_params.media_id` and identity/type in `query`.45- Library check: `library.exists` with the exact identity in `query`.46- Transfer: `transfer.file` with the manual-transfer request in `body`.47- Actual transfer responses include `data.items` even when the batch reports48 failure. Inspect every item's `state`: `accepted` and `retry_wait` mean that49 background work remains; only `completed` confirms execution and settlement.50 `manual_review` requires resolving the task in the transfer queue first;51 `failed` and `skipped` do not mean imported. Do not resubmit an entire batch52 that already contains accepted or completed items. Preview responses remain53 planning data and do not contain execution states.54- Scrape: `media.scrape` with `path_params.storage`, file item in `body`, and55 exact identity/type fields in `query`.5657Stop and report instead of transferring when the source is missing, directory58configuration is absent, identity remains ambiguous, an album appears mixed or59incomplete, or the requested target would overwrite unrelated media.