log libtorr 0.15 fix

pull/1/head
DiMartinoXBMC 2015-07-16 22:36:48 +03:00
parent 3540275681
commit 56c3f89338
3 changed files with 540 additions and 917 deletions

File diff suppressed because it is too large Load Diff

View File

@ -316,27 +316,39 @@ class Libtorrent:
self.session.start_natpmp()
self.session.listen_on(6881, 6891)
#tribler example never tested
#self.session.set_severity_level(self.lt.alert.severity_levels.info)
#self.session.add_extension(self.lt.create_ut_pex_plugin)
#self.session.add_extension(self.lt.create_ut_metadata_plugin)
#self.session.add_extension(self.lt.create_metadata_plugin)
# Session settings
session_settings = self.session.get_settings()
session_settings = self.session.settings()
session_settings.announce_to_all_tiers = True
session_settings.announce_to_all_trackers = True
session_settings.connection_speed = 100
session_settings.peer_connect_timeout = 2
session_settings.rate_limit_ip_overhead = True
session_settings.request_timeout = 5
session_settings.torrent_connect_boost = 100
#libtorrent 0.15 compability
#session_settings = self.session.get_settings()
#session_settings['announce_to_all_tiers'] = True
#session_settings['announce_to_all_trackers'] = True
#session_settings['connection_speed'] = 100
#session_settings['peer_connect_timeout'] = 2
#session_settings['rate_limit_ip_overhead'] = True
#session_settings['request_timeout'] = 5
#session_settings['torrent_connect_boost'] = 100
#tribler example never tested
#session_settings['user_agent'] = 'python_client/' + self.lt.version
#session_settings['auto_manage_startup'] = 30
#session_settings['auto_manage_interval'] = 30
#session_settings['dht_announce_interval'] = 60
session_settings['announce_to_all_tiers'] = True
session_settings['announce_to_all_trackers'] = True
session_settings['connection_speed'] = 100
session_settings['peer_connect_timeout'] = 2
session_settings['rate_limit_ip_overhead'] = True
session_settings['request_timeout'] = 5
session_settings['torrent_connect_boost'] = 100
self.session.set_settings(session_settings)
def encryptSession(self):

View File

@ -107,6 +107,8 @@ def log(msg):
xbmc.log("### [%s]: %s" % (__plugin__,msg,), level=xbmc.LOGNOTICE )
except UnicodeEncodeError:
xbmc.log("### [%s]: %s" % (__plugin__,msg.encode("utf-8", "ignore"),), level=xbmc.LOGNOTICE )
except:
xbmc.log("### [%s]: %s" % (__plugin__,'ERROR LOG',), level=xbmc.LOGNOTICE )
def debug(msg):
@ -114,6 +116,8 @@ def debug(msg):
xbmc.log("### [%s]: %s" % (__plugin__,msg,), level=xbmc.LOGDEBUG )
except UnicodeEncodeError:
xbmc.log("### [%s]: %s" % (__plugin__,msg.encode("utf-8", "ignore"),), level=xbmc.LOGDEBUG )
except:
xbmc.log("### [%s]: %s" % (__plugin__,'ERROR DEBUG',), level=xbmc.LOGDEBUG )
def showMessage(heading, message, times=10000, forced=False):