<aside> 🧑💻 This documentation is part of the Technical Kick-start Collection. If you’re a developer interested in contributing to Thea, or just looking to understand how Thea works on a deeper level, then I’d highly recommend reading through this collection.
</aside>
<aside> 🚧
The download service is a work in progress - Lots of details are still being figured out and this document is subject to sweeping changes.
</aside>
The download service is a new proposed service for Thea that would allow users to download content directly inside of Thea. The Download & Import documentation covers this on a high-level, however this service is the implementation behind only manual download of media. See Ingest Service for automated ingestion.
On a high level, this service:
Accepts requests from users to download media from a torrent magnet URL, along with an optional TMDB/IMDB ID for Hydration
If no match can be found, then the download cannot be started until the user provides us with a trouble resolution
Downloads the torrent to a temporary (configurable) location
Validates that the files downloaded are real media files using ffprobe
Performs Database Finalization.
Facilitates any relevant transcoding workflows by emitting success events back to Thea core via the event bus.
Due to the complexity of this service, a number of troubles can occur during the ingestion of media:
…
…
…