Compare commits
18 Commits
deluge-1.3
...
archive/1.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e050905b29 | ||
![]() |
6c3442e7e7 | ||
![]() |
993abbc6a6 | ||
![]() |
a2fcebe15c | ||
![]() |
b8e5ebe822 | ||
![]() |
e33a8fbea4 | ||
![]() |
bcc7a74725 | ||
![]() |
ffb8d9f8c3 | ||
![]() |
396417bcd0 | ||
![]() |
b13da8a42a | ||
![]() |
415979e2f7 | ||
![]() |
5f0694deb2 | ||
![]() |
6d14be18b0 | ||
![]() |
65fac156eb | ||
![]() |
956f2ad574 | ||
![]() |
275c93657f | ||
![]() |
38d7b7cdfd | ||
![]() |
7661127b9d |
@@ -1,4 +1,9 @@
|
||||
=== Deluge 1.3.15 (3 May 2017) ===
|
||||
=== Deluge 1.3.16 (unreleased) ===
|
||||
|
||||
==== Core ====
|
||||
* Fix saving copy of torrent file for magnet links.
|
||||
|
||||
=== Deluge 1.3.15 (12 May 2017) ===
|
||||
|
||||
==== Core ====
|
||||
* #2991: Fix issues with displaying libtorrent single proxy.
|
||||
|
@@ -111,8 +111,13 @@ def find_json_objects(s):
|
||||
if start < 0:
|
||||
return []
|
||||
|
||||
quoted = False
|
||||
for index, c in enumerate(s[offset:]):
|
||||
if c == "{":
|
||||
if c == '"':
|
||||
quoted = not quoted
|
||||
elif quoted:
|
||||
continue
|
||||
elif c == "{":
|
||||
opens += 1
|
||||
elif c == "}":
|
||||
opens -= 1
|
||||
|
@@ -107,6 +107,8 @@ class Core(component.Component):
|
||||
self.settings.user_agent = "Deluge %s" % deluge.common.get_version()
|
||||
# Increase the alert queue size so that alerts don't get lost
|
||||
self.settings.alert_queue_size = 10000
|
||||
# Ignore buggy resume data timestamps checking #3044.
|
||||
self.settings.ignore_resume_timestamps = True
|
||||
|
||||
# Set session settings
|
||||
self.settings.send_redundant_have = True
|
||||
|
@@ -319,6 +319,8 @@ class PreferencesManager(component.Component):
|
||||
self.session.start_dht(None)
|
||||
self.session.add_dht_router("router.bittorrent.com", 6881)
|
||||
self.session.add_dht_router("router.utorrent.com", 6881)
|
||||
self.session.add_dht_router("dht.transmissionbt.com", 6881)
|
||||
self.session.add_dht_router("dht.aelitis.com", 6881)
|
||||
self.session.add_dht_router("router.bitcomet.com", 6881)
|
||||
else:
|
||||
self.core.save_dht_state()
|
||||
|
@@ -144,7 +144,7 @@ class Torrent(object):
|
||||
# We store the filename just in case we need to make a copy of the torrentfile
|
||||
if not filename:
|
||||
# If no filename was provided, then just use the infohash
|
||||
filename = self.torrent_id
|
||||
filename = self.torrent_id + '.torrent'
|
||||
|
||||
self.filename = filename
|
||||
|
||||
@@ -972,6 +972,11 @@ class Torrent(object):
|
||||
torrent_file["info"] = md
|
||||
with open(path, "wb") as _file:
|
||||
_file.write(lt.bencode(torrent_file))
|
||||
if self.config["copy_torrent_file"]:
|
||||
config_dir = self.config['torrentfiles_location']
|
||||
filepath = os.path.join(config_dir, self.filename)
|
||||
with open(filepath, "wb") as _file:
|
||||
_file.write(lt.bencode(torrent_file))
|
||||
except Exception, e:
|
||||
log.warning("Unable to save torrent file: %s", e)
|
||||
|
||||
|
@@ -111,10 +111,22 @@ class TorrentState:
|
||||
self.move_completed = move_completed
|
||||
self.move_completed_path = move_completed_path
|
||||
|
||||
def __eq__(self, other):
|
||||
return isinstance(other, TorrentState) and self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self == other
|
||||
|
||||
class TorrentManagerState:
|
||||
def __init__(self):
|
||||
self.torrents = []
|
||||
|
||||
def __eq__(self, other):
|
||||
return isinstance(other, TorrentManagerState) and self.torrents == other.torrents
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self == other
|
||||
|
||||
class TorrentManager(component.Component):
|
||||
"""
|
||||
TorrentManager contains a list of torrents in the current libtorrent
|
||||
@@ -157,6 +169,9 @@ class TorrentManager(component.Component):
|
||||
# Workaround to determine if TorrentAddedEvent is from state file
|
||||
self.session_started = False
|
||||
|
||||
# Keep the previous saved state
|
||||
self.prev_saved_state = None
|
||||
|
||||
# Register set functions
|
||||
self.config.register_set_function("max_connections_per_torrent",
|
||||
self.on_set_max_connections_per_torrent)
|
||||
@@ -719,6 +734,10 @@ class TorrentManager(component.Component):
|
||||
)
|
||||
state.torrents.append(torrent_state)
|
||||
|
||||
# If the state hasn't changed, no need to save it
|
||||
if self.prev_saved_state == state:
|
||||
return
|
||||
|
||||
# Pickle the TorrentManagerState object
|
||||
filepath = os.path.join(get_config_dir(), "state", "torrents.state")
|
||||
filepath_tmp = filepath + ".tmp"
|
||||
@@ -741,6 +760,7 @@ class TorrentManager(component.Component):
|
||||
os.fsync(state_file.fileno())
|
||||
state_file.close()
|
||||
os.rename(filepath_tmp, filepath)
|
||||
self.prev_saved_state = state
|
||||
except IOError, ex:
|
||||
log.error("Unable to save %s: %s", filepath, ex)
|
||||
if os.path.isfile(filepath_bak):
|
||||
|
BIN
deluge/data/icons/hicolor/16x16/apps/deluge-panel.png
Normal file
After Width: | Height: | Size: 722 B |
BIN
deluge/data/icons/hicolor/22x22/apps/deluge-panel.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
deluge/data/icons/hicolor/24x24/apps/deluge-panel.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 604 B After Width: | Height: | Size: 415 B |
Before Width: | Height: | Size: 591 B After Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 492 B |
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 427 B |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 836 B After Width: | Height: | Size: 582 B |
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 647 B After Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 376 B |
Before Width: | Height: | Size: 663 B After Width: | Height: | Size: 470 B |
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 392 B |
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 306 B |
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 548 B |
Before Width: | Height: | Size: 486 B After Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 475 B |
Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 486 B |
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 443 B After Width: | Height: | Size: 313 B |
Before Width: | Height: | Size: 514 B After Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 457 B |
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 625 B After Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 448 B |
Before Width: | Height: | Size: 614 B After Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 521 B After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 453 B After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 316 B |
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 483 B After Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 439 B After Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 403 B |
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 353 B |
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 342 B |
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 488 B |
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 592 B After Width: | Height: | Size: 424 B |
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 610 B After Width: | Height: | Size: 485 B |
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 394 B |
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 694 B After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 468 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 530 B After Width: | Height: | Size: 445 B |
Before Width: | Height: | Size: 490 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 537 B After Width: | Height: | Size: 391 B |
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 327 B |