This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some informations come from https://github.com/webtorrent/bittorrent-peerid
- Loading branch information
Showing
3 changed files
with
166 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
uTorrent. | ||
""") | ||
__app_name__ = 'Ban-Peers' | ||
__version__ = '1.0.2' | ||
__version__ = '1.0.3' | ||
__author__ = 'SeaHOH' | ||
__email__ = '[email protected]' | ||
__license__ = 'MIT' | ||
|
@@ -100,13 +100,15 @@ | |
[Tt]orc | # Torch (TB) | ||
[Vv]ag | # Vagaa (VG) [Dead?] | ||
[Xx]fp | # Xfplay (XF) | ||
[Zz]on | # Zona (ZO) | ||
Unknown\s(?: | ||
DL | # DanDan/DLBT (DL) | ||
QVO | # Qvod (QVOD) [Dead] | ||
TB | # Torch (TB) | ||
UW | # uTorrent Web (UW) | ||
VG | # Vagaa (VG) [Dead?] | ||
XF # Xfplay (XF) | ||
XF | # Xfplay (XF) | ||
ZO # Zona (ZO) | ||
) | ||
) | ||
''', re.X) | ||
|
@@ -147,6 +149,7 @@ | |
# Did not included in uTorrent's peer identification | ||
# https://www.bittorrent.org/beps/bep_0020.html | ||
# https://wiki.theory.org/BitTorrentSpecification#peer_id | ||
# https://github.com/webtorrent/bittorrent-peerid | ||
# Most of them has been died | ||
CLIENT_UNKNOWN = re.compile(''' | ||
^Unknown\s(?! | ||
|
@@ -173,8 +176,11 @@ | |
FC | # FileCroc [Dead] | ||
FD | # Free Download Manager | ||
FW | # FrostWire | ||
FL/1 | # Flud - Torrent Downloader | ||
FL/[2-5] | # Folx | ||
FX | # Freebox BitTorrent | ||
GS | # GSTorrent [Dead] | ||
GT/0\.0\.0\.2 | # Go-Torrent [library] | ||
HK | # Hekate [Dead?] | ||
HM | # hMule [Dead] | ||
IL | # iLivid [Dead] | ||
|
@@ -183,6 +189,7 @@ | |
LC | # LeechCraft | ||
LH | # LH-ABC [Dead] | ||
#M\d-\d | # Bram's old BitTorrent and many other clients [Dead] | ||
MG | # MediaGet | ||
ML | # MLdonkey | ||
MK | # Meerkat [Dead] | ||
MO | # MonoTorrent [Dead?] | ||
|
@@ -197,6 +204,7 @@ | |
RZ | # RezTorrent [Dead?] | ||
SB | # ~Swiftbit [Dead] | ||
SM | # SoMud [Dead] | ||
SP36 | # BitSpirit v3.6 | ||
ST | # SymTorrent [Dead] | ||
st | # sharktorrent [Dead] | ||
tT | # tTorrent | ||
|
@@ -834,15 +842,15 @@ def log(msg): | |
t = None | ||
self._statistics_choked[hash] = torrent.downloaded, t | ||
if choked: | ||
msg = _('[%(torrent)s] is choked with bug, restart it ') | ||
msg = _('[%(hash)s][%(torrent)s] is choked with bug, restart it ') | ||
try: | ||
self.request(params={'action': 'stop', 'hash': hash}) | ||
time.sleep(1) | ||
self.request(params={'action': 'start', 'hash': hash}) | ||
msg += _('successed') | ||
except: | ||
msg += _('failed') | ||
self.log(msg % {'torrent': torrent.name}) | ||
self.log(msg % {'hash': hash, 'torrent': torrent.name}) | ||
continue | ||
time_fp = 60 | ||
ratio_sl = 10 | ||
|
Oops, something went wrong.