diff --git a/src/httpconnection.cpp b/src/httpconnection.cpp index 558faae47..165a24ed3 100644 --- a/src/httpconnection.cpp +++ b/src/httpconnection.cpp @@ -224,7 +224,12 @@ void HttpConnection::respondCommand(QString command) } if(command == "delete") { - emit deleteTorrent(parser.post("hash")); + emit deleteTorrent(parser.post("hash"), false); return; } + if(command == "deletePerm") + { + emit deleteTorrent(parser.post("hash"), true); + return; + } } diff --git a/src/httpconnection.h b/src/httpconnection.h index c43f07807..1b4a1466f 100644 --- a/src/httpconnection.h +++ b/src/httpconnection.h @@ -59,7 +59,7 @@ class HttpConnection : public QObject signals: void UrlReadyToBeDownloaded(QString url); void torrentReadyToBeDownloaded(QString, bool, QString, bool); - void deleteTorrent(QString hash); + void deleteTorrent(QString hash, bool permanently); void resumeTorrent(QString hash); void pauseTorrent(QString hash); void resumeAllTorrents(); diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 27068c11b..fd25b1013 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -63,7 +63,7 @@ void HttpServer::newHttpConnection() //connect connection to BTSession connect(connection, SIGNAL(UrlReadyToBeDownloaded(QString)), BTSession, SLOT(downloadUrlAndSkipDialog(QString))); connect(connection, SIGNAL(torrentReadyToBeDownloaded(QString, bool, QString, bool)), BTSession, SLOT(addTorrent(QString, bool, QString, bool))); - connect(connection, SIGNAL(deleteTorrent(QString)), BTSession, SLOT(deleteTorrent(QString))); + connect(connection, SIGNAL(deleteTorrent(QString, bool)), BTSession, SLOT(deleteTorrent(QString, bool))); connect(connection, SIGNAL(pauseTorrent(QString)), BTSession, SLOT(pauseTorrent(QString))); connect(connection, SIGNAL(resumeTorrent(QString)), BTSession, SLOT(resumeTorrent(QString))); connect(connection, SIGNAL(pauseAllTorrents()), BTSession, SLOT(pauseAllTorrents())); diff --git a/src/webui/index.html b/src/webui/index.html index b357b1bbb..fc2cd4b30 100644 --- a/src/webui/index.html +++ b/src/webui/index.html @@ -41,6 +41,7 @@