Share file (create torrrent and start seeding) by script (qbittorrent-nox)

Other platforms, generic questions.
Post Reply
Marqus

Share file (create torrrent and start seeding) by script (qbittorrent-nox)

Post by Marqus »

Hello qBitTorrent,
I want to share files by BitTorrent (create torrrent files and start seeding)
Because I want to do this regularly (each hour) I need a script and cannot use the GUI.

I guess qbittorrent-nox can do that.
However, I don't understand how to use the "upload" command (Upload torrent from disk)
How do I point to the data?
How do I set the options?

Can you correct me or send an example?

Thank you,
Markus
ciaobaby

Re: Share file (create torrrent and start seeding) by script (qbittorrent-nox)

Post by ciaobaby »

I need a script
In what language and to run on what operating system?
(Upload torrent from disk)
Upload to where??
How do I set the options? what options?
How do I point to the data?
You load it into a BT protocol client.
Marqus

Re: Share file (create torrrent and start seeding) by script (qbittorrent-nox)

Post by Marqus »

ciaobaby wrote:
I need a script
In what language and to run on what operating system?
Any script welcome that sends qBittorrent-nox commands
I would translate any example to Pyhton
ciaobaby wrote:
(Upload torrent from disk)

Upload to where??
To other peers.
I want to upload/publish a file (Data.txt) via BitTorrent.
"Upload/publish" means: "other peers can download that file".

This is the BitTorrent command (after I created the torrent file):
  btdownloadheadless.py --responsefile Data.txt.torrent --saveas Data.txt

I don't know if the qBittorrent-nox command  "upload" (Upload torrent from disk) is the equivalent.
The command is documented here https://github.com/qbittorrent/qBittorr ... umentation

ciaobaby wrote:
How do I set the options?
what options?
If the file is private.
ciaobaby wrote:
How do I point to the data?

You load it into a BT protocol client.
Is there a qBittorrent-nox command for it? I cannot use the GUI.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Share file (create torrrent and start seeding) by script (qbittorrent-nox)

Post by sledgehammer_999 »

The "upload" command of the WebAPI means that you send the server (aka qbittorrent-nox) the .torrent file. The server takes the .torrent file you send over http (local in your case), adds it to the session, announces to the tracker and then makes/accepts connections from the peers.
Marqus

Re: Share file (create torrrent and start seeding) by script (qbittorrent-nox)

Post by Marqus »

[quote="sledgehammer_999"]
The "upload" command of the WebAPI means that you send the server (aka qbittorrent-nox) the .torrent file. The server takes the .torrent file you send over http (local in your case), adds it to the session, announces to the tracker and then makes/accepts connections from the peers.
[/quote]

Good, this is the first step of the two I want.
Step 2 is: tell the server (aka qbittorrent-nox) that I have the datafile for that .torrent.
How do I perform step 2?

The file is already local at the server.
ciaobaby

Re: Share file (create torrrent and start seeding) by script (qbittorrent-nox)

Post by ciaobaby »

I have a question, ... If you have no access to operate the GUI directly, how do you propose to run this script?
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Share file (create torrrent and start seeding) by script (qbittorrent-nox)

Post by sledgehammer_999 »

[quote="Marqus"]
[quote="sledgehammer_999"]
The "upload" command of the WebAPI means that you send the server (aka qbittorrent-nox) the .torrent file. The server takes the .torrent file you send over http (local in your case), adds it to the session, announces to the tracker and then makes/accepts connections from the peers.
[/quote]

Good, this is the first step of the two I want.
Step 2 is: tell the server (aka qbittorrent-nox) that I have the datafile for that .torrent.
How do I perform step 2?

The file is already local at the server.
[/quote]

Do you know basic HTTP? You when you send the POST method with the "upload" URL you accompany it with the payload aka the data that make up the local .torrent file.
Read the example mentioned in the wiki for the specific command.
Unfortunately I don't know much about the WebUI part of the program so I cannot help you further.
Marqus

Re: Share file (create torrrent and start seeding) by script (qbittorrent-nox)

Post by Marqus »

I understand what you mean with 'payload', and this is documented.
Only that I can't get the WebAPI to work, but I just opened another thread for that.
Thank you.
Post Reply