AniFlow

Documentation

Media folders and libraries

How AniFlow sees your folders, what a library is, and how to mount them.

The four folders

AniFlow sees four folders inside its container. They come from the volumes: in your compose file.

FolderWhat it is
/configAniFlow's settings and log.
/dataIts database and cover cache. Back this up.
/mediaYour anime.
/downloadsWhere your download client saves, as AniFlow sees it.

In Shoko Server mode there is a fifth, optional folder, /import: the hand-over folder that Shoko watches. See Libraries and Shoko Server.

What a library is

A library is a name and one folder. Every anime on your watchlist belongs to exactly one library. You can have as many libraries as you like, for example /media/anime and /media/adult.

The libraries page is Libraries in the sidebar. There you can:

AniFlow needs at least one library with a folder. There is also a special library called Upcoming with no folder. It holds anime that have not started yet, because there is nothing to download for them. It cannot be removed or renamed; when an anime premieres you move it to one of your own libraries.

The folder picker only offers folders that exist in the container, so a folder you forgot to mount does not appear, and the system folders of the container (including /config, /data and /downloads) are not offered. If you type or open a folder that is missing, AniFlow says it does not exist in its container and asks whether it is mounted.

Moving a show between libraries

A show lives in one library, and you can change it:

The anime's folder moves with it. If a folder of the same name already exists in the destination, that anime stays where it is and is reported as not moved. When the files are already in the new folder, untick "Move the files too" and only the library changes. When you remove a library that still has anime in it, AniFlow asks where they should go; if the destination uses the same folder, their files are already in place and only the library changes.

One mount or one mount per library

There are two ways to give AniFlow its library folders:

Two libraries should not share a folder, and one library's folder should not sit inside another's. The Libraries page warns when they do ("Shares its folder with ..." or "Its folder is inside the folder of ..."), because AniFlow cannot tell their anime apart by where a file is.

If you set Settings -> Downloads to place files by hardlink, an episode takes space once on disk and the torrent keeps seeding. A hardlink only works when the download folder and the library are on the same filesystem and reachable through one mount. Two separate bind mounts of the same disk fail with "Invalid cross-device link", even though it is the same disk.

So for hardlinks, mount one parent folder and keep downloads and media inside it, in both AniFlow and your download client. For example, if your host has /mnt/tank/data containing downloads and media:

    volumes:
      - /docker/aniflow/config:/config
      - /docker/aniflow/data:/data
      - /mnt/tank/data:/data-share

Then the download client saves to /data-share/downloads and the library is /data-share/media/anime. The Checks page has a Hardlink placement check that tries a real link from the download folder into each library and says what to change. If hardlinks cannot work on your setup (for example a network share), choose Copy in Settings -> Downloads. See Importing: copy, move or hardlink.

Paths must match everywhere

AniFlow, your download client and, if you use it, Shoko Server must all reach the same files. In particular:

See Download clients for the client side.

Libraries and Shoko Server

In Shoko Server mode each library can be assigned to one of Shoko's import folders ("Assigned folder in Shoko"). Shoko Server mode is explained in Shoko Server; the parts that concern folders are these:

Mount /import on the same filesystem as /media if you can, so that Shoko moves files instead of copying them.

Check your folders

The Checks page (sidebar) tests every folder one at a time: AniFlow's settings and data folders, each library ("exists and can be written to", with free space), the download folder, the hand-over folder in Shoko mode, and hardlink placement. Each failing line says what to change, and Check again reruns it. In Shoko Server mode a library AniFlow only reads from is reported as readable rather than writable. See Troubleshooting and Checks.