Fix adding torrents with only 1 file

This commit is contained in:
Andrew Resch 2008-09-13 22:26:11 +00:00
parent b9d1367564
commit 9c2658d833
1 changed files with 19 additions and 19 deletions

View File

@ -311,6 +311,7 @@ class AddTorrentDialog(component.Component):
self.files_treestore.append(parent_iter, [value[2], key, self.files_treestore.append(parent_iter, [value[2], key,
value[1]["size"], value[0], False, gtk.STOCK_FILE]) value[1]["size"], value[0], False, gtk.STOCK_FILE])
if parent_iter and self.files_treestore.iter_has_child(parent_iter):
# Iterate through the children and see what we should label the # Iterate through the children and see what we should label the
# folder, download true, download false or inconsistent. # folder, download true, download false or inconsistent.
itr = self.files_treestore.iter_children(parent_iter) itr = self.files_treestore.iter_children(parent_iter)
@ -400,7 +401,6 @@ class AddTorrentDialog(component.Component):
# Save the file priorities # Save the file priorities
files_priorities = self.build_priorities( files_priorities = self.build_priorities(
self.files_treestore.get_iter_first(), {}) self.files_treestore.get_iter_first(), {})
log.debug("fp: %s", len(files_priorities))
if len(files_priorities) > 0: if len(files_priorities) > 0:
for i, file_dict in enumerate(self.files[torrent_id]): for i, file_dict in enumerate(self.files[torrent_id]):