Compare commits
272 Commits
extjs4-por
...
deluge-1.1
Author | SHA1 | Date | |
---|---|---|---|
b950442d2e | |||
7e4b6abb77 | |||
a2359738bf | |||
5fb06630f2 | |||
9bf27f1249 | |||
127b58c36d | |||
587d9a7e5f | |||
653097a985 | |||
bf1a0f9aad | |||
c20226c187 | |||
fbb5cd94e8 | |||
abc5bcf389 | |||
d6eeb13fed | |||
d3ad2e9900 | |||
d14062f724 | |||
f77d678788 | |||
4280a3220e | |||
7130735697 | |||
31780d2633 | |||
4a22de279b | |||
d742f394f0 | |||
1693bc7373 | |||
2023fac5c5 | |||
c3e7a78a70 | |||
100c6c0dcc | |||
acf872f4a1 | |||
d4d9cb8e75 | |||
dcc6654b46 | |||
52f8d7cacf | |||
f3f5aa661e | |||
e8d9c43b48 | |||
8d8e1ef5c3 | |||
1da46653e6 | |||
ea4ed3c880 | |||
5644646427 | |||
fe04c46252 | |||
99374972b0 | |||
e219cce7a5 | |||
28eed5d7e5 | |||
17ac7ce733 | |||
97fec6ce1a | |||
027dd7bcef | |||
ec72ac57d7 | |||
ad322aabd1 | |||
cb524c3590 | |||
874c5dc106 | |||
375c62223d | |||
c2de5ed93f | |||
fdf78bc7fd | |||
5ce82498ac | |||
9da61bd1c7 | |||
0d633b388e | |||
b52e1155c5 | |||
8535e8e22c | |||
6ba55ce2f4 | |||
f2a3ebf486 | |||
ffcb1643b9 | |||
2e4bc65834 | |||
8001d5e165 | |||
9728d1d831 | |||
364078079b | |||
342063599f | |||
4baf7b167a | |||
c6c861885e | |||
2831e10a24 | |||
9b4e4e8d48 | |||
f598101ee8 | |||
4965a903ac | |||
5414276a16 | |||
4c479749f9 | |||
270bb4ae1b | |||
16c8769ab9 | |||
2efc6161f2 | |||
538643b5ba | |||
c7a67f5c53 | |||
29c98e374c | |||
8247048ff8 | |||
96520084c6 | |||
8afa4441d1 | |||
04178043d8 | |||
a16a083913 | |||
0362c1438b | |||
300fc96d48 | |||
1ad3713000 | |||
1c1ab77a70 | |||
dd3b75d140 | |||
b2085ae49e | |||
4a8c73f9d0 | |||
45a6e42356 | |||
d0c369fb58 | |||
108a22f1b9 | |||
5b6a6eedfa | |||
2a6072b87f | |||
7ddfd544a7 | |||
5be7005357 | |||
1d8e6b25c9 | |||
a5dfee77e2 | |||
8378b33c46 | |||
23825cf297 | |||
0e989c0d42 | |||
1c2e21bd09 | |||
4102ba9f31 | |||
857651789f | |||
1684ffa612 | |||
6a6f2998ed | |||
f7d001e7b8 | |||
a1ac27d628 | |||
2772cd49df | |||
a017613c30 | |||
49a21be719 | |||
c4dd6a99dd | |||
0a51fc0c15 | |||
be5cfd06e4 | |||
c5cf385614 | |||
eb8dcfe243 | |||
785d922a77 | |||
6fe82e9104 | |||
52e39d4fe9 | |||
7abd8efd81 | |||
1e8e3558ed | |||
d5e090f85a | |||
94a21723ea | |||
de901dadd2 | |||
4da8274875 | |||
7fde2aff36 | |||
d0545b6898 | |||
2294c35e3f | |||
51f18d3f54 | |||
0b528b2f61 | |||
74e58c920c | |||
28396db4a2 | |||
2bfcb1ecab | |||
4d37538a3a | |||
93bc82f6d1 | |||
b49c2ddda3 | |||
fd3cdba0a1 | |||
233b67db75 | |||
4f4d5dfae3 | |||
79e6ecfbac | |||
76f56957ce | |||
f14e5b08f4 | |||
3fbf904bd3 | |||
a29118c6c3 | |||
df1fbb27d8 | |||
ffc5f65a7a | |||
0cc4efc455 | |||
c5e5a3d4e7 | |||
8a5aa3a150 | |||
b0f9117a3d | |||
040b4938e1 | |||
bc34d864ff | |||
4a07a33503 | |||
933228a82a | |||
a777233a7a | |||
79fb4b260d | |||
3f414f4bdf | |||
04bebad82f | |||
0808bdaa0f | |||
fc5d436021 | |||
eca8ced2c8 | |||
6847db1304 | |||
e8d75cffe3 | |||
2de48097c0 | |||
7bc8c9fa36 | |||
d268ed4955 | |||
7376a1e125 | |||
df92d3c468 | |||
190854dc2f | |||
6e778aadf5 | |||
8249ad86ea | |||
631768f01b | |||
b7f9fec075 | |||
5672db086a | |||
adbe77647a | |||
d44a479177 | |||
09f9c042e4 | |||
cfa479ba3e | |||
4fe3780528 | |||
f96fb69fda | |||
675aed2094 | |||
e31eab5303 | |||
1bf7422904 | |||
740506343f | |||
91dfbffd69 | |||
bc0df7b6a7 | |||
8bd576f636 | |||
7a645486ab | |||
14006f83b5 | |||
f83a180de8 | |||
535ad73c04 | |||
4390e14485 | |||
eb568a8cba | |||
2b80b801b1 | |||
107079fbab | |||
57c1950d40 | |||
40e700cf86 | |||
f1f50dc447 | |||
2f3edc0352 | |||
959f6e550f | |||
748a82a23b | |||
009b34bccb | |||
6cd794fa18 | |||
b258a9c340 | |||
d8447aea72 | |||
d5c12a47c2 | |||
0d7cf1af81 | |||
64d94eb95f | |||
28eda6caa0 | |||
150c803d19 | |||
d88fe0e894 | |||
225afdec1f | |||
4175289690 | |||
d669e6e864 | |||
1a70007697 | |||
0208e59ad6 | |||
1bf2fb47b7 | |||
8deee64007 | |||
42cceabd8e | |||
6eb413dd1e | |||
81b895bd1d | |||
2edf1fc692 | |||
8c489e86d2 | |||
530fcf255b | |||
af1b3a6d3a | |||
04d344a133 | |||
7226cbb53d | |||
f168f7e18e | |||
923cfaab5c | |||
b3aa588650 | |||
08b92148ca | |||
914ae20e74 | |||
c562024407 | |||
6aa405187f | |||
ad0b335648 | |||
83690d5aaf | |||
df30d4b5c9 | |||
0296f6c6e9 | |||
7bdabc207d | |||
5e0d3bedef | |||
e23a4c5da7 | |||
d25b41f1de | |||
07126decab | |||
5ee25515c1 | |||
f86b5dd0ad | |||
d8a187a8f6 | |||
1f52a3fc20 | |||
c58e2481b9 | |||
7b99298203 | |||
2ff6b85771 | |||
5c4b64d656 | |||
36539cdd1d | |||
afb12d7403 | |||
f31ac4bdc8 | |||
69a0dbca4d | |||
eced7ab068 | |||
d73a1abbe4 | |||
ac5b5fdefb | |||
1f1a0168e7 | |||
86f9184320 | |||
9b1ea3d8de | |||
e7aad6a345 | |||
aa8d18c081 | |||
6bc4caa4e6 | |||
68df5a389d | |||
21c57e935e | |||
9cd3e7cf56 | |||
489d805cb4 | |||
b974f91da8 | |||
4b1eecf026 | |||
01bda41ba8 | |||
0e60a4903e | |||
926d71c8a1 |
423
ChangeLog
423
ChangeLog
@ -1,10 +1,163 @@
|
||||
Deluge 1.1.0 - "" (In Development)
|
||||
Core:
|
||||
=== Deluge 1.1.7 - (25 April 2009) ===
|
||||
==== Core ====
|
||||
* Fix issue where cannot resume torrent after doing a 'Pause All'
|
||||
* Add workaround for 'address_v4 from unsigned long' bug experienced by users
|
||||
with 64-bit machines. This bug is fixed in libtorrent 0.14.3.
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix #883 segfault if locale is not using UTF-8 encoding
|
||||
* Fix for adding torrents with invalid filename encodings
|
||||
* Fix displaying IPv6 peers in the Peers tab
|
||||
* Fix starting the daemon in OS X
|
||||
* Fix loading improperly created torrents with mismatched encodings
|
||||
* Fix displaying improper progress when creating torrent
|
||||
|
||||
==== Windows ====
|
||||
* Fix freezing in create torrent dialog
|
||||
* Fix creating torrents in Windows
|
||||
* Fix free space check
|
||||
|
||||
=== Deluge 1.1.6 - (06 April 2009) ===
|
||||
==== Core ====
|
||||
* Fix udp trackers being classified as DHT source
|
||||
* Fix #855 force a resume on a torrent if a 'Force Recheck' is initiated
|
||||
* Fix #862 deluged crash when access http://localhost:58846
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix displaying torrents with non-utf8 encodings in add torrent dialog
|
||||
|
||||
==== WebUI ====
|
||||
* Fix #870 use proper config location for loading ssl cert
|
||||
|
||||
==== Misc ====
|
||||
* Add OpenSSL exception to license
|
||||
|
||||
=== Deluge 1.1.5 - (16 March 2009) ===
|
||||
==== Core ====
|
||||
* Fix config file saving when no current config file exists
|
||||
|
||||
==== GtkUI ====
|
||||
* Add 'Comments' field to the Details tab
|
||||
* Fix #841 maximum upload slots tooltip
|
||||
|
||||
=== Deluge 1.1.4 - (08 March 2009) ===
|
||||
==== Core ====
|
||||
* Fix displaying file errors when the torrent isn't paused
|
||||
* Fix issue where torrents being check would get removed due to "stop at ratio" rules
|
||||
* Fix #790 tracker hosts not correct for some .uk trackers
|
||||
* Make sure config files, resume data and state are fsync'd when saved. This should help prevent data losses on crashes/improper shutdowns.
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix hiding bottom pane when no tabs are enabled upon restart
|
||||
* Fix saving file priorities when switching torrents in the addtorrentdialog
|
||||
* Fix the allocate mode not being preserved when selecting different torrents in addtorrentdialog
|
||||
* Fix #655 issue where default torrent options wouldn't be set for new torrents added to the addtorrentdialog
|
||||
* Fix #817 email notifications fail to substitute format strings
|
||||
|
||||
==== Plugins ====
|
||||
* Label: Fix setting 'Move on completed' folder when connected to a remote daemon
|
||||
|
||||
=== Deluge 1.1.3 - (15 February 2009) ===
|
||||
==== Core ====
|
||||
* Fix issue where checking queue would stop
|
||||
* Fix announcing to SSL trackers
|
||||
|
||||
==== Misc ====
|
||||
* Fix issue when initializing gettext that would prevent deluge from starting
|
||||
* Fix logging exceptions when starting the daemon
|
||||
* Fix displaying errors when a torrent is Checking
|
||||
* Fix #790 tracker hosts not correct for some 3rd-level domain names
|
||||
|
||||
=== Deluge 1.1.2 - (31 January 2009) ===
|
||||
==== Core ====
|
||||
* Fix issue where torrents get stuck Checking
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix #761 use proper theme colours in sidebar
|
||||
* Fix saving files/peers tab state when no column is sorted
|
||||
|
||||
=== Deluge 1.1.1 - (24 January 2009) ===
|
||||
==== Core ====
|
||||
* Fix oldstateupgrader for those upgrading from 0.5.x
|
||||
* Fix setting Peer TOS byte
|
||||
* Fix setting outgoing ports
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix opening links from Help menu and others
|
||||
* Fix remembering sorted column in the torrent list
|
||||
* Fix saving Files tab and Peers tab state
|
||||
* Disable popup notification in preferences on Windows
|
||||
* Fix crashing in Add Torrent Dialog when removing torrents from the list
|
||||
* Do not allow duplicate torrents in the Add Torrent Dialog
|
||||
* Fix translating speed units in status tab when a per-torrent limit is set
|
||||
* Fix torrents not displaying properly after disconnecting and reconnecting to the daemon
|
||||
* Fix when sorting # column, downloads should be on top
|
||||
|
||||
==== Misc ====
|
||||
* Fix bdecoding some torrent files
|
||||
* Fix the -l, --logfile option
|
||||
* Fix #729 tracker icons not being saved in the correct location
|
||||
* Add support for more tracker icons
|
||||
* Fix being able to connect to a local daemon from another user account
|
||||
|
||||
=== Deluge 1.1.0 - "Time gas!" (10 January 2009) ===
|
||||
==== Core ====
|
||||
* Fix issue in get_tracker_host when the torrent has no tracker
|
||||
* Fix crash while trying to convert very old 0.5 config files
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix translation setting in remove torrent dialog
|
||||
* Fix notification bug on startup for already finished torrents
|
||||
|
||||
==== AjaxUI ====
|
||||
* Fix loading on iPods.
|
||||
* Fix sorting on the name column.
|
||||
* Add "Not Implemented" alerts to some functions.
|
||||
* Improve the options tab on the Add Torrent dialog
|
||||
|
||||
==== ConsoleUI ====
|
||||
* Fix auto-complete feature for torrents.
|
||||
|
||||
==== Misc ====
|
||||
* Added '-s', '--set-default-ui' option to deluge
|
||||
|
||||
=== Deluge 1.1.0_RC3 (05 January 2009) ===
|
||||
==== Core ====
|
||||
* Fix applying proxy settings
|
||||
* Fix the display of the tracker host when it's an IP address and not a hostname
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix folder renaming to display the change properly
|
||||
* Fix seeding torrents from moving around when sorting the '#' column
|
||||
|
||||
==== Plugins ====
|
||||
* Label: Fix move on completed
|
||||
* Add 'Peer Guardian Text (GZip)' reader to the Blocklist plugin
|
||||
* Apply Blocklist preferences when clicking on the buttons
|
||||
|
||||
=== Deluge 1.1.0_RC2 (29 December 2008) ===
|
||||
==== Core ====
|
||||
* Fix new version check
|
||||
* Fix issue that prevented torrents from being added
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix tooltip for 'Show session speed in titlebar' option
|
||||
|
||||
==== Plugins ====
|
||||
* Remove Stats plugin since it wasn't intended to be in this release
|
||||
* Fix never-ending import in Blocklist on Windows
|
||||
|
||||
==== Windows ====
|
||||
* Fix double-click association on Windows
|
||||
* Fix Pidgin icon interference
|
||||
|
||||
=== Deluge 1.1.0_RC1 (23 December 2008) ===
|
||||
==== Core ====
|
||||
* Implement #79 ability to change outgoing port range
|
||||
* Implement #296 ability to change peer TOS byte
|
||||
* Add per-torrent move on completed settings
|
||||
* Implement #414 use async save_resume_data method
|
||||
* FilterManager with torrent filtering in get_torrents_status , for sidebar and plugins.
|
||||
* Filter Manager with torrent filtering in get_torrents_status , for sidebar and plugins.
|
||||
* Implement #368 add torrents by infohash/magnet uri (trackerless torrents)
|
||||
* Remove remaining gtk functions in common
|
||||
* Tracker icons.
|
||||
@ -12,15 +165,16 @@ Deluge 1.1.0 - "" (In Development)
|
||||
* Fix #47 the state and config files are no longer invalidated when there is no diskspace
|
||||
* Fix #619 return "" instead of "Infinity" if seconds == 0 in ftime
|
||||
* Add -P, --pidfile option to deluged
|
||||
* Basic authentication for remote access to daemon, see: http://dev.deluge-torrent.org/wiki/Authentication
|
||||
|
||||
GtkUI:
|
||||
==== GtkUI ====
|
||||
* Add peer progress to the peers tab
|
||||
* Add ability to manually add peers
|
||||
* Sorting # column will place downloaders above seeds
|
||||
* Remove dependency on libtorrent for add torrent dialog
|
||||
* Allow adding multiple trackers at once in the edit tracker dialog
|
||||
* Implement #28 Create Torrent Dialog
|
||||
* Redesiged sidebar with filters for Active and Tracker (see FilterManager)
|
||||
* Redesiged sidebar with filters for Active and Tracker (see Filter Manager)
|
||||
* Implement #428 the ability to rename files and directories
|
||||
* Implement #229 add date added column
|
||||
* Implement #596 show speeds in title
|
||||
@ -33,7 +187,7 @@ Deluge 1.1.0 - "" (In Development)
|
||||
* Add "Install Plugin" and "Rescan Plugins" buttons to the Plugins preferences
|
||||
* Make active port test use internal graphic instead of launching browser
|
||||
|
||||
WebUi:
|
||||
==== Web UI ====
|
||||
* Lots of smaller tweaks.
|
||||
* All details tabs have the same features as in gtk-ui 1.0.x
|
||||
* Persistent sessions #486
|
||||
@ -43,18 +197,267 @@ Deluge 1.1.0 - "" (In Development)
|
||||
* Easier apache mod_proxy use.
|
||||
* Redesigned sidebar
|
||||
|
||||
AjaxUI:
|
||||
==== AjaxUI ====
|
||||
* Hosted in a webui template.
|
||||
|
||||
ConsoleUI:
|
||||
==== ConsoleUI ====
|
||||
* New ConsoleUI written by Idoa01
|
||||
* Callable from command-line for scripts.
|
||||
|
||||
Plugins:
|
||||
==== Plugins ====
|
||||
* Stats plugin for graphs.
|
||||
* Label plugin for grouping torrents and per torrent settings.
|
||||
|
||||
Misc:
|
||||
==== Misc ====
|
||||
* Implement #478 display UI options in usage help
|
||||
* Fix #547 add description to name field per HIG entry 2.1.1.1
|
||||
* Fix #531 set default log level to ERROR and add 2 command-line options, "-L, --loglevel" and "-q, --quiet".
|
||||
|
||||
=== Deluge 1.0.7 (10 December 2008) ===
|
||||
==== GtkUI ====
|
||||
* Fix #636 not setting the daemon's config directory when using --config= with the UI in classic mode.
|
||||
* Fix some minor bugs in Connection Manager
|
||||
|
||||
==== Debian ====
|
||||
* Fix #571 notification-daemon-xfce dependency circle
|
||||
|
||||
==== Misc ====
|
||||
* Fix #547 add description to name field per HIG entry 2.1.1.1
|
||||
* libtorrent updates
|
||||
|
||||
==== Plugins ====
|
||||
* Point default blocklist url to our server and up interval to 4 days
|
||||
|
||||
=== Deluge 1.0.6 (01 December 2008) ===
|
||||
==== Core ====
|
||||
* Fix #475 catch unicode decoding errors
|
||||
* Add an option to not include IP overhead in rate limiting (this is equivalent
|
||||
to how 0.5.x behaves)
|
||||
* Have default blocklist url point to our server
|
||||
|
||||
==== GtkUI ====
|
||||
* Display the proper downloaded value in the statistics tab
|
||||
|
||||
==== Windows ====
|
||||
* Fix broken graphic in new release dialog
|
||||
|
||||
=== Deluge 1.0.5 (09 November 2008) ===
|
||||
==== GtkUI ====
|
||||
* Increase the per-torrent stop share ratio max to 99999.0
|
||||
* Fix #528 make sure gtkui config file is written before exiting
|
||||
* Fix UDP tracker support
|
||||
|
||||
==== Web UI ====
|
||||
* Javascript auto refresh for both templates.
|
||||
|
||||
==== Windows ====
|
||||
* Fix #577 adding torrents by drag n' drop
|
||||
* Fix association in Vista
|
||||
* Fix WebUI launch
|
||||
|
||||
==== Debian ====
|
||||
* SID packages now requires Boost 1.36
|
||||
|
||||
==== Ubuntu ====
|
||||
* Jaunty packages are now provided
|
||||
|
||||
=== Deluge 1.0.4 (31 October 2008) ===
|
||||
==== Core ====
|
||||
* Fix #560 force an int value for global max connections
|
||||
* Fix #545 use proper values in ratio calculation
|
||||
* Fix UPnP again..
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix #565 wait for the deluged process to start to prevent defunct processes
|
||||
|
||||
==== OS X ====
|
||||
* Fix issues with gettext
|
||||
|
||||
==== Windows ====
|
||||
* Fix starting on non-English versions of Windows
|
||||
|
||||
=== Deluge 1.0.3 (18 October 2008) ===
|
||||
==== Core ====
|
||||
* Fix upnp - it should work on more routers now too
|
||||
* Fix issue where Deluge would send improper stats to the tracker after a
|
||||
pause/resume.
|
||||
* Fix issue where fastresume files would be rejected when using FAT32. This
|
||||
would cause the torrent to be rechecked on every startup.
|
||||
* Fix ip filtering
|
||||
|
||||
==== GtkUI ====
|
||||
* Re-add the "Max Connections Per Second" option with a default setting of 20
|
||||
|
||||
==== WebUI ====
|
||||
* Fix White template for Opera
|
||||
|
||||
==== Misc ====
|
||||
* Deluge will now use a system libtorrent library if available.
|
||||
* The build system will no longer build libtorrent if a system library is
|
||||
detected.
|
||||
|
||||
=== Deluge 1.0.2 (10 October 2008) ===
|
||||
==== Core ====
|
||||
* Fix issue where torrents will not be properly added to the session
|
||||
|
||||
=== Deluge 1.0.1 (10 October 2008) ===
|
||||
==== Core ====
|
||||
* Change the default max global upload slots to 4 instead of -1 since libtorrent
|
||||
will automatically open more slots to meet the upload speed limit.
|
||||
* Fix display of tracker error messages
|
||||
* Fix add_torrent_url() to download the torrent file in a thread to prevent
|
||||
the main thread from blocking and causing the daemon to freeze.
|
||||
* Removed the 'Maximum Connections Per Second' setting and replaced it with a
|
||||
default setting of 20. This should alleviate speed issues some are experiencing.
|
||||
* Changed max half-open connections default limit to 8 on XP/2000 and 4 on Vista
|
||||
* Prevent being able to set file priorities for compactly allocated torrents as
|
||||
it is not intended to work.
|
||||
* Fix freezing on start-up issues on systems that do not have a properly
|
||||
configured localhost entry.
|
||||
* Change max connections default setting to 200
|
||||
* Fix issue with invalid bencoding from some trackers
|
||||
* Plenty of libtorrent updates that should improve core stability
|
||||
|
||||
==== GtkUI ====
|
||||
* Improve performance of files tab by only updating when values change
|
||||
|
||||
==== Misc ====
|
||||
* Fix #187 set a 5 second timer to save the config file after a config value
|
||||
has been changed.
|
||||
* Fix #503 change the boost lib detection logic to first look for -mt and
|
||||
if not available, fall back to regular boost lib (non-multithreaded)
|
||||
|
||||
==== WebUI ====
|
||||
* Add enable "Auto Add" checkbox
|
||||
|
||||
=== Deluge 1.0.0 - "Sharks Are Bulletproof" (21 September 2008) ===
|
||||
==== Core ====
|
||||
* Include GeoIP database for country look-ups
|
||||
* Fix upgrading from 0.5.x state where torrents would have no trackers
|
||||
|
||||
=== Deluge 0.9.09 - "1.0.0_RC9" (15 September 2008) ===
|
||||
==== Core ====
|
||||
* Bug fixes in libtorrent including a crash when the tracker doesn't
|
||||
have 'announce' in it's url.
|
||||
* Fix fastresume issue causing loss of data by deleting the fastresume file
|
||||
before writing a new one
|
||||
* Fix #475 the use of unicode paths when adding torrents
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix add torrent dialog closing preventing another dialog from being shown
|
||||
* Fix various issues when not using English
|
||||
* Fix setting file priorities on folders
|
||||
|
||||
=== Deluge 0.9.08 - "1.0.0_RC8" (27 August 2008) ===
|
||||
==== Core ====
|
||||
* Attempt to automatically upgrade a 0.5.x state file to new format
|
||||
* Tracker errors now change the tracker status
|
||||
|
||||
==== Plugins ====
|
||||
* Fix bug in Blocklist that prevented downloading a new file every X days
|
||||
|
||||
==== GtkUI ====
|
||||
* Sort filenames alphabetically in add torrent dialog
|
||||
* Fix setting file priorities on folders
|
||||
* Fix #453 allow showing of text in the toolbar buttons
|
||||
|
||||
=== Deluge 0.9.07 - "1.0.0_RC7" (18 August 2008) ===
|
||||
==== Core ====
|
||||
* Fix loading torrents from state when fastresume file is missing
|
||||
* Fix UPnP
|
||||
* Fix to prevent Deluge from segfaulting when trying to autoadd an incomplete torrent file
|
||||
* Fix #407 possible negative ETA
|
||||
|
||||
==== GtkUI ====
|
||||
* Add 'edit' to edit trackers dialog
|
||||
* Improve performance of initial torrent list load
|
||||
* Fix hiding the bottom pane when disabling all the tabs
|
||||
* Fix not showing new torrents if you don't use the All label first
|
||||
* Fix size units to be more accurate
|
||||
* Fix torrentview sorting to be persistent
|
||||
* Fix not displaying file list when state changes
|
||||
* Expand root folder in files tab by default
|
||||
|
||||
==== Null ====
|
||||
* Fix #415 crash when using 'config-set' with no parameters
|
||||
|
||||
==== Windows ====
|
||||
* Fix Vista slowness issue
|
||||
* Fix properly shutting Deluge down when system shuts down
|
||||
* Fix opening folders/files
|
||||
|
||||
=== Deluge 0.9.06 - "1.0.0_RC6" (13 August 2008) ===
|
||||
==== Core ====
|
||||
* Fix CPU spikes
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix move storage dialog when connected to a remote daemon
|
||||
|
||||
=== Deluge 0.9.05 - "1.0.0_RC5" (04 August 2008) ===
|
||||
==== Core ====
|
||||
* Fix deluged running with ssh X forwarding by removing the Gnome lib import
|
||||
* Save resume data periodically to help prevent data loss
|
||||
* Fix queue order shuffling on restart
|
||||
|
||||
==== GtkUI ====
|
||||
* Handle shutting down more cleanly
|
||||
* Add translators to credits
|
||||
|
||||
==== Plugins ====
|
||||
* Improve the Blocklist plugin preferences page.
|
||||
|
||||
==== Windows ====
|
||||
* Fix drag n' drop support
|
||||
|
||||
=== Deluge 0.9.04 - "1.0.0_RC4" (29 July 2008) ===
|
||||
==== Core ====
|
||||
* Fix building with gcc 4.3
|
||||
* Fix do not create torrentfiles folder unless 'copy_torrent_file' is True
|
||||
|
||||
==== GtkUI ====
|
||||
* Add drag n' drop support for adding .torrent files
|
||||
* Double-clicking on host in Connection Manager now will connect to that host
|
||||
* Fix selecting torrents when right-clicking on them in torrentview and filestab
|
||||
* Fix new release check
|
||||
* Display 'total_wanted' instead of 'total_size' in Size column
|
||||
* Fix displaying of torrents when language is not English
|
||||
* Fix the view options to be persistent between sessions
|
||||
* Fix signalreceiver when switching between daemons
|
||||
|
||||
=== Deluge 0.9.03 - "1.0.0_RC3" (21 July 2008) ===
|
||||
==== Core ====
|
||||
* File progress fixes from libtorrent
|
||||
* Fix building on FreeBSD
|
||||
* Fix #350 stop seeds when stop ratio is reached
|
||||
* Fix #358 properly emit torrent_removed signal when remove_at_ratio happens
|
||||
|
||||
==== UI ====
|
||||
* Default to gtkui when running 'deluge' instead of defaulting to last used.
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix open folder
|
||||
* Fix #349 tab ordering when hiding/showing
|
||||
|
||||
==== Windows ====
|
||||
* Fix torrent file association and adding files from command line
|
||||
|
||||
==== Plugins ====
|
||||
* Blocklist plugin has been rewritten
|
||||
|
||||
==== Misc ====
|
||||
* Some changes for python 2.6 compatibility
|
||||
|
||||
=== Deluge 0.9.02 - "1.0.0_RC2" (15 July 2008) ===
|
||||
==== Core ====
|
||||
* Fix displaying of file progress
|
||||
* Fix files to have proper read/write permissions
|
||||
|
||||
==== WebUI ====
|
||||
* Include missing 'classic' template
|
||||
* Update options tab to include queue settings
|
||||
|
||||
==== Windows ====
|
||||
* Fix displaying of tray icon
|
||||
* Fix scrolling of tray menu
|
||||
* Fix hiding of tray icon when shutting down
|
||||
* Fix tray icon tool tip length to show properly
|
||||
|
14
LICENSE
14
LICENSE
@ -1,3 +1,17 @@
|
||||
Deluge is licensed under the GNU General Public License version 3 with the
|
||||
addition of the following special exception:
|
||||
|
||||
In addition, as a special exception, the copyright holders give
|
||||
permission to link the code of portions of this program with the OpenSSL
|
||||
library.
|
||||
You must obey the GNU General Public License in all respects for all of
|
||||
the code used other than OpenSSL. If you modify file(s) with this
|
||||
exception, you may extend this exception to your version of the file(s),
|
||||
but you are not obligated to do so. If you do not wish to do so, delete
|
||||
this exception statement from your version. If you delete this exception
|
||||
statement from all source files in the program, then also delete it here.
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,5 +1,5 @@
|
||||
deluge-torrent (0.9.08-1) unstable; urgency=low
|
||||
deluge-torrent (1.1.2-1) unstable; urgency=low
|
||||
|
||||
* R8 release
|
||||
* 1.1.2 final
|
||||
|
||||
-- Andrew Resch (andar) <andrewresch@gmail.com> Tue, 26 Aug 2008 16:31:14 -0800
|
||||
-- Andrew Resch (andar) <andrewresch@gmail.com> Sat, 31 Jan 2008 16:31:14 -0800
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -7,7 +7,7 @@ Standards-Version: 3.7.2
|
||||
|
||||
Package: deluge-torrent
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${python:Depends}, python-gtk2, python-glade2, python-xdg, python-notify, notification-daemon | notification-daemon-xfce, python-dbus, librsvg2-common, python-pyopenssl, python-setuptools
|
||||
Depends: ${shlibs:Depends}, ${python:Depends}, python-gtk2, python-glade2, python-xdg, python-notify, notification-daemon | notification-daemon-xfce, python-dbus, librsvg2-common, python-pyopenssl, python-setuptools, python-pkg-resources
|
||||
Conflicts: deluge-torrent-common
|
||||
Replaces: deluge-torrent-common
|
||||
Description: A Bittorrent client written in Python/PyGTK
|
||||
|
@ -1,7 +1,7 @@
|
||||
# The contents of this file are subject to the BitTorrent Open Source License
|
||||
# Version 1.1 (the License). You may not copy or use this file, in either
|
||||
# source code or executable form, except in compliance with the License. You
|
||||
# may obtain a copy of the License at http://www.bittorrent.com/license/.
|
||||
# The contents of this file are subject to the Python Software Foundation
|
||||
# License Version 2.3 (the License). You may not copy or use this file, in
|
||||
# either source code or executable form, except in compliance with the License.
|
||||
# You may obtain a copy of the License at http://www.python.org/license.
|
||||
#
|
||||
# Software distributed under the License is distributed on an AS IS basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
@ -10,6 +10,8 @@
|
||||
|
||||
# Written by Petru Paler
|
||||
|
||||
# Minor modifications made by Andrew Resch to replace the BTFailure errors with Exceptions
|
||||
|
||||
def decode_int(x, f):
|
||||
f += 1
|
||||
newf = x.index('e', f)
|
||||
@ -63,8 +65,7 @@ def bdecode(x):
|
||||
r, l = decode_func[x[0]](x, 0)
|
||||
except (IndexError, KeyError, ValueError):
|
||||
raise Exception("not a valid bencoded string")
|
||||
if l != len(x):
|
||||
raise Exception("invalid bencoded value (data after valid prefix)")
|
||||
|
||||
return r
|
||||
|
||||
from types import StringType, IntType, LongType, DictType, ListType, TupleType
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
@ -79,7 +91,7 @@ def get_version():
|
||||
:rtype: string
|
||||
|
||||
"""
|
||||
return pkg_resources.require("Deluge")[0].version.split("r")[0]
|
||||
return pkg_resources.require("Deluge")[0].version
|
||||
|
||||
def get_revision():
|
||||
"""
|
||||
@ -188,17 +200,15 @@ def open_url_in_browser(url):
|
||||
|
||||
:param url: the url to open
|
||||
"""
|
||||
def start_browser():
|
||||
import threading
|
||||
import webbrowser
|
||||
class BrowserThread(threading.Thread):
|
||||
def __init__(self, url):
|
||||
threading.Thread.__init__(self)
|
||||
self.url = url
|
||||
def run(self):
|
||||
webbrowser.open(self.url)
|
||||
BrowserThread(url).start()
|
||||
return False
|
||||
import threading
|
||||
import webbrowser
|
||||
class BrowserThread(threading.Thread):
|
||||
def __init__(self, url):
|
||||
threading.Thread.__init__(self)
|
||||
self.url = url
|
||||
def run(self):
|
||||
webbrowser.open(self.url)
|
||||
BrowserThread(url).start()
|
||||
|
||||
## Formatting text functions
|
||||
|
||||
@ -442,10 +452,9 @@ def free_space(path):
|
||||
|
||||
"""
|
||||
if windows_check():
|
||||
import win32api
|
||||
drive = path.split(":")[0]
|
||||
free = win32api.GetDiskFreeSpaceEx(drive)[0]
|
||||
return free
|
||||
import win32file
|
||||
sectors, bytes, free, total = map(long, win32file.GetDiskFreeSpace(path))
|
||||
return (free * sectors * bytes)
|
||||
else:
|
||||
disk_data = os.statvfs(path)
|
||||
block_size = disk_data.f_bsize
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
@ -59,7 +71,6 @@ class Config(object):
|
||||
"""
|
||||
def __init__(self, filename, defaults=None, config_dir=None):
|
||||
self.__config = {}
|
||||
self.__previous_config = {}
|
||||
self.__set_functions = {}
|
||||
self.__change_callback = None
|
||||
# This will get set with a gobject.timeout_add whenever a config option
|
||||
@ -123,8 +134,6 @@ class Config(object):
|
||||
|
||||
log.debug("Setting '%s' to %s of %s", key, value, type(value))
|
||||
|
||||
# Make a copy of the current config prior to changing it
|
||||
self.__previous_config.update(self.__config)
|
||||
self.__config[key] = value
|
||||
# Run the set_function for this key if any
|
||||
try:
|
||||
@ -264,13 +273,25 @@ class Config(object):
|
||||
|
||||
self.__save_timer = None
|
||||
|
||||
# Save the new config and make sure it's written to disk
|
||||
try:
|
||||
log.debug("Saving new config file %s", filename + ".new")
|
||||
pickle.dump(self.__config, open(filename + ".new", "wb"))
|
||||
f = open(filename + ".new", "wb")
|
||||
pickle.dump(self.__config, f)
|
||||
f.flush()
|
||||
os.fsync(f.fileno())
|
||||
f.close()
|
||||
except Exception, e:
|
||||
log.error("Error writing new config file: %s", e)
|
||||
return
|
||||
|
||||
# Make a backup of the old config
|
||||
try:
|
||||
log.debug("Backing up old config file to %s~", filename)
|
||||
shutil.move(filename, filename + "~")
|
||||
except Exception, e:
|
||||
log.error("Error backing up old config..")
|
||||
|
||||
# The new config file has been written successfully, so let's move it over
|
||||
# the existing one.
|
||||
try:
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
import os.path
|
||||
@ -74,7 +86,7 @@ class AuthManager(component.Component):
|
||||
from hashlib import sha1 as sha_hash
|
||||
except ImportError:
|
||||
from sha import new as sha_hash
|
||||
open(auth_file, "w").write("localclient:" + sha_hash(str(random.random())).hexdigest())
|
||||
open(auth_file, "w").write("localclient:" + sha_hash(str(random.random())).hexdigest() + "\n")
|
||||
# Change the permissions on the file so only this user can read/write it
|
||||
os.chmod(auth_file, stat.S_IREAD | stat.S_IWRITE)
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
@ -173,7 +185,11 @@ class Core(
|
||||
# Load the GeoIP DB for country look-ups if available
|
||||
geoip_db = pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat"))
|
||||
if os.path.exists(geoip_db):
|
||||
self.session.load_country_db(geoip_db)
|
||||
try:
|
||||
self.session.load_country_db(geoip_db)
|
||||
except Exception, e:
|
||||
log.error("Unable to load geoip database!")
|
||||
log.exception(e)
|
||||
|
||||
# Set the user agent
|
||||
self.settings = lt.session_settings()
|
||||
@ -317,7 +333,36 @@ class Core(
|
||||
def check_new_release(self):
|
||||
if self.new_release:
|
||||
log.debug("new_release: %s", self.new_release)
|
||||
if self.new_release > deluge.common.get_version():
|
||||
class VersionSplit(object):
|
||||
def __init__(self, ver):
|
||||
ver = ver.lower()
|
||||
vs = ver.split("_") if "_" in ver else ver.split("-")
|
||||
self.version = vs[0]
|
||||
self.suffix = None
|
||||
if len(vs) > 1:
|
||||
for s in ("rc", "alpha", "beta", "dev"):
|
||||
if s in vs[1][:len(s)]:
|
||||
self.suffix = vs[1]
|
||||
|
||||
def __cmp__(self, ver):
|
||||
if self.version > ver.version or (self.suffix and self.suffix[:3] == "dev"):
|
||||
return 1
|
||||
if self.version < ver.version:
|
||||
return -1
|
||||
|
||||
if self.version == ver.version:
|
||||
if self.suffix == ver.suffix:
|
||||
return 0
|
||||
if self.suffix is None:
|
||||
return 1
|
||||
if ver.suffix is None:
|
||||
return -1
|
||||
if self.suffix < ver.suffix:
|
||||
return -1
|
||||
if self.suffix > ver.suffix:
|
||||
return 1
|
||||
|
||||
if VersionSplit(self.new_release) > VersionSplit(deluge.common.get_version()):
|
||||
self.signals.emit("new_version_available", self.new_release)
|
||||
return self.new_release
|
||||
return False
|
||||
@ -474,11 +519,13 @@ class Core(
|
||||
|
||||
def export_pause_all_torrents(self):
|
||||
"""Pause all torrents in the session"""
|
||||
self.session.pause()
|
||||
for torrent in self.torrentmanager.torrents.values():
|
||||
torrent.pause()
|
||||
|
||||
def export_resume_all_torrents(self):
|
||||
"""Resume all torrents in the session"""
|
||||
self.session.resume()
|
||||
for torrent in self.torrentmanager.torrents.values():
|
||||
torrent.resume()
|
||||
self.signals.emit("torrent_all_resumed")
|
||||
|
||||
def export_resume_torrent(self, torrent_ids):
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
@ -76,6 +88,11 @@ class OldStateUpgrader:
|
||||
log.debug("Unable to open 0.5 state file: %s", e)
|
||||
return
|
||||
|
||||
# Check to see if we can upgrade this file
|
||||
if type(state).__name__ == 'list':
|
||||
log.warning("0.5 state file is too old to upgrade")
|
||||
return
|
||||
|
||||
new_state = deluge.core.torrentmanager.TorrentManagerState()
|
||||
for ti, uid in state.torrents.items():
|
||||
torrent_path = os.path.join(self.config["config_location"], "torrentfiles", ti.filename)
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
@ -68,7 +80,7 @@ DEFAULT_PREFS = {
|
||||
"max_download_speed": -1.0,
|
||||
"max_upload_slots_global": 4,
|
||||
"max_half_open_connections": (lambda: deluge.common.windows_check() and
|
||||
(lambda: deluge.common.vista_check() and 4 or 8)() or -1)(),
|
||||
(lambda: deluge.common.vista_check() and 4 or 8)() or 50)(),
|
||||
"max_connections_per_second": 20,
|
||||
"ignore_limits_on_local_network": True,
|
||||
"max_connections_per_torrent": -1,
|
||||
@ -256,7 +268,8 @@ class PreferencesManager(component.Component):
|
||||
def _on_set_outgoing_ports(self, key, value):
|
||||
if not self.config["random_outgoing_ports"]:
|
||||
log.debug("outgoing port range set to %s-%s", value[0], value[1])
|
||||
self.session.outgoing_ports(value[0], value[1])
|
||||
self.settings.outgoing_ports = value[0], value[1]
|
||||
self.session.set_settings(self.settings)
|
||||
|
||||
def _on_set_random_outgoing_ports(self, key, value):
|
||||
if value:
|
||||
@ -265,7 +278,7 @@ class PreferencesManager(component.Component):
|
||||
def _on_set_peer_tos(self, key, value):
|
||||
log.debug("setting peer_tos to: %s", value)
|
||||
try:
|
||||
self.settings.peer_tos = str(int(value, 16))
|
||||
self.settings.peer_tos = chr(int(value, 16))
|
||||
except ValueError, e:
|
||||
log.debug("Invalid tos byte: %s", e)
|
||||
return
|
||||
@ -461,7 +474,7 @@ class PreferencesManager(component.Component):
|
||||
for k, v in value.items():
|
||||
if v["type"]:
|
||||
proxy_settings = lt.proxy_settings()
|
||||
proxy_settings.proxy_type = lt.proxy_type(v["type"])
|
||||
proxy_settings.type = lt.proxy_type(v["type"])
|
||||
proxy_settings.username = v["username"]
|
||||
proxy_settings.password = v["password"]
|
||||
proxy_settings.hostname = v["hostname"]
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
@ -82,14 +94,10 @@ class TorrentOptions(dict):
|
||||
return k
|
||||
|
||||
def iteritems(self):
|
||||
return self.items().itermitems()
|
||||
return self.items().iteritems()
|
||||
|
||||
def has_key(self, key):
|
||||
if super(TorrentOptions, self).has_key(key):
|
||||
return True
|
||||
elif self.default_keys.has_key(key):
|
||||
return True
|
||||
return False
|
||||
return super(TorrentOptions, self).has_key(key) or key in self.default_keys
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
super(TorrentOptions, self).__setitem__(key, value)
|
||||
@ -97,11 +105,14 @@ class TorrentOptions(dict):
|
||||
def __getitem__(self, key):
|
||||
if super(TorrentOptions, self).has_key(key):
|
||||
return super(TorrentOptions, self).__getitem__(key)
|
||||
else:
|
||||
if self.default_keys[key]:
|
||||
elif key in self.default_keys:
|
||||
if self.default_keys[key] and self.default_keys[key] in self.config.config:
|
||||
return self.config[self.default_keys[key]]
|
||||
else:
|
||||
return self.default_keys[key]
|
||||
else:
|
||||
raise KeyError
|
||||
|
||||
|
||||
class Torrent:
|
||||
"""Torrent holds information about torrents added to the libtorrent session.
|
||||
@ -184,7 +195,14 @@ class Torrent:
|
||||
self.trackers.append(tracker)
|
||||
|
||||
# Various torrent options
|
||||
self.handle.resolve_countries(True)
|
||||
# XXX: Disable resolve_countries if using a 64-bit long and on lt 0.14.2 or lower.
|
||||
# This is a workaround for a bug in lt.
|
||||
import sys
|
||||
if sys.maxint > 0xFFFFFFFF and lt.version < "0.14.3.0":
|
||||
self.handle.resolve_countries(False)
|
||||
else:
|
||||
self.handle.resolve_countries(True)
|
||||
|
||||
self.set_options(self.options)
|
||||
|
||||
# Status message holds error info about the torrent
|
||||
@ -355,6 +373,17 @@ class Torrent:
|
||||
|
||||
log.debug("set_state_based_on_ltstate: %s", deluge.common.LT_TORRENT_STATE[ltstate])
|
||||
log.debug("session.is_paused: %s", component.get("Core").session.is_paused())
|
||||
|
||||
# First we check for an error from libtorrent, and set the state to that
|
||||
# if any occurred.
|
||||
if len(self.handle.status().error) > 0:
|
||||
# This is an error'd torrent
|
||||
self.state = "Error"
|
||||
self.set_status_message(self.handle.status().error)
|
||||
if self.handle.is_paused():
|
||||
self.handle.auto_managed(False)
|
||||
return
|
||||
|
||||
if ltstate == LTSTATE["Queued"] or ltstate == LTSTATE["Checking"]:
|
||||
self.state = "Checking"
|
||||
return
|
||||
@ -365,12 +394,7 @@ class Torrent:
|
||||
elif ltstate == LTSTATE["Allocating"]:
|
||||
self.state = "Allocating"
|
||||
|
||||
if self.handle.is_paused() and len(self.handle.status().error) > 0:
|
||||
# This is an error'd torrent
|
||||
self.state = "Error"
|
||||
self.set_status_message(self.handle.status().error)
|
||||
self.handle.auto_managed(False)
|
||||
elif self.handle.is_paused() and self.handle.is_auto_managed() and not component.get("Core").session.is_paused():
|
||||
if self.handle.is_paused() and self.handle.is_auto_managed() and not component.get("Core").session.is_paused():
|
||||
self.state = "Queued"
|
||||
elif component.get("Core").session.is_paused() or (self.handle.is_paused() and not self.handle.is_auto_managed()):
|
||||
self.state = "Paused"
|
||||
@ -456,7 +480,11 @@ class Torrent:
|
||||
def get_peers(self):
|
||||
"""Returns a list of peers and various information about them"""
|
||||
ret = []
|
||||
peers = self.handle.get_peer_info()
|
||||
try:
|
||||
peers = self.handle.get_peer_info()
|
||||
except IndexError, e:
|
||||
log.error("There was an error getting peer info! This may be a bug in libtorrent. Please upgrade to libtorrent >= 0.14.3.")
|
||||
return ret
|
||||
|
||||
for peer in peers:
|
||||
# We do not want to report peers that are half-connected
|
||||
@ -517,12 +545,25 @@ class Torrent:
|
||||
tracker = self.trackers[0]["url"]
|
||||
|
||||
if tracker:
|
||||
url = urlparse(tracker)
|
||||
url = urlparse(tracker.replace("udp://", "http://"))
|
||||
if hasattr(url, "hostname"):
|
||||
host = (url.hostname or 'DHT')
|
||||
# Check if hostname is an IP address and just return it if that's the case
|
||||
import socket
|
||||
try:
|
||||
socket.inet_aton(host)
|
||||
except socket.error:
|
||||
pass
|
||||
else:
|
||||
# This is an IP address because an exception wasn't raised
|
||||
return url.hostname
|
||||
|
||||
parts = host.split(".")
|
||||
if len(parts) > 2:
|
||||
host = ".".join(parts[-2:])
|
||||
if parts[-2] in ("co", "com", "net", "org") or parts[-1] in ("uk"):
|
||||
host = ".".join(parts[-3:])
|
||||
else:
|
||||
host = ".".join(parts[-2:])
|
||||
return host
|
||||
return ""
|
||||
|
||||
@ -586,6 +627,14 @@ class Torrent:
|
||||
"time_added": self.time_added
|
||||
}
|
||||
|
||||
def ti_comment():
|
||||
if self.handle.has_metadata():
|
||||
try:
|
||||
return self.torrent_info.comment().decode("utf8", "ignore")
|
||||
except UnicodeDecodeError:
|
||||
return self.torrent_info.comment()
|
||||
return ""
|
||||
|
||||
def ti_name():
|
||||
if self.handle.has_metadata():
|
||||
try:
|
||||
@ -616,6 +665,7 @@ class Torrent:
|
||||
return 0
|
||||
|
||||
fns = {
|
||||
"comment": ti_comment,
|
||||
"name": ti_name,
|
||||
"private": ti_priv,
|
||||
"total_size": ti_total_size,
|
||||
@ -654,7 +704,13 @@ class Torrent:
|
||||
self.handle.set_upload_limit(int(self.max_upload_speed * 1024))
|
||||
self.handle.set_download_limit(int(self.max_download_speed * 1024))
|
||||
self.handle.prioritize_files(self.file_priorities)
|
||||
self.handle.resolve_countries(True)
|
||||
# XXX: Disable resolve_countries if using a 64-bit long and on lt 0.14.2 or lower.
|
||||
# This is a workaround for a bug in lt.
|
||||
import sys
|
||||
if sys.maxint > 0xFFFFFFFF and lt.version < "0.14.3.0":
|
||||
self.handle.resolve_countries(False)
|
||||
else:
|
||||
self.handle.resolve_countries(True)
|
||||
|
||||
def pause(self):
|
||||
"""Pause this torrent"""
|
||||
@ -744,6 +800,8 @@ class Torrent:
|
||||
log.debug("Saving fastresume file: %s", path)
|
||||
fastresume = open(path, "wb")
|
||||
fastresume.write(resume_data)
|
||||
fastresume.flush()
|
||||
os.fsync(fastresume.fileno())
|
||||
fastresume.close()
|
||||
except IOError:
|
||||
log.warning("Error trying to save fastresume file")
|
||||
@ -812,6 +870,7 @@ class Torrent:
|
||||
"""Forces a recheck of the torrents pieces"""
|
||||
try:
|
||||
self.handle.force_recheck()
|
||||
self.handle.resume()
|
||||
except Exception, e:
|
||||
log.debug("Unable to force recheck: %s", e)
|
||||
return False
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
@ -165,6 +177,8 @@ class TorrentManager(component.Component):
|
||||
self.on_alert_file_renamed)
|
||||
self.alerts.register_handler("metadata_received_alert",
|
||||
self.on_alert_metadata_received)
|
||||
self.alerts.register_handler("file_error_alert",
|
||||
self.on_alert_file_error)
|
||||
|
||||
def start(self):
|
||||
# Get the pluginmanager reference
|
||||
@ -210,7 +224,7 @@ class TorrentManager(component.Component):
|
||||
|
||||
def update(self):
|
||||
for torrent_id, torrent in self.torrents.items():
|
||||
if self.config["stop_seed_at_ratio"] or torrent.options["stop_at_ratio"]:
|
||||
if self.config["stop_seed_at_ratio"] or torrent.options["stop_at_ratio"] and torrent.state not in ("Checking", "Allocating"):
|
||||
stop_ratio = self.config["stop_seed_ratio"]
|
||||
if torrent.options["stop_at_ratio"]:
|
||||
stop_ratio = torrent.options["stop_ratio"]
|
||||
@ -538,6 +552,8 @@ class TorrentManager(component.Component):
|
||||
os.path.join(self.config["state_location"], "torrents.state.new"),
|
||||
"wb")
|
||||
cPickle.dump(state, state_file)
|
||||
state_file.flush()
|
||||
os.fsync(state_file.fileno())
|
||||
state_file.close()
|
||||
except IOError:
|
||||
log.warning("Unable to save state file.")
|
||||
@ -618,8 +634,11 @@ class TorrentManager(component.Component):
|
||||
def on_alert_torrent_finished(self, alert):
|
||||
log.debug("on_alert_torrent_finished")
|
||||
# Get the torrent_id
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
torrent = self.torrents[torrent_id]
|
||||
log.debug("%s is finished..", torrent_id)
|
||||
# Move completed download to completed folder if needed
|
||||
if not torrent.is_finished:
|
||||
@ -631,22 +650,26 @@ class TorrentManager(component.Component):
|
||||
if move_path:
|
||||
if torrent.options["download_location"] != move_path:
|
||||
torrent.move_storage(move_path)
|
||||
torrent.is_finished = True
|
||||
component.get("SignalManager").emit("torrent_finished", torrent_id)
|
||||
|
||||
torrent.is_finished = True
|
||||
torrent.update_state()
|
||||
torrent.save_resume_data()
|
||||
component.get("SignalManager").emit("torrent_finished", torrent_id)
|
||||
|
||||
def on_alert_torrent_paused(self, alert):
|
||||
log.debug("on_alert_torrent_paused")
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
# Get the torrent_id
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
# Set the torrent state
|
||||
self.torrents[torrent_id].update_state()
|
||||
torrent.update_state()
|
||||
component.get("SignalManager").emit("torrent_paused", torrent_id)
|
||||
|
||||
# Write the fastresume file
|
||||
self.torrents[torrent_id].save_resume_data()
|
||||
torrent.save_resume_data()
|
||||
|
||||
if torrent_id in self.shutdown_torrent_pause_list:
|
||||
self.shutdown_torrent_pause_list.remove(torrent_id)
|
||||
@ -654,20 +677,23 @@ class TorrentManager(component.Component):
|
||||
def on_alert_torrent_checked(self, alert):
|
||||
log.debug("on_alert_torrent_checked")
|
||||
# Get the torrent_id
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
# Set the torrent state
|
||||
self.torrents[torrent_id].update_state()
|
||||
torrent.update_state()
|
||||
|
||||
def on_alert_tracker_reply(self, alert):
|
||||
log.debug("on_alert_tracker_reply: %s", alert.message())
|
||||
# Get the torrent_id
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
# Set the tracker status for the torrent
|
||||
try:
|
||||
if alert.message() != "Got peers from DHT":
|
||||
self.torrents[torrent_id].set_tracker_status(_("Announce OK"))
|
||||
except KeyError:
|
||||
log.debug("torrent_id doesn't exist.")
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
# Set the tracker status for the torrent
|
||||
if alert.message() != "Got peers from DHT":
|
||||
torrent.set_tracker_status(_("Announce OK"))
|
||||
|
||||
# Check to see if we got any peer information from the tracker
|
||||
if alert.handle.status().num_complete == -1 or \
|
||||
@ -679,87 +705,98 @@ class TorrentManager(component.Component):
|
||||
log.debug("on_alert_tracker_announce")
|
||||
# Get the torrent_id
|
||||
try:
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
except RuntimeError:
|
||||
log.debug("Invalid torrent handle.")
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
|
||||
# Set the tracker status for the torrent
|
||||
try:
|
||||
self.torrents[torrent_id].set_tracker_status(_("Announce Sent"))
|
||||
except KeyError:
|
||||
log.debug("torrent_id doesn't exist.")
|
||||
torrent.set_tracker_status(_("Announce Sent"))
|
||||
|
||||
def on_alert_tracker(self, alert):
|
||||
log.debug("on_alert_tracker")
|
||||
# Get the torrent_id
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
|
||||
tracker_status = "%s: %s" % \
|
||||
(_("Alert"), str(alert.message()).strip('"')[8:])
|
||||
# Set the tracker status for the torrent
|
||||
try:
|
||||
self.torrents[torrent_id].set_tracker_status(tracker_status)
|
||||
except KeyError:
|
||||
log.debug("torrent_id doesn't exist.")
|
||||
torrent.set_tracker_status(tracker_status)
|
||||
|
||||
def on_alert_tracker_warning(self, alert):
|
||||
log.debug("on_alert_tracker_warning")
|
||||
# Get the torrent_id
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
tracker_status = '%s: %s' % (_("Warning"), str(alert.message()))
|
||||
# Set the tracker status for the torrent
|
||||
try:
|
||||
self.torrents[torrent_id].set_tracker_status(tracker_status)
|
||||
except KeyError:
|
||||
log.debug("torrent_id doesn't exist.")
|
||||
torrent.set_tracker_status(tracker_status)
|
||||
|
||||
def on_alert_tracker_error(self, alert):
|
||||
log.debug("on_alert_tracker_error")
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
tracker_status = "%s: %s" % (_("Error"), alert.msg)
|
||||
try:
|
||||
torrent.set_tracker_status(tracker_status)
|
||||
except KeyError:
|
||||
log.debug("torrent_id doesn't exist.")
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
tracker_status = "%s: %s" % (_("Error"), alert.msg)
|
||||
torrent.set_tracker_status(tracker_status)
|
||||
|
||||
def on_alert_storage_moved(self, alert):
|
||||
log.debug("on_alert_storage_moved")
|
||||
log.debug("save_path: %s", alert.handle.save_path())
|
||||
# Get the torrent_id
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
try:
|
||||
log.debug("save_path2: %s", self.torrents[torrent_id].handle.save_path())
|
||||
self.torrents[torrent_id].set_save_path(alert.handle.save_path())
|
||||
except KeyError:
|
||||
log.debug("torrent_id doesn't exist.")
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
torrent.set_save_path(alert.handle.save_path())
|
||||
|
||||
def on_alert_torrent_resumed(self, alert):
|
||||
log.debug("on_alert_torrent_resumed")
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
torrent.is_finished = torrent.handle.is_seed()
|
||||
torrent.update_state()
|
||||
|
||||
def on_alert_state_changed(self, alert):
|
||||
log.debug("on_alert_state_changed")
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
self.torrents[torrent_id].update_state()
|
||||
torrent.update_state()
|
||||
component.get("SignalManager").emit("torrent_state_changed", torrent_id)
|
||||
|
||||
def on_alert_save_resume_data(self, alert):
|
||||
log.debug("on_alert_save_resume_data")
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
torrent.write_resume_data(alert.resume_data)
|
||||
|
||||
def on_alert_save_resume_data_failed(self, alert):
|
||||
log.debug("on_alert_save_resume_data_failed: %s", alert.message())
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
torrent.waiting_on_resume_data = False
|
||||
|
||||
def on_alert_file_renamed(self, alert):
|
||||
log.debug("on_alert_file_renamed")
|
||||
log.debug("index: %s name: %s", alert.index, alert.name)
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
torrent = self.torrents[torrent_id]
|
||||
|
||||
torrent.files[alert.index]["path"] = alert.name
|
||||
|
||||
# We need to see if this file index is in a waiting_on_folder list
|
||||
@ -782,5 +819,16 @@ class TorrentManager(component.Component):
|
||||
|
||||
def on_alert_metadata_received(self, alert):
|
||||
log.debug("on_alert_metadata_received")
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
torrent.write_torrentfile()
|
||||
|
||||
def on_alert_file_error(self, alert):
|
||||
log.debug("on_alert_file_error: %s", alert.message())
|
||||
try:
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
except:
|
||||
return
|
||||
torrent.update_state()
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH DELUGE 1 "November 2008" "1.0.6"
|
||||
.TH DELUGE 1 "April 2009" "1.1.7"
|
||||
|
||||
.SH NAME
|
||||
deluge - a bittorrent client
|
||||
@ -38,15 +38,17 @@ Output to designated logfile instead of stdout
|
||||
Set the log level (default is error): none, info, warning, error, critical, debug
|
||||
.TP
|
||||
.I -q --quiet
|
||||
Sets the log level to 'none', this is the same as `-L none`
|
||||
|
||||
Sets the log level to 'none', this is the same as `\-L none`
|
||||
.TP
|
||||
.I -s DEFAULT_UI, --set-default-ui=DEFAULT_UI
|
||||
Sets the default UI to be run when no UI is specified
|
||||
|
||||
.SH SEE ALSO
|
||||
.B Homepage:
|
||||
http://www.deluge-torrent.org/
|
||||
|
||||
.SH AUTHOR
|
||||
This manual page was written by Andrew Resch <andrew.resch@gmail.com>.
|
||||
This manual page was written by Andrew Resch <andrewresch@gmail.com>.
|
||||
.br
|
||||
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation
|
||||
.br
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH DELUGED 1 "November 2008" "1.0.6"
|
||||
.TH DELUGED 1 "April 2009" "1.1.7"
|
||||
|
||||
.SH NAME
|
||||
deluged - a bittorrent client daemon
|
||||
@ -41,7 +41,7 @@ Use pidfile to store process id
|
||||
Set the log level (default is error): none, info, warning, error, critical, debug
|
||||
.TP
|
||||
.I -q --quiet
|
||||
Sets the log level to 'none', this is the same as `-L none`
|
||||
Sets the log level to 'none', this is the same as `\-L none`
|
||||
|
||||
.SH SEE ALSO
|
||||
.B Homepage:
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
@ -1,14 +1,5 @@
|
||||
deluge/plugins/label/label/data/label_pref.glade
|
||||
deluge/plugins/label/label/data/label_options.glade
|
||||
deluge/plugins/label/build/lib/label/data/label_pref.glade
|
||||
deluge/plugins/label/build/lib/label/data/label_options.glade
|
||||
deluge/plugins/graph/build/lib/graph/data/config.glade
|
||||
deluge/plugins/blocklist/build/lib/blocklist/data/blocklist_pref.glade
|
||||
deluge/plugins/blocklist/blocklist/data/blocklist_pref.glade
|
||||
deluge/plugins/stats/build/lib/stats/data/config.glade
|
||||
deluge/plugins/stats/build/lib/stats/data/tabs.glade
|
||||
deluge/plugins/stats/stats/data/config.glade
|
||||
deluge/plugins/stats/stats/data/tabs.glade
|
||||
deluge/ui/gtkui/glade/add_torrent_dialog.glade
|
||||
deluge/ui/gtkui/glade/filtertree_menu.glade
|
||||
deluge/ui/gtkui/glade/torrent_menu.glade
|
||||
@ -18,7 +9,6 @@ deluge/ui/gtkui/glade/edit_trackers.glade
|
||||
deluge/ui/gtkui/glade/queuedtorrents.glade
|
||||
deluge/ui/gtkui/glade/move_storage_dialog.glade
|
||||
deluge/ui/gtkui/glade/connection_manager.glade
|
||||
deluge/ui/gtkui/glade/wizard.glade
|
||||
deluge/ui/gtkui/glade/create_torrent_dialog.glade
|
||||
deluge/ui/gtkui/glade/dgtkpopups.glade
|
||||
deluge/ui/gtkui/glade/tray_menu.glade
|
||||
@ -65,14 +55,6 @@ deluge/plugins/blocklist/blocklist/core.py
|
||||
deluge/plugins/coreclient.py
|
||||
deluge/plugins/__init__.py
|
||||
deluge/plugins/webuipluginbase.py
|
||||
deluge/plugins/stats/setup.py
|
||||
deluge/plugins/stats/stats/webui.py
|
||||
deluge/plugins/stats/stats/gtkui.py
|
||||
deluge/plugins/stats/stats/test.py
|
||||
deluge/plugins/stats/stats/graph.py
|
||||
deluge/plugins/stats/stats/test_total.py
|
||||
deluge/plugins/stats/stats/__init__.py
|
||||
deluge/plugins/stats/stats/core.py
|
||||
deluge/configmanager.py
|
||||
deluge/ui/tracker_icons.py
|
||||
deluge/ui/client.py
|
||||
@ -96,7 +78,7 @@ deluge/ui/console/__init__.py
|
||||
deluge/ui/gtkui/listview.py
|
||||
deluge/ui/gtkui/options_tab.py
|
||||
deluge/ui/gtkui/statusbar.py
|
||||
deluge/ui/gtkui/statistics_tab.py
|
||||
deluge/ui/gtkui/status_tab.py
|
||||
deluge/ui/gtkui/addtorrentdialog.py
|
||||
deluge/ui/gtkui/coreconfig.py
|
||||
deluge/ui/gtkui/sidebar.py
|
||||
@ -156,7 +138,6 @@ deluge/ui/webui/lib/webpy022/webapi.py
|
||||
deluge/ui/webui/lib/webpy022/form.py
|
||||
deluge/ui/webui/lib/json.py
|
||||
deluge/ui/webui/lib/newforms_plus.py
|
||||
deluge/ui/webui/lib/pythonize.py
|
||||
deluge/ui/webui/lib/egg_render.py
|
||||
deluge/ui/webui/lib/static_handler.py
|
||||
deluge/ui/webui/lib/__init__.py
|
||||
@ -193,8 +174,6 @@ deluge/ui/webui/scripts/template_strings.py
|
||||
deluge/ui/webui/scripts/extract_ajax_strings.py
|
||||
deluge/ui/webui/scripts/copy_icons.py
|
||||
deluge/ui/webui/scripts/extract_template_strings.py
|
||||
deluge/ui/null/deluge_shell.py
|
||||
deluge/ui/null/__init__.py
|
||||
deluge/common.py
|
||||
deluge/component.py
|
||||
deluge/main.py
|
||||
@ -211,4 +190,3 @@ deluge/xmlrpclib.py
|
||||
deluge/scripts/deluge_remote.py
|
||||
deluge/scripts/wiki_docgen.py
|
||||
deluge/scripts/create_plugin.py
|
||||
deluge/scripts/state_upgrade.py
|
||||
|
1265
deluge/i18n/ar.po
1265
deluge/i18n/ar.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3046
deluge/i18n/be.po
Normal file
3046
deluge/i18n/be.po
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3046
deluge/i18n/bn.po
Normal file
3046
deluge/i18n/bn.po
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1803
deluge/i18n/cs.po
1803
deluge/i18n/cs.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1354
deluge/i18n/de.po
1354
deluge/i18n/de.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1771
deluge/i18n/el.po
1771
deluge/i18n/el.po
File diff suppressed because it is too large
Load Diff
1064
deluge/i18n/en_AU.po
1064
deluge/i18n/en_AU.po
File diff suppressed because it is too large
Load Diff
1762
deluge/i18n/en_CA.po
1762
deluge/i18n/en_CA.po
File diff suppressed because it is too large
Load Diff
1666
deluge/i18n/en_GB.po
1666
deluge/i18n/en_GB.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1008
deluge/i18n/es.po
1008
deluge/i18n/es.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1119
deluge/i18n/fi.po
1119
deluge/i18n/fi.po
File diff suppressed because it is too large
Load Diff
1493
deluge/i18n/fr.po
1493
deluge/i18n/fr.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1110
deluge/i18n/hu.po
1110
deluge/i18n/hu.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2188
deluge/i18n/is.po
2188
deluge/i18n/is.po
File diff suppressed because it is too large
Load Diff
1367
deluge/i18n/it.po
1367
deluge/i18n/it.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1754
deluge/i18n/ja.po
1754
deluge/i18n/ja.po
File diff suppressed because it is too large
Load Diff
3046
deluge/i18n/jv.po
Normal file
3046
deluge/i18n/jv.po
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
4432
deluge/i18n/kk.po
4432
deluge/i18n/kk.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1447
deluge/i18n/ko.po
1447
deluge/i18n/ko.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1382
deluge/i18n/lv.po
1382
deluge/i18n/lv.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1786
deluge/i18n/ms.po
1786
deluge/i18n/ms.po
File diff suppressed because it is too large
Load Diff
1132
deluge/i18n/nb.po
1132
deluge/i18n/nb.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1438
deluge/i18n/nl.po
1438
deluge/i18n/nl.po
File diff suppressed because it is too large
Load Diff
3052
deluge/i18n/nn.po
Normal file
3052
deluge/i18n/nn.po
Normal file
File diff suppressed because it is too large
Load Diff
1600
deluge/i18n/pl.po
1600
deluge/i18n/pl.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1501
deluge/i18n/pt.po
1501
deluge/i18n/pt.po
File diff suppressed because it is too large
Load Diff
1105
deluge/i18n/pt_BR.po
1105
deluge/i18n/pt_BR.po
File diff suppressed because it is too large
Load Diff
1637
deluge/i18n/ro.po
1637
deluge/i18n/ro.po
File diff suppressed because it is too large
Load Diff
1471
deluge/i18n/ru.po
1471
deluge/i18n/ru.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1710
deluge/i18n/sk.po
1710
deluge/i18n/sk.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1476
deluge/i18n/sr.po
1476
deluge/i18n/sr.po
File diff suppressed because it is too large
Load Diff
1280
deluge/i18n/sv.po
1280
deluge/i18n/sv.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1410
deluge/i18n/tr.po
1410
deluge/i18n/tr.po
File diff suppressed because it is too large
Load Diff
1996
deluge/i18n/uk.po
1996
deluge/i18n/uk.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1896
deluge/i18n/zh_CN.po
1896
deluge/i18n/zh_CN.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1467
deluge/i18n/zh_TW.po
1467
deluge/i18n/zh_TW.po
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
@ -27,12 +39,32 @@
|
||||
|
||||
import logging
|
||||
|
||||
# Setup the logger
|
||||
logging.basicConfig(
|
||||
level=logging.ERROR,
|
||||
format="[%(levelname)-8s] %(asctime)s %(module)s:%(lineno)d %(message)s",
|
||||
datefmt="%H:%M:%S"
|
||||
)
|
||||
levels = {
|
||||
"info": logging.INFO,
|
||||
"warning": logging.WARNING,
|
||||
"error": logging.ERROR,
|
||||
"none": logging.CRITICAL,
|
||||
"debug": logging.DEBUG
|
||||
}
|
||||
def setupLogger(level="error", filename=None):
|
||||
"""
|
||||
Sets up the basic logger and if `:param:filename` is set, then it will log
|
||||
to that file instead of stdout.
|
||||
|
||||
:param level: str, the level to log
|
||||
:param filename: str, the file to log to
|
||||
"""
|
||||
|
||||
if not level or level not in levels:
|
||||
level = "error"
|
||||
|
||||
logging.basicConfig(
|
||||
level=levels[level],
|
||||
format="[%(levelname)-8s] %(asctime)s %(module)s:%(lineno)d %(message)s",
|
||||
datefmt="%H:%M:%S",
|
||||
filename=filename,
|
||||
filemode="w"
|
||||
)
|
||||
|
||||
def setLoggerLevel(level):
|
||||
"""
|
||||
@ -41,14 +73,6 @@ def setLoggerLevel(level):
|
||||
:param level: str, a string representing the desired level
|
||||
|
||||
"""
|
||||
levels = {
|
||||
"info": logging.INFO,
|
||||
"warning": logging.WARNING,
|
||||
"error": logging.ERROR,
|
||||
"none": logging.CRITICAL,
|
||||
"debug": logging.DEBUG
|
||||
}
|
||||
|
||||
if level not in levels:
|
||||
return
|
||||
|
||||
|
@ -19,7 +19,19 @@
|
||||
# along with deluge. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# In addition, as a special exception, the copyright holders give
|
||||
# permission to link the code of portions of this program with the OpenSSL
|
||||
# library.
|
||||
# You must obey the GNU General Public License in all respects for all of
|
||||
# the code used other than OpenSSL. If you modify file(s) with this
|
||||
# exception, you may extend this exception to your version of the file(s),
|
||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
|
||||
@ -33,7 +45,9 @@ import os.path
|
||||
import sys
|
||||
from optparse import OptionParser
|
||||
|
||||
import deluge.log
|
||||
import deluge.common
|
||||
import deluge.configmanager
|
||||
|
||||
def start_ui():
|
||||
"""Entry point for ui script"""
|
||||
@ -58,10 +72,22 @@ def start_ui():
|
||||
help="Set the log level: none, info, warning, error, critical, debug", action="store", type="str")
|
||||
parser.add_option("-q", "--quiet", dest="quiet",
|
||||
help="Sets the log level to 'none', this is the same as `-L none`", action="store_true", default=False)
|
||||
parser.add_option("-s", "--set-default-ui", dest="default_ui",
|
||||
help="Sets the default UI to be run when no UI is specified", action="store", type="str")
|
||||
|
||||
# Get the options and args from the OptionParser
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if options.default_ui:
|
||||
if options.config:
|
||||
deluge.configmanager.set_config_dir(options.config)
|
||||
|
||||
config = deluge.configmanager.ConfigManager("ui.conf")
|
||||
config["default_ui"] = options.default_ui
|
||||
config.save()
|
||||
print "The default UI has been changed to", options.default_ui
|
||||
sys.exit(0)
|
||||
|
||||
if options.quiet:
|
||||
options.loglevel = "none"
|
||||
|
||||
@ -76,30 +102,18 @@ def start_ui():
|
||||
if not os.path.exists(deluge.common.get_default_config_dir()):
|
||||
os.makedirs(deluge.common.get_default_config_dir())
|
||||
|
||||
# Always log to a file in Windows
|
||||
if deluge.common.windows_check() and not options.logfile:
|
||||
options.logfile = "deluge.log"
|
||||
|
||||
# Setup the logger
|
||||
deluge.log.setupLogger(level=options.loglevel, filename=options.logfile)
|
||||
if options.logfile:
|
||||
if options.config:
|
||||
logfile = os.path.join(options.config, options.logfile)
|
||||
else:
|
||||
config_dir = deluge.common.get_default_config_dir()
|
||||
logfile = os.path.join(config_dir, options.logfile)
|
||||
sys.stdout = open(logfile, "wb")
|
||||
sys.stderr = sys.stdout
|
||||
sys.stdout = None
|
||||
sys.stderr = None
|
||||
sys.stdin = None
|
||||
|
||||
from deluge.log import LOG as log
|
||||
# Set the log level if necessary
|
||||
if options.loglevel:
|
||||
import deluge.log
|
||||
deluge.log.setLoggerLevel(options.loglevel)
|
||||
|
||||
version = deluge.common.get_version()
|
||||
if deluge.common.get_revision() != "":
|
||||
version = version + "r" + deluge.common.get_revision()
|
||||
|
||||
from deluge.log import LOG as log
|
||||
log.info("Deluge ui %s", version)
|
||||
log.debug("options: %s", options)
|
||||
log.debug("args: %s", args)
|
||||
@ -148,23 +162,14 @@ def start_daemon():
|
||||
if not os.path.exists(deluge.common.get_default_config_dir()):
|
||||
os.makedirs(deluge.common.get_default_config_dir())
|
||||
|
||||
# Opens a log file and redirects stdout to it
|
||||
# Sets the options.logfile to point to the default location
|
||||
def open_logfile():
|
||||
path = None
|
||||
if options.logfile:
|
||||
path = options.logfile
|
||||
else:
|
||||
if not options.logfile:
|
||||
if options.config:
|
||||
path = os.path.join(options.config, "deluged.log")
|
||||
options.logfile = os.path.join(options.config, "deluged.log")
|
||||
else:
|
||||
config_dir = deluge.common.get_default_config_dir()
|
||||
path = os.path.join(config_dir, "deluged.log")
|
||||
|
||||
# Open a logfile
|
||||
if path:
|
||||
sys.stdout = open(path, "wb")
|
||||
sys.stderr = sys.stdout
|
||||
sys.stdin = None
|
||||
options.logfile = os.path.join(config_dir, "deluged.log")
|
||||
|
||||
# Writes out a pidfile if necessary
|
||||
def write_pidfile():
|
||||
@ -174,7 +179,7 @@ def start_daemon():
|
||||
# If the donot daemonize is set, then we just skip the forking
|
||||
if not options.donot:
|
||||
# Windows check, we log to the config folder by default
|
||||
if deluge.common.windows_check():
|
||||
if deluge.common.windows_check() or deluge.common.osx_check():
|
||||
open_logfile()
|
||||
write_pidfile()
|
||||
else:
|
||||
@ -191,10 +196,12 @@ def start_daemon():
|
||||
# Do not daemonize
|
||||
write_pidfile()
|
||||
|
||||
# Set the log level if necessary
|
||||
if options.loglevel:
|
||||
import deluge.log
|
||||
deluge.log.setLoggerLevel(options.loglevel)
|
||||
# Setup the logger
|
||||
deluge.log.setupLogger(level=options.loglevel, filename=options.logfile)
|
||||
|
||||
from deluge.core.daemon import Daemon
|
||||
Daemon(options, args)
|
||||
try:
|
||||
from deluge.core.daemon import Daemon
|
||||
Daemon(options, args)
|
||||
except Exception, e:
|
||||
from deluge.log import LOG as log
|
||||
log.exception(e)
|
||||
|
@ -1,14 +1,20 @@
|
||||
# The contents of this file are subject to the BitTorrent Open Source License
|
||||
# Version 1.1 (the License). You may not copy or use this file, in either
|
||||
# source code or executable form, except in compliance with the License. You
|
||||
# may obtain a copy of the License at http://www.bittorrent.com/license/.
|
||||
# Taken from http://download.bittorrent.com/dl/BitTorrent-5.3-GPL.tar.gz
|
||||
#
|
||||
# Software distributed under the License is distributed on an AS IS basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Written by Bram Cohen
|
||||
# Modifications for use in Deluge by Andrew Resch 2008
|
||||
|
||||
import os
|
||||
import os.path
|
||||
@ -33,30 +39,7 @@ def gmtime():
|
||||
return time.mktime(time.gmtime())
|
||||
|
||||
def get_filesystem_encoding():
|
||||
default_encoding = 'utf8'
|
||||
|
||||
if os.path.supports_unicode_filenames:
|
||||
encoding = None
|
||||
else:
|
||||
try:
|
||||
encoding = sys.getfilesystemencoding()
|
||||
except AttributeError:
|
||||
log.debug("This version of Python cannot detect filesystem encoding.")
|
||||
|
||||
|
||||
if encoding is None:
|
||||
encoding = default_encoding
|
||||
log.debug("Python failed to detect filesystem encoding. "
|
||||
"Assuming '%s' instead.", default_encoding)
|
||||
else:
|
||||
try:
|
||||
'a1'.decode(encoding)
|
||||
except:
|
||||
log.debug("Filesystem encoding '%s' is not supported. Using '%s' instead.",
|
||||
encoding, default_encoding)
|
||||
encoding = default_encoding
|
||||
|
||||
return encoding
|
||||
return sys.getfilesystemencoding()
|
||||
|
||||
def decode_from_filesystem(path):
|
||||
encoding = get_filesystem_encoding()
|
||||
@ -125,11 +108,10 @@ def makeinfo(path, piece_length, progress, name = None,
|
||||
try:
|
||||
u = decode_from_filesystem(name)
|
||||
except Exception, e:
|
||||
s = str_exc(e)
|
||||
raise Exception('Could not convert file/directory name %r to '
|
||||
'Unicode (%s). Either the assumed filesystem '
|
||||
'Unicode. Either the assumed filesystem '
|
||||
'encoding "%s" is wrong or the filename contains '
|
||||
'illegal bytes.') % (name, s, get_filesystem_encoding())
|
||||
'illegal bytes.' % (name, get_filesystem_encoding()))
|
||||
|
||||
if u.translate(noncharacter_translate) != u:
|
||||
raise Exception('File/directory name "%s" contains reserved '
|
||||
@ -150,7 +132,8 @@ def makeinfo(path, piece_length, progress, name = None,
|
||||
for p, f in subs:
|
||||
totalsize += os.path.getsize(f)
|
||||
if totalsize >= piece_length:
|
||||
num_pieces = totalsize / piece_length
|
||||
import math
|
||||
num_pieces = math.ceil(float(totalsize) / float(piece_length))
|
||||
else:
|
||||
num_pieces = 1
|
||||
|
||||
@ -167,13 +150,13 @@ def makeinfo(path, piece_length, progress, name = None,
|
||||
while pos < size:
|
||||
a = min(size - pos, piece_length - done)
|
||||
sh.update(h.read(a))
|
||||
piece_count += 1
|
||||
done += a
|
||||
pos += a
|
||||
totalhashed += a
|
||||
|
||||
if done == piece_length:
|
||||
pieces.append(sh.digest())
|
||||
piece_count += 1
|
||||
done = 0
|
||||
sh = sha()
|
||||
progress(piece_count, num_pieces)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user