Code Monkey home page Code Monkey logo

qbittorrent-cli's People

Contributors

brw avatar fabricionaweb avatar jmechnich avatar klahaha avatar ludviglundgren avatar mikluko avatar s0up4200 avatar xel86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

qbittorrent-cli's Issues

delete add --magnet flag?

thanks for quick merge!! i just replaced qbc with qbt

for easy use maybe delete --magnet flag of add command? (can keep for compatibility)

first check if file exists for arg1, if not check if start with magnet: try to add as magnet. very small chance that you add a .torrent file name "magnet:SOMETHING.torrent" so check for file first (qbt hash command has same problem)

Pr welcome?

Outdated README.md and misleading command descriptions

In my humble opinion, all detailed descriptions of available commands should be removed from the README.md. The information is no longer in sync in the code (e.g. flags for individual commands have been added). It might be sufficient to list all available commands and point out the help flag.

Also, some statements in command descriptions seem to be no longer true, such as for the remove command:

Removes torrents indicated by hash, name or a prefix of either. Whitespace indicates next prefix unless argument is surrounded by quotes.

As pointed out by a user in #84, using a prefix does not work. Consequently, the descriptions should be checked and updated where required.

@ludviglundgren if you agree I am happy to prepare a PR that reflects my suggestions. On a side note, I have submitted a formula for qbittorrent-cli to Homebrew for the convenience of Mac users such as myself.

Site dosent work

I got this error
qbt list
login error: Post "http://127.0.0.1:6776/api/v2/auth/login": dial tcp 127.0.0.1:6776: connect: connection refused

ERROR: could not pause torrents could not setCategory torrents

I am unable to execute this command:
qbt torrent category move --from freeleech --to completed --min-seed-time 10100
the output is

Found 2 matching torrents to move from (freeleech) to (completed)
ERROR: could not pause torrents could not setCategory torrents: [0e19de68217a28d7b9c1911f2b2001c08a1fe3aa 990520868b6b401db82877431bfe0addda837bbb] unexpected status: 409

I can manually pause a single torrent using qbt torrent pause --hashes abc123

Is this a bug or can I do more to troubleshoot on my end?

qbt - qbitttorrent cli
Version: 2.0.0
Commit: f46c1b5edf8ecf1ad181ef05c6742922af07cbd3
Date: 2023-09-24T16:38:19Z

I am running qbittorrent 4.5.5 - is this the issue?

dev branch: compare over https

I want to use a remote server as compare-host over https.
Getting the following error when setting https in the toml.

[[compare]]
addr     = "https://URL/qbittorrent"

ERROR: connection failed to compare: http: read on closed response body

Edit: with a few hacks, I managed to get https working.
Changed this in client.go

	// set basic auth
	c.setBasicAuth(req)

	resp, err := c.http.Do(req)
	if err != nil {
		return nil, errors.Wrap(err, "could not make request")
		defer resp.Body.Close()
	}

	return resp, nil

̶ ̶̶̶A̶n̶d̶ ̶s̶e̶t̶ ̶a̶d̶d̶r̶e̶s̶s̶ ̶i̶n̶ ̶t̶h̶e̶ ̶t̶o̶m̶l̶ ̶a̶s̶ ̶h̶t̶t̶p̶s̶:̶/̶/̶f̶o̶o̶:̶p̶a̶s̶s̶w̶o̶r̶d̶@̶x̶x̶x̶.̶d̶e̶d̶i̶.̶h̶o̶s̶t̶i̶n̶g̶b̶y̶.̶d̶e̶s̶i̶g̶n̶/̶q̶b̶i̶t̶t̶o̶r̶r̶e̶n̶t̶
Not how it's suppose to work, but for now I can use https to securely access the remote host.

Import backup fails with socket error.

Trying to do an import from rtorrent to qbt:

