Opened 7 years ago
Closed 7 years ago
#2861 closed patch (Fixed)
libtorrent-rasterbar 1.1.x+ GeoIP support
Reported by: | XRevan86 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.3.14 |
Component: | Core | Version: | develop |
Keywords: | Cc: | Cas |
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 Changed 7 years ago by XRevan86
- Component changed from Unknown to Core
- Summary changed from libtorrent-rastebar 1.1+ GeoIP support to libtorrent-rasterbar 1.1.x+ GeoIP support
- Version changed from master (git) to develop (git)
Changed 7 years ago by XRevan86
comment:2 Changed 7 years ago by Cas
comment:4 Changed 7 years ago by Cas
- Milestone changed from 2.0 to 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 Changed 7 years ago by Cas
- Resolution set to Fixed
- Status changed from new to closed
Fixed in 1.3-stable: [ffb1316f09b]
Looking good but needs a few tweaks.
You can replace the isalpha loop 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..except with pass.
If you have a github account you could provide this patch as a PR.