MediaManager Help

Developer Guide

This section is for those who want to contribute to Media Manager or understand its internals.

Source Code

  • media_manager/: Backend FastAPI application

  • web/: Frontend SvelteKit application

  • Writerside/: Documentation

  • metadata_relay/: Metadata relay service

Backend Development

  • Uses uv for dependency management

  • Follows standard FastAPI project structure

  • Database migrations are handled by Alembic

Frontend Development

  • Uses npm for package management

  • SvelteKit with TypeScript

Contributing

  • Consider opening an issue to discuss significant changes before starting work

Sequence Diagrams

SchedulerQBittorrentTorrent ServiceIndexer ServiceDatabaseFile SystemMetadataProviderServiceTV ServiceTV RouterUserSchedulerQBittorrentTorrent ServiceIndexer ServiceDatabaseFile SystemMetadataProviderServiceTV ServiceTV RouterUserThis associates a season with a torrent id and the file_path_suffixHourly scheduler triggerif a torrent is finished downloading it will be importedExtracts archives, guesses mimetype (Video/Subtitle/Other)filters files based on some regex and renames themUser can now access the show in e.g. JellyfinAdd a show (POST /tv/shows)Receive Show RequestGet Metadata for ShowSave Poster ImageStore show informationGet Available Torrents for a Season (GET /tv/torrents)Receive RequestSearch for torrentsReturns Public Indexer ResultsDownload Torrent (POST /tv/torrents)Receive RequestSaves a SeasonFile objectDownload TorrentSave TorrentfileDownload Torrentauto_import_all_show_torrents()Get all Shows and seasons which are associated with a torrentUpdate Torrent download statusesget all files in the torrents directoryMove/Hardlink video and subtitle filesStep-by-step: going from adding a show to importing a torrent of one of its seasons

Tech Stack

Backend

  • Python with FastAPI

  • SQLAlchemy

  • Pydantic and Pydantic-Settings

Frontend

  • TypeScript with SvelteKit

  • Tailwind CSS

  • shadcn-svelte

CI/CD

  • GitHub Actions

01 July 2025