Watch anything instantly just with a single command
Torrodle is a command-line program which search and gather magnet links of movies, tv shows, animes and porns from providers. It then streams the video via HTTP (along with its subtitles) and play it with a user preferred video player (such as vlc and mpv).
If you don't know what BitTorrent is, you shouldn't be using Torrodle. There are some copyrighted content which might be illegal downloading them in your country.
- Lightning fast ⚡️
- Simple to use 🚸
- Built-in torrent streaming client via HTTP (refined from
go-peerflix
) - Watch the video while it is being downloaded 🔰
- Query multiple providers in a single search 🔎
- Sorted results from 5 different providers at once 🚀
- Along with subtitles fetching for the video 📄
For installing the command-line tool only
Download the latest stable release of the binary at releases.
Make sure you have Go installed on your machine.
$ go get github.com/a1phat0ny/torrodle/cmd/...
$ go get github.com/a1phat0ny/torrodle
For installing the command-line tool only
$ git clone github.com/a1phat0ny/torrodle
$ cd torrodle
$ go build cmd/torrodle/main.go
Dependencies are listed in go.mod
file.
- logrus -- better logging
- goquery -- HTML parsing
- torrent -- torrent streaming
- osdb -- subtitles fetching from OpenSubtitles
- go-humanize -- humanizing file size words
- color -- colorized output
- tablewriter -- table rendering
- survey -- pretty prompting
Recommended video player: MPV
Enter torrodle
in your terminal. That's all !
This command will launch a wizard that will help you search for torrents.
Enter torrodle "magnet uri"
in your terminal. Choose your preferred video player and enjoy !
NOTE: For auto executing of video players, only MPV and VLC are supported.
For other video players, you can choose None
in video player options prompt and open your video player with the stream url.
Path to the config file: ~/.torrodle.json
{
"DataDir": "",
"ResultsLimit": 100,
"TorrentPort": 9999,
"HostPort": 8080,
"Debug": false
}
DataDir
(default:$TMPDIR/torrodle/
) : Directory where the directories of download files (and subtitles) will be stored.ResultsLimit
(default:100
) : Maximum count of results will be fetched from provider(s).TorrentPort
(default:9999
) : Listen port for the torrent client.HostPort
(default:8080
) : Listen port for HTTP localhost video streaming (http://localhost:<port>
).Debug
(default:false
) : Detailed debug messages will be printed to output iftrue
.
Type: string
CategoryAll
CategoryMovie
CategoryTV
CategoryAnime
CategoryPorn
Type: string
SortByDefault
SortBySeeders
SortByLeechers
SortBySize
Type: models.ProviderInterface
SukebeiProvider
(Sukebei
)ThePirateBayProvider
(The Pirate Bay
)LimeTorrentsProvider
(LimeTorrents
)Torrentz2Provider
(Torrentz2
)RarbgProvider
(RARBG
)LeetxProvider
(1337x
)YifyProvider
(YIFY
)
AllProviders
[...]models.ProviderInterface
-- an array that holds all the above providers
func ListProviderResults(provider models.ProviderInterface, query string, count int, category string, sortBy string) []models.Source
ListProviderResults lists all results queried from this specific provider only. It sorts the results and returns at most {count} results.
Example
sources := torrodle.ListProviderResults(torrodle.LeetxProvider, "the great gatsby", 50, torrodle.CategoryMovie, torrodle.SortBySeeders)
func ListResults(providers []interface{}, query string, count int, category string, sortBy string) []models.Source
ListResults lists all results queried from all the specified providers. It sorts the results after collected all the sorted results from different providers. Returns at most {count} results.
Example
You can pass in a slice of strings which are the names of the providers.
sources := torrodle.ListResults([]string{"1337x", "RARBG"}, "the great gatsby", 50, torrodle.CategoryMovie, torrodle.SortBySeeders)
You can also directly import torrodle/models
package and pass in a slice of the provider interfaces.
sources := torrodle.ListResults([]models.ProviderInterface{torrodle.LeetxProvider, torrodle.RarbgProvider}, "the great gatsby", 50, torrodle.CategoryMovie, torrodle.SortBySeeders)
// Source provides informational fields for a torrent source.
type Source struct {
From string // which provider this source is from
Title string // title name of this source
URL string // URL to the info page of this source
Seeders int // amount of seeders
Leechers int // amount of leechers
FileSize int64 // file size of this source in bytes
Magnet string // magnet uri of this source
}
// ProviderInterface is an interface that provides all the methods a `Provider` struct type has.
type ProviderInterface interface {
String() string // stringer
Search(string, int, CategoryURL) ([]Source, error) // search for torrents with a given (query, count, categoryURL) -> returns a slice of sources found
GetName() string // GetName returns the name of this provider.
GetSite() string // GetSite returns the URL (site domain) of this provider.
GetCategories() Categories // GetCategories returns the categories of this provider.
}
// Provider is a struct type that exposes fields for the `ProviderInterface`.
type Provider struct {
Name string
Site string
Categories Categories
}
torrodle/providers/leetx
-
Site: https://1337x.to/
-
Categories: Movie, TV, Anime, Porn (All)
torrodle/providers/rarbg
-
Site: http://rarbg.to/
-
Categories: Movie, TV, Porn
torrodle/providers/thepiratebay
-
Categories: Movie, TV, Porn
torrodle/providers/yify
-
Site: https://yts.am/
-
Categories: Movie
torrodle/providers/torrentz
-
Site: https://torrentz2.eu/
-
Categories: Movie, TV, Anime, Porn (All)
torrodle/providers/limetorrents
-
Categories: Movie, TV, Anime
torrodle/providers/sukebei
-
Site: https://sukebei.nyaa.si/
-
Categories: Porn (Japanese AV)
(*
recommended provider)
More providers comming soon !
The only provider for providing movies / tv series subtitles.
API client powered by oz/osdb.
- English
eng
- Chinese (simplified)
chi
- Chinese (traditional)
zht
- Arabic
ara
- Hindi
hin
- Dutch
dut
- French
fre
- Russian
rus
- Portuguese
por
This project is inspired by @Fabio Spampinato's cliflix.
Torrent streaming technique refined from @Sioro Neoku's go-peerflix.
Made with ❤️︎ by a1phat0ny
under MIT license