Re: infohash and trackers
Posted: Sun Jan 06, 2013 11:39 am
And indeed setting the flags to 0 when creating the session will stop it from connecting to trackers. Any existing download that I had going continued to download, but I could not get any new infohash's to get to download after that change. They got peers but no seeders. Here's the diff of what I tried:
The idea of it being that we add all the same plugins than before except the tracker. This would have to be done conditionally, of course.
Any ideas why download didn't work?
PTPP
Code: Select all
--- core.py.orig 2013-01-06 13:33:31.381403974 +0200
+++ core.py 2013-01-06 13:33:49.673403741 +0200
@@ -87,7 +87,10 @@
# Note: All libtorrent python bindings to set plugins/extensions need to be disabled
# due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
# Setting session flags to 1 enables all libtorrent default plugins
- self.session = lt.session(lt.fingerprint("DE", *version), flags=1)
+ self.session = lt.session(lt.fingerprint("DE", *version), flags=0)
+ self.session.add_extension(lt.create_ut_pex_plugin)
+ self.session.add_extension(lt.create_ut_metadata_plugin)
+ self.session.add_extension(lt.create_smart_ban_plugin)
# Load the session state if available
self.__load_session_state()
Any ideas why download didn't work?
PTPP