mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 13:04:23 +00:00
- Fixed pause/resume actions in Web UI
This commit is contained in:
parent
7a1af536b6
commit
81aac9ebcc
@ -312,6 +312,18 @@ void bittorrent::resumeAllTorrents() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bittorrent::pauseTorrent(QString hash) {
|
||||||
|
QTorrentHandle h = getTorrentHandle(hash);
|
||||||
|
if(!h.is_paused())
|
||||||
|
h.pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
void bittorrent::resumeTorrent(QString hash) {
|
||||||
|
QTorrentHandle h = getTorrentHandle(hash);
|
||||||
|
if(h.is_paused())
|
||||||
|
h.resume();
|
||||||
|
}
|
||||||
|
|
||||||
void bittorrent::loadWebSeeds(QString hash) {
|
void bittorrent::loadWebSeeds(QString hash) {
|
||||||
QFile urlseeds_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".urlseeds");
|
QFile urlseeds_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".urlseeds");
|
||||||
if(!urlseeds_file.open(QIODevice::ReadOnly | QIODevice::Text)) return;
|
if(!urlseeds_file.open(QIODevice::ReadOnly | QIODevice::Text)) return;
|
||||||
|
@ -106,8 +106,12 @@ class bittorrent : public QObject {
|
|||||||
void downloadFromUrl(QString url);
|
void downloadFromUrl(QString url);
|
||||||
void downloadFromURLList(const QStringList& url_list);
|
void downloadFromURLList(const QStringList& url_list);
|
||||||
void deleteTorrent(QString hash, bool permanent = false);
|
void deleteTorrent(QString hash, bool permanent = false);
|
||||||
|
/* Needed by Web UI */
|
||||||
void pauseAllTorrents();
|
void pauseAllTorrents();
|
||||||
void resumeAllTorrents();
|
void resumeAllTorrents();
|
||||||
|
void pauseTorrent(QString hash);
|
||||||
|
void resumeTorrent(QString hash);
|
||||||
|
/* End Web UI */
|
||||||
void saveDHTEntry();
|
void saveDHTEntry();
|
||||||
void preAllocateAllFiles(bool b);
|
void preAllocateAllFiles(bool b);
|
||||||
void saveFastResumeData();
|
void saveFastResumeData();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user