fedarovich / qbittorrent-cli

Command line interface for QBittorrent
MIT License
303 stars 16 forks source link

Feature request: option "-f" for "qbt torrent resume" command #50

Closed jducaud closed 1 year ago

jducaud commented 3 years ago

Hello,

Great work for this amazingly efficient qBittorrent CLI!

It seems it misses the "force resume" feature of qBittorrent WebUI.

Would it be possible to add (as it is implemented for the qbt torrent delete command) a -f option to the qbt torrent resume command?

Regards, Jerome.

Jarsky commented 1 year ago

Hi there,

I really like this tool. Its useful for me to automatically pause the torrents to release file locks and allow them to be moved off my cache to storage. But I have issues with torrents seeding properly so I normally set them to forced resume. Would be great if we could get this feature added as @jducaud requested. Even if its just its own command e.g qbt torrent forceresume all

It looks like this is the API call https://github.com/qbittorrent/qBittorrent/blob/162273da47cda21b5d3a5bab54c098dbb1d7468d/src/webui/www/private/scripts/mocha-init.js

    setForceStartFN = function() {
        const hashes = torrentsTable.selectedRowsIds();
        if (hashes.length) {
            new Request({
                url: 'api/v2/torrents/setForceStart',
                method: 'post',
                data: {
                    value: 'true',
                    hashes: hashes.join("|")
                }
            }).send();
            updateMainData();
        }
    };
Jarsky commented 1 year ago

this is done @jducaud you can use the below command once the author has published a release (or you can clone the git and build it)

qbt torrent force-resume HASH|ALL

jducaud commented 1 year ago

Thank you @Jarsky !

fedarovich commented 1 year ago

I've published the release with this pull request