move transfers into sqlitedict
This commit is contained in:
parent
9a9185d3d5
commit
9d7a553b95
6 changed files with 69 additions and 45 deletions
|
|
@ -271,11 +271,9 @@ def cancelDownloads(data):
|
|||
ids = data['ids']
|
||||
if ids:
|
||||
for item in models.Item.query.filter(models.Item.id.in_(ids)):
|
||||
t = models.Transfer.get(item.id)
|
||||
t = state.downloads.transfers.get(item.id)
|
||||
if t:
|
||||
t.progress = None
|
||||
t.added = None
|
||||
t.save()
|
||||
del state.downloads.transfers[item.id]
|
||||
p = state.user()
|
||||
if p in item.users:
|
||||
item.users.remove(p)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue