Author: damoxc

Revision: 5002

Log:
        need to store the filename in the info dict that gets returned by the 
server

Diff:
Modified: trunk/deluge/ui/web/js/deluge-add.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-add.js        2009-04-02 20:55:46 UTC (rev 
5001)
+++ trunk/deluge/ui/web/js/deluge-add.js        2009-04-02 20:59:15 UTC (rev 
5002)
@@ -97,7 +97,7 @@
                root.firstChild.expand();
        },
        
-       onTorrentAdded: function(info) {
+       onTorrentAdded: function(info, filename) {
                if (!info) {
                        Ext.MessageBox.show({
                                title: _('Error'),
@@ -109,6 +109,7 @@
                        });
                        return;
                }
+               info['filename'] = filename;
                this.Store.loadData([[info['info_hash'], info['name']]], true);
                this.torrents[info['info_hash']] = info;
        },
@@ -254,7 +255,7 @@
                var filename = upload.result.toString();
                this.form.items.get('torrentFile').setValue('');
                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 @@
        onDownload: function(filename) {
                this.form.items.get('url').setValue('');
                Deluge.Client.web.get_torrent_info(filename, {
-                       onSuccess: 
Deluge.Add.onTorrentAdded.bindWithEvent(Deluge.Add)
+                       onSuccess: 
Deluge.Add.onTorrentAdded.bindWithEvent(Deluge.Add, filename)
                });
        }
 }



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to