fire progress -1 after current download is canceled, fixes #186
This commit is contained in:
parent
2548e2cd77
commit
97ef26f7e7
2 changed files with 4 additions and 1 deletions
|
@ -334,6 +334,9 @@ class Node(Thread):
|
|||
t = Transfer.get(item.id)
|
||||
if not t.added:
|
||||
# transfer was canceled
|
||||
trigger_event('transfer', {
|
||||
'id': item.id, 'progress': -1
|
||||
})
|
||||
return False
|
||||
else:
|
||||
t.progress = size / item.info['size']
|
||||
|
|
|
@ -56,7 +56,7 @@ oml.ui.appPanel = function() {
|
|||
|
||||
oml.bindEvent({
|
||||
transfer: Ox.throttle(function(data) {
|
||||
var mediastate = data.progress < -1
|
||||
var mediastate = data.progress == -1
|
||||
? 'unavailable'
|
||||
: data.progress < 1
|
||||
? 'transferring'
|
||||
|
|
Loading…
Reference in a new issue