mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
- Add notification in WebUI when qBittorrent is unreachable
This commit is contained in:
parent
af29228cc9
commit
112bcd7255
3 changed files with 14 additions and 3 deletions
|
@ -78,7 +78,13 @@ window.addEvent('domready', function(){
|
|||
var request = new Request.JSON({
|
||||
url: url,
|
||||
method: 'get',
|
||||
onComplete: function(events) {
|
||||
onFailure: function() {
|
||||
$('error_div').set('html', 'qBittorrent client is not reachable');
|
||||
waiting=false;
|
||||
ajaxfn.delay(2000);
|
||||
},
|
||||
onSuccess: function(events) {
|
||||
$('error_div').set('html', '');
|
||||
if(events){
|
||||
// Add new torrents or update them
|
||||
unfinished_hashes = myTable.getRowIds();
|
||||
|
@ -145,7 +151,7 @@ window.addEvent('domready', function(){
|
|||
});
|
||||
}
|
||||
waiting=false;
|
||||
ajaxfn.delay(1000);
|
||||
ajaxfn.delay(2000);
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue