bukanir

package
v0.0.0-...-1b39c6a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2022 License: GPL-3.0 Imports: 39 Imported by: 0

README

Documentation

Overview

Package bukanir streams movies from bittorrent magnet links

Index

Constants

View Source
const (
	CategoryMovies   = 201
	CategoryHDmovies = 207
	CategoryTV       = 205
	CategoryHDTV     = 208
)

Movies categories

View Source
const (
	LibName    = "libtorrent-rasterbar"
	LibVersion = lt.LIBTORRENT_VERSION
)
View Source
const (
	Version = "2.5"
)

Constants

Variables

Movies categories

View Source
var EztvHosts = []string{
	"eztv.re",
	"eztv.ag",
	"eztv.wf",
	"eztv.tf",
	"eztv.yt",
}

EZTV hosts

View Source
var TpbHosts = []string{
	"apibay.org",
}

TPB hosts

View Source
var TpbTor string = "piratebayo3klnzokct3wt5yyxb2vpebbuyjl7m623iaxmqhsd52coid.onion"

TPB onion url

Functions

func AutoComplete

func AutoComplete(query string, limit int) (string, error)

AutoComplete completes search queries

func Cancel

func Cancel()

Cancel cancels context

func Cast

func Cast(id int, limit int, force int, cacheDir string, cacheDays int64, tpbHost string) (string, error)

Cast returns movies by cast

func Category

func Category(category int, limit int, force int, cacheDir string, cacheDays int64, tpbHost string) (string, error)

Category returns movies by category

func Crew

func Crew(id int, limit int, force int, cacheDir string, cacheDays int64, tpbHost string) (string, error)

Crew returns movies by crew

func Genre

func Genre(id int, limit int, force int, cacheDir string, cacheDays int64, tpbHost string) (string, error)

Genre returns movies by genre

func Genres

func Genres() (string, error)

Genres returns all genres

func IsValidCategory

func IsValidCategory(category int) bool

IsValidCategory checks if category is valid

func Languages

func Languages() string

Languages returns all supported languages

func NewEztv

func NewEztv(host string) *eztv

NewEztv returns new eztv

func NewTmdb

func NewTmdb(api_key string) *tmdb

NewTmdb returns new tmdb

func NewTor

func NewTor(user, port, ctrlPort, dataDir string) *tor

NewTor returns new tor

func NewTpb

func NewTpb(host string) *tpb

NewTpb returns new tpb

func Popular() (string, error)

Popular returns popular movies

func Search(query string, limit int, force int, cacheDir string, cacheDays int64, pages int, tpbHost, eztvHost, sortBy, media string) (string, error)

Search returns movies by search query

func SetVerbose

func SetVerbose(v bool)

SetVerbose sets verbosity

func Subtitle

func Subtitle(movie string, year string, release string, language string, category int, season int, episode int, imdbID string) (string, error)

Subtitle returns movie subtitles

func Summary

func Summary(id int, category int, season int, episode int) (string, error)

Summary returns movie summary

func TopRated

func TopRated() (string, error)

TopRated returns top rated movies

func TorRunning

func TorRunning() bool

TorRunning checks if tor is started

func TorStart

func TorStart() error

TorStart starts tor

func TorStop

func TorStop() error

TorStop stops tor

func TorrentFiles

func TorrentFiles() (string, error)

TorrentFiles returns torrent files

func TorrentLargestFile

func TorrentLargestFile() string

TorrentLargestFile returns largest file from torrent

func TorrentRunning

func TorrentRunning() bool

TorrentRunning checks if torrent is started

func TorrentShutdown

func TorrentShutdown()

TorrentShutdown shutdowns torrent

func TorrentStartup

func TorrentStartup(config string)

TorrentStartup starts torrent services

func TorrentStatus

func TorrentStatus() (string, error)

TorrentStatus returns torrent status

func TorrentStop

func TorrentStop()

TorrentStop stops torrent

func TorrentWaitStartup

func TorrentWaitStartup() bool

TorrentWaitStartup waits for torrent to start

func Trailer

func Trailer(videoId string) (string, error)

Trailer returns extracted video url

func UnzipSubtitle

func UnzipSubtitle(url string, dest string) (string, error)

UnzipSubtitle unzip subtitle

Types

type ByScore

type ByScore []TSubtitle

Sort subtitles by score

func (ByScore) Len

func (a ByScore) Len() int

func (ByScore) Less

func (a ByScore) Less(i, j int) bool

func (ByScore) Swap

func (a ByScore) Swap(i, j int)

type BySeasonEpisode

type BySeasonEpisode struct {
	// contains filtered or unexported fields
}

Sort movies by season/episodes

func (*BySeasonEpisode) Len

func (a *BySeasonEpisode) Len() int

func (*BySeasonEpisode) Less

func (a *BySeasonEpisode) Less(i, j int) bool

func (*BySeasonEpisode) Sort

func (a *BySeasonEpisode) Sort(movies []TMovie)

func (*BySeasonEpisode) Swap

func (a *BySeasonEpisode) Swap(i, j int)

type BySeeders

type BySeeders []TMovie

Sort movies by seeders

func (BySeeders) Len

func (a BySeeders) Len() int

func (BySeeders) Less

