# Torsearch
Torsearch is a "media acquisition tool" that works strictly with Real Debrid. Torsearch makes it easy to search for 
and download your favorite movies and tv shows. You can think of it like Stremio, but without the streaming. Why the 
comparison to Stremio? That's because Torsearch uses the same source for media files that Stremio uses: Torrentio 
(hence the name: Torsearch).

After two failed attempts at running a media server, I decided to hang up my hat and give up my dream of a self-hosted 
media server. I figured the days of torrenting were mostly over and everybody ranting & raving about their media collections 
must be going to Walmart and buying up the bucket of old movies they have. That's until I stumbled across Stremio.

At first, it seemed too good to be true, but I was yearning for something just sketchy enough to try out. What could 
go wrong with handing over my card information to an unknown organization across the pond? At the end of the day, 
the cost benefit analysis landed in my favor, and about 30 minutes after purchasing my Real Debrid subscription and 
setting up Stremio, I was in business.

My mind was blown. I might not have the most "cultured" taste in media, but it had everything I searched for and more! After 
watching a few movies, I noticed the "Copy Download Link" button. "What's this lil guy do?" I asked myself. Duh, it 
downloads the f*****g movie. And there's the 💡flashing over my head. There's gotta be a way to automate this, I told myself.

After a month of studying Stremio's code and lots of tinkering, I finally figured it out. Torrentio is the magic behind 
the scenes. You feed it a Real Debrid API key and an IMDB ID, and it gives you a list of results to download that media. 
Easy peasy.

In about an hour I had a proof of concept working. It wasn't pretty, but it wasn't supposed to be. That proof-of-concept 
has blossomed into the beautiful Torsearch that I've been using nearly every day since then. The code in this repo 
is a complete re-write of the proof-of-concept that started out ugly and ended up even uglier. Knowing the core functionality 
required to make it work, I was able to re-write the app with some design patterns in place.

## Pics or didn't happen
![Torsearch Homepage](https://code.caldwell.digital/home/torsearch/raw/branch/main/docs/img/torsearch_homepage.png)
![TV Show Result](https://code.caldwell.digital/home/torsearch/raw/branch/main/docs/img/torsearch_severance.png)
![TV Show Episodes](https://code.caldwell.digital/home/torsearch/raw/branch/main/docs/img/torsearch_severance_episodes.png)
![TV Show Episode Results](https://code.caldwell.digital/home/torsearch/raw/branch/main/docs/img/torsearch_severance_results.png)
![TV Show Movie Results](https://code.caldwell.digital/home/torsearch/raw/branch/main/docs/img/torsearch_inception_results.png)

## Features
- Search for Movies & TV Shows by their name
- Download directly to your NAS
- Monitor TV Shows for new episodes and automatically download them
- Browse popular media and view its download options
- LDAP or local auth (OIDC coming soon)

## Features on the roadmap
- Requests - allow users to request new media
- OIDC auth
- Prometheus logging

## Getting Started
1. Clone the repo

