Skip to content

Commit 37a0f0a

Browse files
authored
Merge pull request #59 from alexpdev/dev
bump to release version 0.6.0 for src directory restructure
2 parents b5b1717 + 76464f5 commit 37a0f0a

File tree

8 files changed

+32
-37
lines changed

8 files changed

+32
-37
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,10 @@ optional arguments:
7777
(2) = Bittorrent v2.
7878
(3) = Bittorrent v1 & v2 hybrid.
7979
80-
-l <int>, --piece-length <int> piece size used by Bittorrent transfer protocol.
81-
Acceptable values include numbers 14-35, will be treated as the
80+
-l <int>, --piece-length <int> piece length used by Bittorrent transfer protocol.
81+
Acceptable values include 14-24, will be treated as the
8282
exponent for 2^n power, or any power of 2 integer in 16KB-16MB.
8383
e.g. `--piece-length 14` is the same as `--piece-length 16384`
84-
If this option flag is not used, the program will calculate an
85-
appropriate value automatically.
8684
8785
-r <.torrent>, --re-check <.torrent> <.torrent> is the path to a .torrent meta file.
8886
Check <content> data integrity with <.torrent> file.

coverage.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" ?>
2-
<coverage version="6.0.2" timestamp="1637207537042" lines-valid="1589" lines-covered="1589" line-rate="1" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
2+
<coverage version="6.0.2" timestamp="1637362699967" lines-valid="1589" lines-covered="1589" line-rate="1" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
33
<!-- Generated by coverage.py: https://coverage.readthedocs.io -->
44
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
55
<sources>
@@ -1015,7 +1015,6 @@
10151015
<line number="222" hits="1"/>
10161016
<line number="225" hits="1"/>
10171017
<line number="227" hits="1"/>
1018-
<line number="230" hits="1"/>
10191018
</lines>
10201019
</class>
10211020
<class name="hasher.py" filename="torrentfile/hasher.py" complexity="0" line-rate="1" branch-rate="0">
@@ -1404,25 +1403,25 @@
14041403
<line number="414" hits="1"/>
14051404
<line number="415" hits="1"/>
14061405
<line number="416" hits="1"/>
1407-
<line number="419" hits="1"/>
1408-
<line number="430" hits="1"/>
1409-
<line number="432" hits="1"/>
1406+
<line number="417" hits="1"/>
1407+
<line number="420" hits="1"/>
1408+
<line number="431" hits="1"/>
14101409
<line number="433" hits="1"/>
14111410
<line number="434" hits="1"/>
14121411
<line number="435" hits="1"/>
14131412
<line number="436" hits="1"/>
14141413
<line number="437" hits="1"/>
1415-
<line number="439" hits="1"/>
1416-
<line number="441" hits="1"/>
1414+
<line number="438" hits="1"/>
1415+
<line number="440" hits="1"/>
14171416
<line number="442" hits="1"/>
1418-
<line number="444" hits="1"/>
1419-
<line number="446" hits="1"/>
1417+
<line number="443" hits="1"/>
1418+
<line number="445" hits="1"/>
14201419
<line number="447" hits="1"/>
14211420
<line number="448" hits="1"/>
14221421
<line number="449" hits="1"/>
14231422
<line number="450" hits="1"/>
1424-
<line number="452" hits="1"/>
1425-
<line number="461" hits="1"/>
1423+
<line number="451" hits="1"/>
1424+
<line number="453" hits="1"/>
14261425
<line number="462" hits="1"/>
14271426
<line number="463" hits="1"/>
14281427
<line number="464" hits="1"/>
@@ -1431,21 +1430,21 @@
14311430
<line number="467" hits="1"/>
14321431
<line number="468" hits="1"/>
14331432
<line number="469" hits="1"/>
1434-
<line number="471" hits="1"/>
1433+
<line number="470" hits="1"/>
14351434
<line number="472" hits="1"/>
14361435
<line number="473" hits="1"/>
14371436
<line number="474" hits="1"/>
14381437
<line number="475" hits="1"/>
14391438
<line number="476" hits="1"/>
1440-
<line number="478" hits="1"/>
1439+
<line number="477" hits="1"/>
14411440
<line number="479" hits="1"/>
1442-
<line number="481" hits="1"/>
1441+
<line number="480" hits="1"/>
14431442
<line number="482" hits="1"/>
14441443
<line number="483" hits="1"/>
14451444
<line number="484" hits="1"/>
14461445
<line number="485" hits="1"/>
14471446
<line number="486" hits="1"/>
1448-
<line number="488" hits="1"/>
1447+
<line number="487" hits="1"/>
14491448
<line number="489" hits="1"/>
14501449
<line number="490" hits="1"/>
14511450
<line number="491" hits="1"/>
@@ -1456,8 +1455,9 @@
14561455
<line number="496" hits="1"/>
14571456
<line number="497" hits="1"/>
14581457
<line number="498" hits="1"/>
1459-
<line number="500" hits="1"/>
1458+
<line number="499" hits="1"/>
14601459
<line number="501" hits="1"/>
1460+
<line number="502" hits="1"/>
14611461
</lines>
14621462
</class>
14631463
<class name="torrent.py" filename="torrentfile/torrent.py" complexity="0" line-rate="1" branch-rate="0">

