get the torrent size right for torrents with many files
This commit is contained in:
parent
49b47f7a46
commit
915d35ba4a
1 changed files with 2 additions and 7 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue