mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
need to store the filename in the info dict that gets returned by the server
This commit is contained in:
parent
1f63e3de1a
commit
d6e9c2141e
1 changed files with 4 additions and 3 deletions
|
@ -97,7 +97,7 @@ Deluge.Add = {
|
||||||
root.firstChild.expand();
|
root.firstChild.expand();
|
||||||
},
|
},
|
||||||
|
|
||||||
onTorrentAdded: function(info) {
|
onTorrentAdded: function(info, filename) {
|
||||||
if (!info) {
|
if (!info) {
|
||||||
Ext.MessageBox.show({
|
Ext.MessageBox.show({
|
||||||
title: _('Error'),
|
title: _('Error'),
|
||||||
|
@ -109,6 +109,7 @@ Deluge.Add = {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
info['filename'] = filename;
|
||||||
this.Store.loadData([[info['info_hash'], info['name']]], true);
|
this.Store.loadData([[info['info_hash'], info['name']]], true);
|
||||||
this.torrents[info['info_hash']] = info;
|
this.torrents[info['info_hash']] = info;
|
||||||
},
|
},
|
||||||
|
@ -254,7 +255,7 @@ Deluge.Add.File = {
|
||||||
var filename = upload.result.toString();
|
var filename = upload.result.toString();
|
||||||
this.form.items.get('torrentFile').setValue('');
|
this.form.items.get('torrentFile').setValue('');
|
||||||
Deluge.Client.web.get_torrent_info(filename, {
|
Deluge.Client.web.get_torrent_info(filename, {
|
||||||
onSuccess: Deluge.Add.onTorrentAdded.bindWithEvent(Deluge.Add)
|
onSuccess: Deluge.Add.onTorrentAdded.bindWithEvent(Deluge.Add, filename)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -312,7 +313,7 @@ Deluge.Add.Url = {
|
||||||
onDownload: function(filename) {
|
onDownload: function(filename) {
|
||||||
this.form.items.get('url').setValue('');
|
this.form.items.get('url').setValue('');
|
||||||
Deluge.Client.web.get_torrent_info(filename, {
|
Deluge.Client.web.get_torrent_info(filename, {
|
||||||
onSuccess: Deluge.Add.onTorrentAdded.bindWithEvent(Deluge.Add)
|
onSuccess: Deluge.Add.onTorrentAdded.bindWithEvent(Deluge.Add, filename)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue