From 0e63ed4ebcb8a51408ec0b2fd8efb95f6106a62e Mon Sep 17 00:00:00 2001 From: Anders Jensen Date: Sat, 25 Aug 2018 09:16:07 +0200 Subject: [PATCH] fixed small bug with file priority overwriting manual priority management --- streaming/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/streaming/core.py b/streaming/core.py index afdeddf..445d109 100644 --- a/streaming/core.py +++ b/streaming/core.py @@ -166,7 +166,7 @@ class Torrent(object): f = self.get_file_from_offset(from_byte) logger.debug('Also setting file to max %r' % (f, )) file_priorities = self.torrent.get_file_priorities() - file_priorities[f['index']] = 7 + file_priorities[f['index']] = 2 self.torrent.set_file_priorities(file_priorities) for _ in range(300): @@ -239,7 +239,7 @@ class Torrent(object): if f['path'] in must_whitelist: if f['path'] in first_files: - file_priorities[i] = 7 + file_priorities[i] = 2 else: file_priorities[i] = 1 elif f['path'] not in cannot_blacklist: @@ -307,7 +307,7 @@ class Torrent(object): if i < first_file: file_priorities[index] = 0 elif i == first_file: - file_priorities[index] = 7 + file_priorities[index] = 2 else: file_priorities[index] = 1