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:
|
else:
|
||||||
# let's assume we have a directory structure
|
# let's assume we have a directory structure
|
||||||
file_length = 0;
|
file_length = 0;
|
||||||
for file in info['files']:
|
for f in info['files']:
|
||||||
path = ''
|
file_length += f['length']
|
||||||
for item in file['path']:
|
|
||||||
if (path != ''):
|
|
||||||
path = path + "/"
|
|
||||||
path = path + item
|
|
||||||
file_length += file['length']
|
|
||||||
for key in info:
|
for key in info:
|
||||||
if key != 'pieces':
|
if key != 'pieces':
|
||||||
tinfo[key] = info[key]
|
tinfo[key] = info[key]
|
||||||
|
|
Loading…
Reference in a new issue