$ ./qbt import --source rtorrent --source-dir ~/rtorrent/session --qbit-dir ~/.local/share/qBittorrent/BT_backup --dry-run
Prepare to backup torrent data before import..
Creating rtorrent backup of directory: /home/user/rtorrent/session to /home/user/qbt_backup/rtorrent_backup_20230410104453.tar.gz ...
could not backup directory: "walking /home/user/rtorrent/session: /home/user/rtorrent/session/rpc.socket: writing: session/rpc.socket: making header: archive/tar: sockets not supported"
Error: walking /home/user/rtorrent/session: /home/user/rtorrent/session/rpc.socket: writing: session/rpc.socket: making header: archive/tar: sockets not supported
Usage:
  qbt import [flags]

Flags:
      --dry-run             Run without doing anything
  -h, --help                help for import
      --qbit-dir string     qbit dir (required)
      --skip-backup         Skip backup before import. Not advised
      --source string       source client [deluge, rtorrent] (required)
      --source-dir string   source client state dir (required)

Global Flags:
      --config string   config file (default is $HOME/.config/qbt/.qbt.toml)

Seems to work fine with --skip-backup

Move not working on qBit 4.5.2

First of all thank you for this tool!

While trying to use the 'move' option I get a successful message but categories remain unchanged. I don't see any pertinent info in qbit logs other than a successful web login.

However when manually changing a torrents category in web-ui there is related info in the log. Let me know if I can provide more info.

Edit: Looks to may be a 4.5.x issue - move works as intended on 4.3.9

qbittorrent version: qbittorrent-nox v4.5.2 on debian
qbt-cli version: tried dev / 1.0.0 / 0.16.0
qbt move --from t1 --to t2

Found 1 matching torrents to move from (t1) to (t2)
Successfully moved 1 torrents from (t1) to (t2)

Reannounce functionality

The reannounce command states that it reannounces torrents with non-OK tracker status. Does this mean that it automatically searches for torrents with trackers that have a "not working" status? Or does it need to somehow be fed the hashes of torrents with a non-working tracker?

btq adding new torrent download path

So im trying to add a new torrent with a custom save path.
The idea is to make a script to generate my custom download paths, issue is i can't seem to figure out how to pass in a save path argument.

i peeded the add torrent code and can see there is a reference to save-path but unsure how to use it?

command: qbt torrent add url "URL HERE" --save-path "/PATH/HERE"
am i doing something wrong / is there support for this?

resume and remove always report success

Thanks so much for this code, the import especially!

I've noticed that no matter what the hash specified (even if non-existent), it reports "successfully" resumed or removed.

qbt torrent remove --delete-files --hashes 111
(1) torrents to be removed
successfully removed (1) torrents
torrent(s) successfully deleted
qbt torrent resume --hashes zzzzzzz
torrent(s) successfully resumed

Licensing

Hi! Thanks for this amazing CLI.

I'm trying to package this for AlpineLinux, but the project currently has no license attached.

Can you add a OSS compatible license to your project?

Dry run should indicate it is a dry run

To me, it seems like the only way to tell if you are doing a dry run vs an actual run is just examining the amount of time it takes. I think there should be some kind of indication that it is indeed a dry run

For example:

Dry run: Import finished in: 306.529729ms

Actual run: Import finished in: 1.368155058s

This program is fantastic btw, it worked great for me for migrating from rtorrent 0.9.8 to qbittorrent-nox 4.5.2

Can't add torrent by filepath that contains square brackets

qbt chokes on filepaths that contain square brackets (e.g. some linux iso [123].torrent) because it treats input as a glob pattern.

Could qbt check if filePath is actually the path of a .torrent file before it tries to use it as a globbing pattern?

I am having this error

login error: Post "http://127.0.0.1:6776/api/v2/auth/login": dial tcp 127.0.0.1:6776: connect: connection refused
how do I solve it?

this below is the command line I am trying to input ./qbt add --magnet magnet:?xt=urn:btih:6429b3fe8614b55b429bc2eb023e1553118ec2f2&dn=Samaritano%202022%201080p%20WEB-DL%20DUAL%205.1&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce

Piping qbt output to pager or file breaks formatting