docs/progress/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,7 @@ <h2 id="torrentfile.progress.FeedChecker" class="doc doc-heading">
14571457

14581458
<div class="doc doc-contents ">
14591459

1460-
<p>Construct the FeederChecker.</p>
1460+
<p>Validates torrent content.</p>
14611461
<p>Seemlesly validate torrent file contents by comparing hashes in
14621462
metafile against data on disk.</p>
14631463

docs/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/sitemap.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://alexpdev.github.io/torrentfile/</loc>
5-
<lastmod>2021-11-18</lastmod>
5+
<lastmod>2021-11-19</lastmod>
66
<changefreq>daily</changefreq>
77
</url>
88
<url>
99
<loc>https://alexpdev.github.io/torrentfile/CLI/</loc>
10-
<lastmod>2021-11-18</lastmod>
10+
<lastmod>2021-11-19</lastmod>
1111
<changefreq>daily</changefreq>
1212
</url>
1313
<url>
1414
<loc>https://alexpdev.github.io/torrentfile/LICENSE/</loc>
15-
<lastmod>2021-11-18</lastmod>
15+
<lastmod>2021-11-19</lastmod>
1616
<changefreq>daily</changefreq>
1717
</url>
1818
<url>
1919
<loc>https://alexpdev.github.io/torrentfile/examples/</loc>
20-
<lastmod>2021-11-18</lastmod>
20+
<lastmod>2021-11-19</lastmod>
2121
<changefreq>daily</changefreq>
2222
</url>
2323
<url>
2424
<loc>https://alexpdev.github.io/torrentfile/hasher/</loc>
25-
<lastmod>2021-11-18</lastmod>
25+
<lastmod>2021-11-19</lastmod>
2626
<changefreq>daily</changefreq>
2727
</url>
2828
<url>
2929
<loc>https://alexpdev.github.io/torrentfile/progress/</loc>
30-
<lastmod>2021-11-18</lastmod>
30+
<lastmod>2021-11-19</lastmod>
3131
<changefreq>daily</changefreq>
3232
</url>
3333
<url>
3434
<loc>https://alexpdev.github.io/torrentfile/tests/</loc>
35-
<lastmod>2021-11-18</lastmod>
35+
<lastmod>2021-11-19</lastmod>
3636
<changefreq>daily</changefreq>
3737
</url>
3838
<url>
3939
<loc>https://alexpdev.github.io/torrentfile/torrent/</loc>
40-
<lastmod>2021-11-18</lastmod>
40+
<lastmod>2021-11-19</lastmod>
4141
<changefreq>daily</changefreq>
4242
</url>
4343
<url>
4444
<loc>https://alexpdev.github.io/torrentfile/utils/</loc>
45-
<lastmod>2021-11-18</lastmod>
45+
<lastmod>2021-11-19</lastmod>
4646
<changefreq>daily</changefreq>
4747
</url>
4848
</urlset>

docs/sitemap.xml.gz

0 Bytes
Binary file not shown.

torrentfile/cli.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,3 @@ def main_script(args=None):
225225
def main():
226226
"""Initiate main function for CLI script."""
227227
main_script()
228-
229-
230-
if __name__ == "__main__":
231-
main() # pragma: no cover

torrentfile/progress.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def split_pieces(pieces, hash_size):
286286

287287

288288
class FeedChecker:
289-
"""Construct the FeederChecker.
289+
"""Validates torrent content.
290290
291291
Seemlesly validate torrent file contents by comparing hashes in
292292
metafile against data on disk.
@@ -412,7 +412,8 @@ def _gen_blanks(self, partial):
412412
left -= arrlen
413413
yield partial
414414
partial = bytearray(0)
415-
partial.extend(bytearray(left))
415+
if left > 0:
416+
partial.extend(bytearray(left))
416417
yield partial
417418

418419

0 commit comments

Comments
 (0)