TPTito Pinardo Gutiérrez
← Back to the rack
Español
1U · LIBRARY*arr · profiles · subtitles In production

Slot 13 of 25 in the rack · In production

1U unit · Media

The automated library

Spanish-first profiles

A set of services doing the boring work of a big library: when someone at home asks for a film or series, they make sure it arrives with the right name, its metadata, the quality and language I chose and its subtitles, and that Plex finds it.

Why
Sorting thousands of files by hand can't be kept up. With profiles and rules, the library stays tidy on its own.
What it decides
Quality and language profiles: Spanish first, and for anime, Japanese with subtitles as fallback.
Where it's seen
Panels only from home or the VPN, behind the internal door with two-factor.
  • 3,295video files checked
  • 41films in the wrong language, cleaned up
  • +74 GBof disk after a «database or disk is full»
  • 2FAto get into any panel

Its code, in the open Public version of the repo: no IPs or secrets.

Inside the library

Ask for something and have it arrive with a good name, in the household's quality and language and with subtitles: all hands-off. Pick a flow.

Hermesvisiting the unit

Click a part or pick a flow. If you came from a skill, the parts where I use it are already lit.

      Someone requests a film
      1. The family — Someone at home requests a film from the requests site.
      2. Requests — The request goes to the film manager.
      3. Film manager — The film manager looks for it.
      4. Quality and language profiles — The profiles decide which version is acceptable: Spanish, good quality, sensible size.
      5. Import — When it arrives, it's imported.
      6. Names and folders — With its title and year, in its folder.
      7. Hard links — Moved with a hard link: nothing copied.
      8. The library pool — Onto the pool.
      9. Subtitles — Its subtitles arrive.
      10. Plex — Plex finds it first time.
      11. The family — And it shows up on the TV.
      I check the managers
      1. Internal door — I open a panel from home.
      2. Authelia — Authelia asks for two-factor.
      3. Stack manager — From the stack manager I see the containers.
      4. Series manager — I check the series.
      5. Quality and language profiles — And tweak a profile.
      An import that can't be automatic
      1. Series manager — The series manager warns: it can't import something on its own.
      2. Import — Automatic import is blocked.
      3. The managers' API — Through the API I say which episode each file is.
      4. Import — The import completes.
      5. Names and folders — With the right names.
      6. Plex — And it shows up in Plex.
      A film that won't play
      1. Plex — Plex shows a «network error» when playing a film.
      2. Inspect a file — Before touching the network, I look inside the file.
      3. The library pool — On the pool, the file takes up much less than its stated size.
      4. Inspect a file — The first megabytes are zeros: the file is broken, not the network.
      5. Film manager — The manager flags it to get it again.
      The database runs out of room
      1. Film manager — The film manager starts failing.
      2. Managers' database — Its database says «database or disk is full».
      3. Container disk — The container's disk was nearly full.
      4. Monitoring — Monitoring had it in red.
      5. Container disk — The disk is grown live.
      6. Managers' database — And the database works again, nothing lost.
      1. The family

        Asks for what they want to watch from a simple website.

      2. Plex

        Where everything ends up. It has its own unit.

      3. Internal door

        The way into the panels.

      4. The library pool

        Where the files live.

        • ZFS
      5. Requests

        A website to request films and series, which hands them to the managers.

        • Docker
      6. Plex statistics

        What's watched, when and how: if something converts too often, it shows here.

        • Docker
      7. Authelia

        Two-factor in front of every panel.

        • Linux / SSH hardening
      8. Stack manager

        Each group of services is a Docker Compose stack.

        • Docker
      9. Film manager

        Knows which films there are, which are missing and in what quality.

        • Docker
      10. Series manager

        The same, by season and episode.

        • Docker
      11. Quality and language profiles

        The rules for which version is best: Spanish first, good quality without going overboard on size.

        • Docker
      12. Subtitles

        Finds and syncs missing subtitles.

        • Docker
      13. Import

        When a file arrives, it's identified and moved into place.

      14. Names and folders

        Title and year, always the same: so Plex recognises it first time.

      15. The managers' API

        When automatic import can't, the API lets you do it by hand, precisely.

        • Python
      16. Managers' database

        Each manager keeps what it knows about the library in SQLite.

      17. Container disk

        Where those databases live. If it fills up, they fail.

        • LXC
      18. Inspect a file

        Look inside a file that won't play, before blaming the network.

        • Linux (Debian, Alpine, Arch)
      19. Monitoring

        Watches the disks and the Docker containers.

        • Zabbix

      What I use from my skill tree

      Pick a skill: the parts where I use it light up on the map and I tell you what for.

      LXC
      The server's Docker container, with its disk grown when needed.
      ZFS
      The library on its pool, with hard links to move without copying.
      Docker
      Each service in its container, grouped into Docker Compose stacks.
      Linux (Debian, Alpine, Arch)
      ffprobe to look inside files.
      Zabbix
      Watches the disks and containers.
      Linux / SSH hardening
      Panels only behind the internal door with two-factor.
      Python
      Scripts against the managers' API for manual imports and reviews.

      Incident log

      Real failures. Read the symptom, pick the cause you think it was and see how it was fixed.

      1. #1

        «database or disk is full»

        03-08-2026 · disk

        The film manager logged 60 database errors in ten minutes.

        What do you think was going on?

        Show the fix
        Cause
        It wasn't the library, which has its own pool, but the container's disk, where the databases, Docker images and logs live.
        Fix
        Grow the container disk by 74 GB from the hypervisor, without stopping it.
        Lesson
        «Disk full» doesn't say which disk. Check which one before deleting anything from the library.
      2. #2

        A whole season that wouldn't import

        11-07-2026 · import

        A full season had arrived and sat in the queue as finished, but the manager refused to import it and the episodes didn't appear.

        What do you think was going on?

        Show the fix
        Cause
        With the whole season in one block, the manager knew which series it was but not which file was which episode, and blocks the import so as not to get it wrong.
        Fix
        Import by hand through the API, specifying each episode. Documented as a procedure.
        Lesson
        When an automation stops out of caution, the way out isn't to bypass it but to give it the data it's missing.
      3. #3

        A «network error» that wasn't the network

        04-09-2026 · playback

        A film gave a network error when played in Plex, on any device.

        What do you think was going on?

        Show the fix
        Cause
        The file had its first megabytes zeroed and took up much less on disk than its stated size: it was incomplete. Plex reported it as a network error.
        Fix
        Confirm it by looking inside the file and ask the manager to get it again.
        Lesson
        An error message describes where it was noticed, not where the fault is. Look at the data before the path.

      How it was built

      1. Summer 2026

        A tidy library

        • Film and series managers, subtitles and requests.
        • Spanish profiles and a clean-up of what was in another language.
      2. September 2026

        Behind the internal door

        • Every panel with two-factor and only from home or the VPN.

      Decisions (and why)

      • How the version is chosen

        Explicit profiles

        Deciding case by case doesn't scale. A profile says which language, quality and size are acceptable and the manager always applies the same.

      • How files are moved

        Hard links on the same pool

        Copying would double space and time. With hard links moving is instant and takes no extra room.

      What I learned

      • Rules before manual work: profiles sort better than I do.
      • Read carefully which disk is full and what's really broken.

      What's next

      • Manager notifications in a room of their own instead of checking them by hand.

      Shall we talk?

      I can walk through any of these decisions in detail in an interview.

      Download CV Get in touch ← Back to the rack

      Told generically on purpose, as in the lab: no sources, downloads or titles.