dht bit fix

pull/15/head
DiMartinoXBMC 2016-11-28 23:29:09 +03:00
parent f6eced5d28
commit 0bdb6ae37f
1 changed files with 1 additions and 4 deletions

View File

@ -156,14 +156,11 @@ class SkorbaLoader:
} }
progressBar = xbmcgui.DialogProgress() progressBar = xbmcgui.DialogProgress()
progressBar.create(Localization.localize('Please Wait'), Localization.localize('Magnet-link is converting')) progressBar.create(Localization.localize('Please Wait'), Localization.localize('Magnet-link is converting'))
#try:
self.torrentHandle = self.session.add_torrent(magnetSettings) self.torrentHandle = self.session.add_torrent(magnetSettings)
#except:
# self.torrentHandle = self.lt.add_magnet_uri(self.session, self.magnetLink, magnetSettings)
iterator = 0 iterator = 0
if self.enable_dht: self.torrentHandle.force_dht_announce()
while iterator < 100: while iterator < 100:
xbmc.sleep(500) xbmc.sleep(500)
if self.enable_dht: self.torrentHandle.force_dht_announce()
progressBar.update(iterator, Localization.localize('Please Wait'), Localization.localize('Magnet-link is converting')+'.' * (iterator % 4), ' ') progressBar.update(iterator, Localization.localize('Please Wait'), Localization.localize('Magnet-link is converting')+'.' * (iterator % 4), ' ')
iterator += 1 iterator += 1
if progressBar.iscanceled(): if progressBar.iscanceled():