From 4585e70b2eb66e592dc341de455fee627fce5460 Mon Sep 17 00:00:00 2001 From: Sergey Shramchenko Date: Thu, 10 Mar 2016 18:11:38 +0200 Subject: [PATCH] Reduce download speed drop after prebuffering. --- Libtorrent.py | 2 +- Player.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Libtorrent.py b/Libtorrent.py index 1e25088..fed73c5 100644 --- a/Libtorrent.py +++ b/Libtorrent.py @@ -428,7 +428,7 @@ class Libtorrent: #'storage_mode': self.lt.storage_mode_t(1), 'paused': False, #'auto_managed': False, - #'duplicate_is_error': True + 'duplicate_is_error': False } if self.save_resume_data: log('loading resume data') diff --git a/Player.py b/Player.py index 39f4c66..b771840 100644 --- a/Player.py +++ b/Player.py @@ -287,7 +287,7 @@ class TorrentPlayer(xbmc.Player): return xbmc.sleep(1000) self.torrent.resume_data() - #self.torrent.session.remove_torrent(self.torrent.torrentHandle) + self.torrent.session.remove_torrent(self.torrent.torrentHandle) progressBar.update(0) progressBar.close() return True @@ -366,6 +366,7 @@ class TorrentPlayer(xbmc.Player): subs = self.torrent.getSubsIds(label) debug('[setup_subs] subs: '+str(subs)) if len(subs) > 0: + self.torrent.startSession() showMessage(self.localize('Information'), self.localize('Downloading and copy subtitles. Please wait.'), forced=True) for ind, title in subs: