diff --git a/src/eventmanager.cpp b/src/eventmanager.cpp
index e8533ee1a..8b4f60088 100644
--- a/src/eventmanager.cpp
+++ b/src/eventmanager.cpp
@@ -81,6 +81,11 @@ void EventManager::modifiedTorrent(QTorrentHandle h)
if(!h.is_seed()) {
event["progress"] = QVariant(h.progress());
event["dlspeed"] = QVariant(h.download_payload_rate());
+ if(BTSession->isQueueingEnabled()) {
+ event["priority"] = QVariant(h.queue_position());
+ } else {
+ event["priority"] = -1;
+ }
}
event["upspeed"] = QVariant(h.upload_payload_rate());
event["seed"] = QVariant(h.is_seed());
diff --git a/src/httpconnection.cpp b/src/httpconnection.cpp
index 165a24ed3..7b889ffb4 100644
--- a/src/httpconnection.cpp
+++ b/src/httpconnection.cpp
@@ -202,34 +202,36 @@ void HttpConnection::respondCommand(QString command)
emit torrentReadyToBeDownloaded(filePath, false, QString(), false);
return;
}
- if(command == "resumeall")
- {
+ if(command == "resumeall") {
emit resumeAllTorrents();
return;
}
- if(command == "pauseall")
- {
+ if(command == "pauseall") {
emit pauseAllTorrents();
return;
}
- if(command == "resume")
- {
+ if(command == "resume") {
emit resumeTorrent(parser.post("hash"));
return;
}
- if(command == "pause")
- {
+ if(command == "pause") {
emit pauseTorrent(parser.post("hash"));
return;
}
- if(command == "delete")
- {
+ if(command == "delete") {
emit deleteTorrent(parser.post("hash"), false);
return;
}
- if(command == "deletePerm")
- {
+ if(command == "deletePerm") {
emit deleteTorrent(parser.post("hash"), true);
return;
}
+ if(command == "increasePrio") {
+ emit increasePrioTorrent(parser.post("hash"));
+ return;
+ }
+ if(command == "decreasePrio") {
+ emit decreasePrioTorrent(parser.post("hash"));
+ return;
+ }
}
diff --git a/src/httpconnection.h b/src/httpconnection.h
index 1b4a1466f..9bca2ba37 100644
--- a/src/httpconnection.h
+++ b/src/httpconnection.h
@@ -62,6 +62,8 @@ class HttpConnection : public QObject
void deleteTorrent(QString hash, bool permanently);
void resumeTorrent(QString hash);
void pauseTorrent(QString hash);
+ void increasePrioTorrent(QString hash);
+ void decreasePrioTorrent(QString hash);
void resumeAllTorrents();
void pauseAllTorrents();
};
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index fd25b1013..2dc986cf8 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -68,6 +68,8 @@ void HttpServer::newHttpConnection()
connect(connection, SIGNAL(resumeTorrent(QString)), BTSession, SLOT(resumeTorrent(QString)));
connect(connection, SIGNAL(pauseAllTorrents()), BTSession, SLOT(pauseAllTorrents()));
connect(connection, SIGNAL(resumeAllTorrents()), BTSession, SLOT(resumeAllTorrents()));
+ connect(connection, SIGNAL(increasePrioTorrent(QString)), BTSession, SLOT(increaseDlTorrentPriority(QString)));
+ connect(connection, SIGNAL(decreasePrioTorrent(QString)), BTSession, SLOT(decreaseDlTorrentPriority(QString)));
}
}
diff --git a/src/webui/css/style.css b/src/webui/css/style.css
index f672936c3..e1830fbcf 100644
--- a/src/webui/css/style.css
+++ b/src/webui/css/style.css
@@ -20,6 +20,10 @@ body {
width: 300px;
}
+.invisible {
+ display: none;
+}
+
/* Typography */
h2, h3, h4 {
diff --git a/src/webui/index.html b/src/webui/index.html
index fc2cd4b30..c5b4f65f2 100644
--- a/src/webui/index.html
+++ b/src/webui/index.html
@@ -64,6 +64,10 @@
+
+
+
+