Documentation
Shoko Server
Connect Shoko Server, adopt its series, and let AniFlow hand files over.
What the integration is for
Shoko Server is a separate program that identifies anime files against AniDB, renames them and files them into a library. AniFlow can work alongside it in two ways:
- It hands finished downloads to Shoko and then finds out where Shoko put each file, so AniFlow always knows the file's final name and folder.
- It reads what Shoko knows - series, episodes, import folders, files it could not identify - to show you what is missing and to put the series Shoko holds on your watchlist.
Shoko is optional. Without it AniFlow runs in standalone mode and manages the library itself.
Standalone mode or Shoko Server mode
This is one of the first questions in the setup wizard (Who organises your library?):
| Mode | What happens to a finished download |
|---|---|
| AniFlow manages it (standalone) | AniFlow places the file in your library and names it. AniFlow is the only thing that writes there. |
| Shoko Server manages it | AniFlow puts the file in a hand-over folder. Shoko identifies, renames and files it. AniFlow then finds it again. |
The wizard says it plainly: This choice cannot be changed later. Once files exist, switching would split your library in two. The episodes AniFlow already placed would keep their names while new ones go wherever Shoko puts them, and neither side would know about the other. The mode is recorded in AniFlow's database; a stale environment variable cannot override it (AniFlow logs a warning and carries on in the recorded mode). The choice can still be changed in the wizard until setup is finished.
In standalone mode the Shoko Server page and the Shoko Server tab in Settings are hidden, since there is no Shoko in the pipeline.
Connecting to Shoko
Enter the connection in the setup wizard (The programs AniFlow talks to), or later in Settings -> Shoko Server:
- URL - the address of your Shoko Server as reachable from the AniFlow container, for example
http://192.168.1.10:8111(example address; use your own). - API key - Shoko's own API key from its settings. AniFlow never asks for your Shoko password. Once set, leave the field empty to keep the stored key.
- Press Test connection.
The URL and key are optional for the hand-over itself, which works through folders and needs no credentials. They are what lets AniFlow read from Shoko. The status line in the page header says Shoko Server connected, refused the key, unavailable or not set up. If Shoko is unreachable, the file hand-over is unaffected; only what Shoko can tell AniFlow is.
The hand-over
In Shoko Server mode, a finished download takes this path:
- AniFlow puts the file in the import folder, a folder per anime, keeping the release's own file name. Mount this folder into the AniFlow container at
/import. The line indocker-compose.ymlis commented out by default; remove the#and setIMPORT_HOST_PATH. Put it on the same dataset as/mediaso Shoko moves files instead of copying them. In Shoko this folder must be an import folder that Shoko watches (a drop source). - AniFlow asks Shoko to run its import (the same as pressing Run Import in Shoko). Shoko also checks on its own schedule.
- Shoko identifies the file, renames it and moves it into your library.
- AniFlow finds the file again and records its final folder and file name. It does not guess from titles. A file is recognised by, in this order: its inode (a move within one filesystem keeps it), then the CRC32 in the release name, then an exact file size when only one file has that size. A file none of these finds stays waiting.
While it waits, the episode reads Waiting for Shoko. If the file is still in the import folder after six hours, the episode shows a warning that Shoko has not filed it. This is often because the release is too new for AniDB, which resolves itself. Two buttons help: Run Shoko import, and Open Shoko, where you can hash the file and add it to AniDB. If Shoko took the file but it never turned up in the library, the row says so; it was most likely treated as a duplicate of an episode you already have.
Libraries linked to a Shoko folder
A library can be assigned to one of Shoko's import folders (Assigned folder in Shoko when editing a library on the Libraries page). For an anime in such a library, AniFlow skips the hand-over folder, writes the file straight into the library folder and Shoko recognises it there. AniFlow then asks Shoko to run its import. A library with no assigned folder keeps using the hand-over folder. See Media folders and libraries.
Match Shoko folders (Libraries page, Shoko mode only) lists Shoko's import folders with their state. Next to each folder that can hold a library is an Add library button, which opens the Add library window with the Shoko folder already assigned. A Source folder is a drop point, not a library. AniFlow warns when Shoko is not watching a folder, or when the assigned folder no longer exists.
Turn off Move on Import in Shoko. Otherwise Shoko may move files into a different library than the one AniFlow chose. With it off, AniFlow controls the file location and Shoko only recognises the file. If Shoko does move a file to another library anyway, the anime follows the file and a warning appears in the Activity log.
The Shoko Server page
The Shoko Server entry in the navigation (Shoko mode only) shows what Shoko reports, read-only. If AniFlow is not connected, the page says so and links to Settings.
- Library - server state, number of series, files and size, and Files Shoko could not identify. Two "missing" numbers are shown and labelled, because they answer different questions: Missing, as Shoko counts it and Missing, counting every episode AniDB lists (which includes episodes that have not aired yet).
- Import folders - each folder's path, its type, and whether Shoko is watching it. If the hand-over folder is not one Shoko watches, nothing will ever be picked up, and this is where you notice.
- Take everything onto the watchlist - see below.
- Incomplete series on Shoko - the series where AniDB lists more episodes than Shoko holds. Hide anime already on the watchlist leaves out the ones AniFlow already looks after. Click a series for its page: every episode marked in library or missing, and a button.
- A series page offers Add to AniFlow watchlist when it is not there yet, and Open on watchlist or Open to find missing episodes when it is. To fetch missing episodes, use Choose release on the anime's page.
There is no separate "Only in Shoko" list any more; a series Shoko holds is simply an ordinary watchlist entry once adopted. A Refresh button re-reads Shoko, which is also remembered between visits.
Adopting series into the watchlist
Take everything from Shoko puts every series Shoko holds that is not on the watchlist onto it and fills in what can be read: cover, subgroup, quality and episodes, from Shoko's files. It downloads nothing and asks no tracker. Series are matched to AniFlow's watchlist by AniDB id (and MyAnimeList id where Shoko states one). For a series the downloaded calendar does not know, AniFlow builds the entry from the AniDB title list and Shoko's own episode count. Series without an AniDB id may not be adoptable; the result line says why. The button reports how many were added and filled in, and lists what could not be filled in.
Adoption runs when you press the button, or from the Schedule page (Shoko: Importing Shoko's library, manual only). It does not run on its own timer. A single series can be added from its own page on the Shoko Server page.
Fill in missing, with Shoko
Fill in missing in an anime's Edit dialog (and Fix missing details on its page) asks the calendar first, then your chosen metadata source, and last Shoko Server when it is connected: picture, description, genres, studio and more. Shoko is only used for what is still empty, and your own edits are never overwritten. For a whole watchlist at once, the Schedule page has Watchlist: Fill in missing (all anime), manual only.
What AniFlow does to Shoko
AniFlow reads from Shoko. It never calls Shoko's MyList synchronisation (SyncMyList), which can queue mass deletions on your AniDB account, and it has no button or task that could. A test in AniFlow's source guards this. Nothing in AniFlow changes your AniDB account.
Everything AniFlow does to Shoko is one of these:
- Reads of series, episodes, files, import folders, posters and Shoko's cached AniDB records.
- Run import - asks Shoko to scan its import folders. AniFlow does this after it hands over or places files, after moving anime between libraries, and when you press Run Shoko import. It is the same as pressing Run Import in Shoko.
- Fetching an AniDB record - only when you press Look it up in the numbering step of the setup dialog for a show whose episode numbering needs it, AniFlow may ask Shoko to fetch an AniDB entry Shoko has never seen into its cache. This goes through Shoko's own AniDB connection and adds nothing to your library or your AniDB list.
AniFlow does not create series, delete files, change settings or rename anything inside Shoko. Deleting an anime in AniFlow does not touch Shoko; see Watchlist and adding anime.
AniFlow itself never fetches AniDB web pages. Its AniDB title list is the published title dump, fetched at most weekly, and the AniDB page (your My List) is built from an export file you upload.