In a completely surprising move, any and all output of qbt breaks when it's piped into a pager like less or redirected into a file.

The resulting stream is missing all newlines. This of course also breaks grepping from output and the like.

Allow https host

I need to be able to add torrents to an instance of qBittorrent WebUI that is set to work through https.

I could not find such a setting. The setting for 'host' takes domain or IP (not URL), then tries to connect over http.

Is there a configuration option that I missed? or is it possible to add the option?

Thanks.

update command on v2.0.0-beta1 not working

Been testing the b1 build, only issue I found until now is that the update command doesn't work.
linux-and64 build.

Error: unknown command "update" for "qbt"
Run 'qbt --help' for usage.

Failed test

Another blocker on my packaging process.

$ go test ./...
# github.com/ludviglundgren/qbittorrent-cli/cmd [github.com/ludviglundgren/qbittorrent-cli/cmd.test]
cmd/export_test.go:30:99: too many arguments in call to processHashes
	have (string, string, map[string]struct{}, []string, bool)
	want (string, string, map[string]struct{}, bool)
FAIL	github.com/ludviglundgren/qbittorrent-cli/cmd [build failed]
?   	github.com/ludviglundgren/qbittorrent-cli/cmd/qbt	[no test files]
?   	github.com/ludviglundgren/qbittorrent-cli/internal/config	[no test files]
?   	github.com/ludviglundgren/qbittorrent-cli/internal/domain	[no test files]
?   	github.com/ludviglundgren/qbittorrent-cli/internal/fs	[no test files]
?   	github.com/ludviglundgren/qbittorrent-cli/pkg/qbittorrent	[no test files]
?   	github.com/ludviglundgren/qbittorrent-cli/pkg/torrent	[no test files]
2023/03/12 15:43:12 Total torrents to process: 2
2023/03/12 15:43:12 os create error: open ../../test/output/deluge/3eced34cd948e7ea92f31ded3e0fd734274fee4a.fastresume: no such file or directory
2023/03/12 15:43:12 Could not create qBittorrent fastresume file ../../test/output/deluge/3eced34cd948e7ea92f31ded3e0fd734274fee4a.fastresume error: "open ../../test/output/deluge/3eced34cd948e7ea92f31ded3e0fd734274fee4a.fastresume: no such file or directory"
--- FAIL: TestDelugeImport_Import (0.00s)
    --- FAIL: TestDelugeImport_Import/import_from_deluge (0.00s)
        deluge_test.go:25: Import() error = open ../../test/output/deluge/3eced34cd948e7ea92f31ded3e0fd734274fee4a.fastresume: no such file or directory, wantErr false
--- FAIL: TestRTorrentImport_Import (0.00s)
    --- FAIL: TestRTorrentImport_Import/import_from_rtorrent (0.00s)
        rtorrent_test.go:27: Import() error = Directory does not exist: ../../test/import/sessions/: stat ../../test/import/sessions/: no such file or directory, wantErr false
FAIL
FAIL	github.com/ludviglundgren/qbittorrent-cli/internal/importer	0.005s
FAIL

Using import requires both --source-dir --qbit-dir to have trailing slash

I bumped into this issue today, not thinking it would be an issue having a trailing slash or not.

I had the following.

qbt import --source rtorrent --source-dir '/rtorrent/session' --qbit-dir '/qBittorrent/BT_backup' --dry-run

Which just got me Total torrents to process: 0, couldn't figure out what was going on, done a google and come across this reddit comment about it, turns out both source and dest need a trailing slash.

This then worked.

qbt import --source rtorrent --source-dir '/rtorrent/session/' --qbit-dir '/qBittorrent/BT_backup/' --dry-run

Another user having the same issue: https://www.reddit.com/r/seedboxes/comments/pidhbd/comment/hbphs8f/?utm_source=share&utm_medium=web2x&context=3

Think it would be helpful to other users if you could leave a note in the documentation, or add the trailing slash in code if it's missing.

PS, this is meant to be constructive feedback, I really like what you have made, thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.