diff --git a/deluge/core/core.py b/deluge/core/core.py index 0cabbdc7a..dccb2754b 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -170,6 +170,10 @@ class Core( # Load the session state if available self.load_session_state() + # Load the GeoIP DB for country look-ups + self.session.load_country_db( + pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat"))) + # Set the user agent self.settings = lt.session_settings() self.settings.user_agent = "Deluge %s" % deluge.common.get_version() diff --git a/deluge/data/GeoIP.dat b/deluge/data/GeoIP.dat new file mode 100644 index 000000000..77759385a Binary files /dev/null and b/deluge/data/GeoIP.dat differ diff --git a/setup.py b/setup.py index 8c0c77ba5..358d9c62d 100644 --- a/setup.py +++ b/setup.py @@ -311,6 +311,7 @@ setup( "data/pixmaps/*.ico", "data/pixmaps/flags/*.png", "data/revision", + "data/GeoIP.dat", "plugins/*.egg", "i18n/*.pot", "i18n/*/LC_MESSAGES/*.mo",