Opened 10 years ago
Closed 9 years ago
#2861 closed patch (Fixed)
libtorrent-rasterbar 1.1.x+ GeoIP support
| Reported by: | Alexei Sorokin | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.3.14 |
| Component: | Core | Version: | develop |
| Keywords: | Cc: | Calum |
Description
Deluge currently uses libtorrent to get GeoIP data. In libtorrent-rasterbar 1.1+ GeoIP functionality has been removed so a direct implementation is required.
This patch uses python-GeoIP bindings for the job (rewriting it using pygeoip or ctypes is not a problem).
On libtorrent-rasterbar 1.0 or older new behaviour is to first try libtorrent's implementation then if failed to try bindings.
Attachments (1)
Change History (6)
comment:1 by , 10 years ago
| Component: | Unknown → Core |
|---|---|
| Summary: | libtorrent-rastebar 1.1+ GeoIP support → libtorrent-rasterbar 1.1.x+ GeoIP support |
| Version: | master (git) → develop (git) |
by , 10 years ago
| Attachment: | deluge-libtorrent-1.1-geoip.patch added |
|---|
comment:4 by , 10 years ago
| Milestone: | 2.0 → 1.3.14 |
|---|
Fixed in develop: [ca7cbd291f25]
Since lt 1.1 supports 1.3-stable probably is prudent to apply changes there too but will need to verify not introducing any new bugs. Have created a PR: https://github.com/deluge-torrent/deluge/pull/121
comment:5 by , 9 years ago
| Resolution: | → Fixed |
|---|---|
| Status: | new → closed |
Fixed in 1.3-stable: [ffb1316f09b]



Looking good but needs a few tweaks.
You can replace the
isalphaloop with list comprehension:country = "".join([ char if char.isalpha() else " " for char in country ])Need to use a more descriptive var name than
gi.Also shouldn't have a bare
try..exceptwith pass.If you have a github account you could provide this patch as a PR.