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)
|
t = Transfer.get(item.id)
|
||||||
if not t.added:
|
if not t.added:
|
||||||
# transfer was canceled
|
# transfer was canceled
|
||||||
|
trigger_event('transfer', {
|
||||||
|
'id': item.id, 'progress': -1
|
||||||
|
})
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
t.progress = size / item.info['size']
|
t.progress = size / item.info['size']
|
||||||
|
|
|
@ -56,7 +56,7 @@ oml.ui.appPanel = function() {
|
||||||
|
|
||||||
oml.bindEvent({
|
oml.bindEvent({
|
||||||
transfer: Ox.throttle(function(data) {
|
transfer: Ox.throttle(function(data) {
|
||||||
var mediastate = data.progress < -1
|
var mediastate = data.progress == -1
|
||||||
? 'unavailable'
|
? 'unavailable'
|
||||||
: data.progress < 1
|
: data.progress < 1
|
||||||
? 'transferring'
|
? 'transferring'
|
||||||
|
|
Loading…
Reference in a new issue