deluge: fix for libtorrent 1.0

This commit is contained in:
Eivind Uggedal 2015-08-23 09:04:08 +00:00
parent 49e6829fd2
commit 8632e7b093
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From acf4fc4193d70fce2adace626dca2f90105622f6 Mon Sep 17 00:00:00 2001
From: Calum Lind <calumlind+deluge@gmail.com>
Date: Sat, 22 Aug 2015 14:31:26 +0000
Subject: [#2233] [lp:#1487704] Fix AttributeError in set_trackers with lt 1.0
---
diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py
index 7ca35e1..9003d8b 100644
--- deluge/core/torrent.py
+++ deluge/core/torrent.py
@@ -328,9 +328,12 @@ class Torrent(object):
if trackers == None:
trackers = []
for value in self.handle.trackers():
- tracker = {}
- tracker["url"] = value.url
- tracker["tier"] = value.tier
+ if lt.version_major == 0 and lt.version_minor < 15:
+ tracker = {}
+ tracker["url"] = value.url
+ tracker["tier"] = value.tier
+ else:
+ tracker = value
trackers.append(tracker)
self.trackers = trackers
self.tracker_host = None
--
cgit v0.9.2

View File

@ -1,7 +1,7 @@
# Template file for 'deluge'
pkgname=deluge
version=1.3.11
revision=3
revision=4
noarch=yes
build_style=python-module
pycompile_module="deluge"