Tool to download movies and TV shows
A tool to download your TV shows and movies.
Vodafone decides to throttle the bandwidth during the evenings, so I have to resort to downloading
my media locally during the day.
go
, version 1.11+libc
arm-linux-gnueabihf-gcc
and arm-linux-gnueabihf-g++
To compile it, just run make build
. The result is the couch
executable, which can immediately be run to get a list
of commands.
couch run
runs a web server and polls the providers for new mediacouch auth trakt
will start auth process to Trakt.tvcouch auth realdebrid
will start auth process to Real-Debrid (optional, only if you use HTTP download instead of torrent)The configuration is created after the first couch run
. It’s a JSON string stored in the config
table in a SQLite database.
Some options are also editable through the web interface at localhost:8080
.
The authentication procedures must be started after you have run couch run
at least once (database must be created).
After modifying the config, you must restart the application for the new settings to take effect.
couch
works in a pipeline fashion. It uses four pipelines (stages) to download a file.
Related files:
cmd/run.go
pkg/media
pkg/download
pkg/magnet
If the program crashes during download, or any other procedure it will continue after it is restarted. The progress
status is tracked in the database, and the state machine knows where to restart from.
If the selected downloader is torrent
, then couch
will download the torrent through TCP or uTP depending on how it
was built. Unfortunately, the torrent package will always keep the folder structure when downloading a single file
from the torrent. This means when a movie or TV show will be downloaded it will have the torrent name as a parent folder.
The http
flow will push the magnet to Real-Debrid, and once it’s downloaded on the remote
server, couch
will start downloading the file to the directory specified in the config.