qbittorrent

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 19 Imported by: 0

README

go-qbit

Wrapper for qBittorrent Web API (> v3.1.x)

Forked from KnutZuidema/go-qbittorrent

Example
package main

import (
	"fmt"
	qbittorrent "github.com/5rahim/go-qbit"
)

func main() {
	client := qbittorrent.NewClient(&qbittorrent.NewClientOptions{
		Username: "",
		Password: "",
		Port:     8080,
		Host:     "127.0.0.1",
		BinaryPath: "C:/Program Files/qBittorrent/qbittorrent.exe",
	})
	
	err := client.Login()
	if err != nil {
		fmt.Printf("failed to login: %v\n", err)
	}
	
	err = client.Start()
	if err != nil {
		fmt.Printf("failed to start qBittorrent: %v\n", err)
	}
}
qBittorrent settings
  1. Go to Options > Web UI
  2. Check the box for Web User Interface (Remote Control)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProgramIsRunning

func ProgramIsRunning(name string) bool

Types

type Client

type Client struct {
	Username    string
	Password    string
	Port        int
	Host        string
	BinaryPath  string
	Application qbittorrent_application.Client
	Log         qbittorrent_log.Client
	RSS         qbittorrent_rss.Client
	Search      qbittorrent_search.Client
	Sync        qbittorrent_sync.Client
	Torrent     qbittorrent_torrent.Client
	Transfer    qbittorrent_transfer.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts *NewClientOptions) *Client

func (*Client) CheckStart

func (c *Client) CheckStart() bool

func (*Client) Login

func (c *Client) Login() error

func (*Client) Logout

func (c *Client) Logout() error

func (*Client) Start

func (c *Client) Start() error

type NewClientOptions

type NewClientOptions struct {
	HTTPS      bool
	Username   string
	Password   string
	Port       int
	Host       string
	BinaryPath string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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