Opened 8 years ago

Closed 8 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)

deluge-libtorrent-1.1-geoip.patch (2.9 KB ) - added by Alexei Sorokin 8 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Alexei Sorokin, 8 years ago

Component: UnknownCore
Summary: libtorrent-rastebar 1.1+ GeoIP supportlibtorrent-rasterbar 1.1.x+ GeoIP support
Version: master (git)develop (git)

by Alexei Sorokin, 8 years ago

comment:2 by Calum, 8 years ago

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.

Last edited 8 years ago by Calum (previous) (diff)

comment:4 by Calum, 8 years ago

Milestone: 2.01.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 Calum, 8 years ago

Resolution: Fixed
Status: newclosed

Fixed in 1.3-stable: [ffb1316f09b]

Note: See TracTickets for help on using tickets.