fix the files tree for when there is only 1 file in the torrent and also fix the file size in the add torrent window
This commit is contained in:
parent
2e0bd1bd3c
commit
76d3c2567e
|
@ -113,7 +113,7 @@ class TorrentInfo(object):
|
|||
self.__m_files_tree = file_tree.get_tree()
|
||||
else:
|
||||
self.__m_files_tree = {
|
||||
self.__m_name: (self.__m_metadata["info"]["length"], True)
|
||||
self.__m_name: (0, self.__m_metadata["info"]["length"], True)
|
||||
}
|
||||
|
||||
self.__m_files = []
|
||||
|
|
|
@ -314,15 +314,15 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, {
|
|||
var child = new Ext.tree.TreeNode({
|
||||
text: file
|
||||
});
|
||||
walk(item, child);
|
||||
parent.appendChild(child);
|
||||
walk(item, child);
|
||||
} else {
|
||||
parent.appendChild(new Ext.tree.TreeNode({
|
||||
filename: file,
|
||||
text: file, // this needs to be here for sorting reasons
|
||||
size: fsize(item[0]),
|
||||
size: fsize(item[1]),
|
||||
leaf: true,
|
||||
checked: item[1],
|
||||
checked: item[2],
|
||||
iconCls: 'x-deluge-file',
|
||||
uiProvider: Ext.tree.ColumnNodeUI
|
||||
}));
|
||||
|
@ -379,4 +379,4 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, {
|
|||
this.url.show();
|
||||
}
|
||||
});
|
||||
Deluge.Add = new Ext.deluge.add.AddWindow();
|
||||
Deluge.Add = new Ext.deluge.add.AddWindow();
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue