get the torrent size right for torrents with many files

This commit is contained in:
j 2008-05-05 12:51:51 +02:00
parent 49b47f7a46
commit 915d35ba4a

View file

@ -41,13 +41,8 @@ def getTorrentInfo(data):
else:
# let's assume we have a directory structure
file_length = 0;
for file in info['files']:
path = ''
for item in file['path']:
if (path != ''):
path = path + "/"
path = path + item
file_length += file['length']
for f in info['files']:
file_length += f['length']
for key in info:
if key != 'pieces':
tinfo[key] = info[key]