downloads can be accessed from tasks, start it earlier

This commit is contained in:
j 2016-02-18 12:15:15 +05:30
commit 030563c933
2 changed files with 5 additions and 4 deletions

View file

@ -584,8 +584,9 @@ class Item(db.Model):
else:
self.added = None
self.update()
if self.id in state.downloads.transfers:
del state.downloads.transfers[self.id]
if state.downloads:
if self.id in state.downloads.transfers:
del state.downloads.transfers[self.id]
Changelog.record(user, 'removeitem', self.id)
class Sort(db.Model):