func (a BySeeders) Less(i, j int) bool

func (BySeeders) Swap

func (a BySeeders) Swap(i, j int)

type ByTSeeders

type ByTSeeders []TTorrent

Sort torrents by seeders

func (ByTSeeders) Len

func (a ByTSeeders) Len() int

func (ByTSeeders) Less

func (a ByTSeeders) Less(i, j int) bool

func (ByTSeeders) Swap

func (a ByTSeeders) Swap(i, j int)

type Config

type Config struct {
	Uri                 string `json:"uri"`
	BindAddress         string `json:"bind_address"`
	FileIndex           int    `json:"file_index"`
	MaxUploadRate       int    `json:"max_upload_rate"`
	MaxDownloadRate     int    `json:"max_download_rate"`
	DownloadPath        string `json:"download_path"`
	UserAgent           string `json:"user_agent"`
	KeepFiles           bool   `json:"keep_files"`
	Encryption          int    `json:"encryption"`
	NoSparseFile        bool   `json:"no_sparse_file"`
	PeerConnectTimeout  int    `json:"peer_connect_timeout"`
	RequestTimeout      int    `json:"request_timeout"`
	TorrentConnectBoost int    `json:"torrent_connect_boost"`
	ConnectionSpeed     int    `json:"connection_speed"`
	ListenPort          int    `json:"listen_port"`
	MinReconnectTime    int    `json:"min_reconnect_time"`
	MaxFailCount        int    `json:"max_fail_count"`
	RandomPort          bool   `json:"random_port"`
	DhtRouters          string `json:"dht_routers"`
	Trackers            string `json:"trackers"`
	Proxy               bool   `json:"proxy"`
	ProxyHost           string `json:"proxy_host"`
	ProxyPort           int    `json:"proxy_port"`
	Verbose             bool   `json:"verbose"`
}

type FileStatusInfo

type FileStatusInfo struct {
	Name     string  `json:"name"`
	SavePath string  `json:"save_path"`
	Url      string  `json:"url"`
	Size     int64   `json:"size"`
	Offset   int64   `json:"offset"`
	Download int64   `json:"download"`
	Progress float32 `json:"progress"`
}

type LsInfo

type LsInfo struct {
	Files []FileStatusInfo `json:"files"`
}

type SessionStatus

type SessionStatus struct {
	Name          string  `json:"name"`
	State         int     `json:"state"`
	StateStr      string  `json:"state_str"`
	Error         string  `json:"error"`
	Progress      float32 `json:"progress"`
	DownloadRate  float32 `json:"download_rate"`
	UploadRate    float32 `json:"upload_rate"`
	TotalDownload int64   `json:"total_download"`
	TotalUpload   int64   `json:"total_upload"`
	NumPeers      int     `json:"num_peers"`
	NumSeeds      int     `json:"num_seeds"`
	TotalSeeds    int     `json:"total_seeds"`
	TotalPeers    int     `json:"total_peers"`
}

type TConfig

type TConfig Config

TConfig type

type TFileInfo

type TFileInfo FileStatusInfo

TFileInfo type

type TGenre

type TGenre struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

TGenre type

type TItem

type TItem struct {
	Title string `json:"title"`
	Year  string `json:"year"`
}

TItem type

type TLsInfo

type TLsInfo LsInfo

TLsInfo type

type TMovie

type TMovie struct {
	Id           int    `json:"id"`
	Title        string `json:"title"`
	Year         string `json:"year"`
	PosterSmall  string `json:"posterSmall"`
	PosterMedium string `json:"posterMedium"`
	PosterLarge  string `json:"posterLarge"`
	PosterXLarge string `json:"posterXLarge"`
	Size         int64  `json:"size"`
	SizeHuman    string `json:"sizeHuman"`
	Seeders      int    `json:"seeders"`
	MagnetLink   string `json:"magnetLink"`
	Release      string `json:"release"`
	Category     int    `json:"category"`
	Season       int    `json:"season"`
	Episode      int    `json:"episode"`
	Quality      string `json:"quality"`
}

TMovie type

type TStatus

type TStatus SessionStatus

TStatus type

type TSubtitle

type TSubtitle struct {
	Id           string  `json:"id"`
	Title        string  `json:"title"`
	Year         string  `json:"year"`
	Release      string  `json:"release"`
	DownloadLink string  `json:"downloadLink"`
	Score        float64 `json:"score"`
}

TSubtitle type

type TSummary

type TSummary struct {
	Id         int      `json:"id"`
	Cast       []string `json:"cast"`
	CastIds    []int    `json:"castIds"`
	Genre      []string `json:"genre"`
	Video      string   `json:"video"`
	Director   string   `json:"director"`
	DirectorId int      `json:"directorId"`
	Rating     float64  `json:"rating"`
	TagLine    string   `json:"tagline"`
	Overview   string   `json:"overview"`
	Runtime    int      `json:"runtime"`
	ImdbId     string   `json:"imdbId"`
}

TSummary type

type TTorrent

type TTorrent struct {
	Title          string
	FormattedTitle string
	MagnetLink     string
	Year           string
	Size           int64
	SizeHuman      string
	Seeders        int
	Category       int
	Season         int
	Episode        int
}

TTorrent type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL