Changeset ecca2c4701e61d4f6a446eebd0be53e7a17415a8
- Timestamp:
- 02/04/2008 08:52:03 PM
(1 year ago)
- Author:
- Andrew Yates <andrew@andrewyates.net>
- git-committer:
- Andrew Yates <andrew@andrewyates.net> 1202187123 -0600
- git-parent:
[e099e7a43b16871e127d727d9074a34f6ba1120c]
- git-author:
- Andrew Yates <andrew@andrewyates.net> 1202187123 -0600
- Message:
fixed torrent size bug
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re099e7a |
recca2c4 |
|
| 37 | 37 | self.name = self.dict['info']['name'] |
|---|
| 38 | 38 | |
|---|
| 39 | | self.size = sum(int(tfile['length']) for tfile in self.dict['info']['files']) |
|---|
| | 39 | if self.dict['info'].has_key('files'): |
|---|
| | 40 | self.size = sum(int(tfile['length']) for tfile in self.dict['info']['files']) |
|---|
| | 41 | elif self.dict['info'].has_key('length'): |
|---|
| | 42 | self.size = self.dict['info']['length']; |
|---|
| | 43 | else: |
|---|
| | 44 | print 'btoverlord: error: could not determine size for ' + self.name + ' stored in: ' + self.path + '. Please report this bug as the torrent has an unanticipated form.' |
|---|
| | 45 | self.size = 999999 |
|---|
| 40 | 46 | |
|---|
| 41 | 47 | self.chunk_len = self.dict['info']['piece length'] |
|---|