Compare commits

...

2523 Commits

Author SHA1 Message Date
e9ba3972ad Bump version for release
Also update deluge.pot and .gitattributes
2013-02-25 17:01:07 +00:00
7fbe163c24 Extractor: Refactor and fix tar.* issue on windows 2013-02-23 02:07:09 +00:00
e4118048eb Add a new DelugeStart theme to win32 gtk
This theme is based upon ANewStart theme and uses murrine theme engine.
2013-02-22 19:04:10 +00:00
bb67721002 Disable unused torrentview reordering property which fixes Win32 mouse scroll bug 2013-02-22 01:03:52 +00:00
9856f97323 Fix #2283 : Potential for sessionproxy keyerror with newly added torrents 2013-02-21 22:47:30 +00:00
e2e37a83de Update Extractor with Win32 and extra archives support
Also disabled extracting on move_completed enabled torrents and fixed
some other small issues.
2013-02-21 21:58:23 +00:00
61c125420b GTKUI: Autofill save path when creating torrent from remote path 2013-02-21 16:23:59 +00:00
36a78d8f21 Optimized torrentview.cell_data_trackericon
cell_data_trackericon would load the tracker icon with
gtk.gdk.pixbuf_new_from_file_at_size each time it's requested.
These regular requests acumulating to thousands calls to
pixbuf_new_from_file_at_size with a big torrent list.

Now, read the tracker icon from disk once, and cache it.
2013-02-17 18:38:35 +00:00
3f4cfd5c88 Replace Exception with GError in filtertreeview 2013-02-17 18:37:01 +00:00
cc85f00588 Update Changelog 2013-02-17 15:17:46 +00:00
72b58d19c1 Build webui js and gettext 2013-02-17 15:00:27 +00:00
bbf17772ac Add tracker host details to debug logging 2013-02-17 14:59:34 +00:00
2cbcb35c9e Add OSX packaging and GTK support 2013-02-14 00:29:55 +00:00
7ef7cc41b6 GTK: Fix showing exception error to user with no libtorrent installed 2013-02-13 01:30:48 +00:00
7c6d1f30ff Fix GTK ConnMgr update after stopping daemon and reduce wait time 2013-02-13 01:30:47 +00:00
8911600155 Fix prioritize first/last pieces for magnet links 2013-02-11 22:09:46 -05:00
c58221c866 Fix renaming folders on libtorrent 0.16 compiled with unicode support (Windows) 2013-02-11 21:36:46 -05:00
92eb9feae4 Fix setting 1GB/s speeds in gtkui 2013-02-11 18:35:26 +00:00
b9311d4b57 Add exception details to EventManager error log 2013-02-05 19:29:25 +00:00
b0d78da13b Fix #2258 : Potential runtimeError when emiting event 2013-02-05 18:56:18 +00:00
12365241a5 Fix #2260 : Add dialog pulling main window to active workspace 2013-02-05 18:06:51 +00:00
8ba5e78610 Fix #2242 : Notifications: Missing word in torrent finished message 2013-02-04 13:26:07 +00:00
1bfaf74ff9 Fix #2261 : WebUI: Proxy settings not being saved 2013-02-04 13:18:34 +00:00
e362b36a59 WebUI: Add failed login log message with IP address for fail2ban 2013-02-04 13:15:44 +00:00
a0ae3ebfce Optimizations to torrentview.update_view
A few changes that reduces the CPU usage of the GTK UI
significantly. This small patch is made simple to be
100% certain not to introduce new bugs.
2013-01-21 01:45:23 -05:00
08d7b9fba3 Fix issue with downloaded torrent temp files on windows which had illegal characters. 2013-01-20 16:26:55 -05:00
95ce85ec78 Make sure sessionproxy events are registered after stopping and starting a daemon from gtkui. 2013-01-17 22:10:48 -05:00
93dee4c764 Don't deliver empty resume_data parameter to session.add_torrent
Fixes a libtorrent crash on python 2.7 on Windows
2013-01-17 22:08:56 -05:00
dcd85e64c0 Add move complete location to webui add torrent dialog. 2013-01-04 18:43:06 -05:00
58e8a0e562 Fix mapped_files error in AddTorrentDialog 2013-01-03 17:30:45 +00:00
bfa3564ba3 Fix Gtk addtorrentdialog parent None error for single file torrents 2013-01-02 22:38:55 +00:00
669d10e6be Fix #2240 : Win32 freespace issue with large capacity drives 2013-01-01 17:44:11 +00:00
3d1b47bca6 Fix error when loading torrent through IPC
Fix bug from commit 0045ec0cf1: missing args attribute error when
loading torrent through IPC on non-windows.
2013-01-01 17:37:42 +00:00
2fde78f236 Update Changelog, webui gettext, gitignore & compress js 2012-12-22 02:24:25 +00:00
444740709a Update translation files from launchpad 2012-12-22 01:40:55 +00:00
d7d91aec0b Fix WebUI submenus closing upon mouse click 2012-12-21 19:34:18 +00:00
e865180e83 Fix issues with js eventmanager. refs #2046
Fix plugin methods not being available when enabled until refresh. refs #2125
2012-12-21 12:51:40 -05:00
782b39c90d Fix #2125
Clean up some json api code.
2012-12-21 12:51:36 -05:00
7e71995e55 WebUI: Catch potential undefined error when attempting to disable a plugin 2012-12-18 21:50:19 +00:00
1dd078f4f1 Fix #1963 : Unhandled OSError if permission issue creating default config dir
The fix now logs the error and exits. To log the error also required moving
the logger setup code to before any default_config_dir call.
2012-12-18 01:03:06 +00:00
0045ec0cf1 Fix #1946 : GtkUI: ReactorNotRestartable error when set as startup application 2012-12-17 19:57:32 +00:00
5ecc580463 Fix #2175 : systemtray free variable self referenced before assignment
This is only the likely fix for the issue as I have been unable to reproduce it.
2012-12-15 21:26:36 +00:00
70047c367a fix error in #2085 commit 3ca886ac7a: value may be a tuple 2012-12-11 00:57:48 +00:00
b65918d616 Catch exception when enabling/disabling indicator in classic mode 2012-12-10 19:33:13 +00:00
3ca886ac7a Fix #2085 : WebUI: Does not show torrents in sidebar for categories other than 'All'
unicode value in filter_dict would not be converted into a list
2012-12-10 15:48:38 +00:00
74208c27f8 Fix #2227 : Torrent file contains sha1 and ed2k digest that needs encoding to hex 2012-12-09 23:22:30 +00:00
7cc8243849 Use try-except instead of if statement to gain a little performance 2012-12-09 22:57:00 +00:00
c741e127b9 First change outside of deluge/ui/console - fixed a problem when removing torrents 2012-12-09 22:51:40 +00:00
b5ea33e506 On some "race" conditions, the torrent is removed before it's status could be retrieved. Return an empty status. 2012-12-09 22:31:22 +00:00
ffe0c168bb Fix #2232 : WebUI: Flag Icon path in Peers Tab missing deluge.config.base 2012-12-09 19:06:40 +00:00
b8c345ff26 Fix #2231 : WebUI: Fix unneeded scrollbars in webui add dialog
Also fix spinner display issue
2012-12-08 19:14:33 +00:00
9286d43ba8 Increase libtorrent alert queue size. fix #2204 2012-12-07 23:10:09 -05:00
23b0f58eb4 fix snafu in last commit 2012-12-05 18:35:44 +00:00
ccd2e5e41d Fix #2130 : Same name can be given to different files in Add Torrent dialog 2012-12-05 18:12:08 +00:00
62a1602d5a Fix #2129 : Empty filename can be set in AddTorrent dialog 2012-12-05 18:10:53 +00:00
b50c848054 Fix #2228 : Apply-To-All in AddTorrent Dialog is copying file renames to other torrents 2012-12-05 14:06:25 +00:00
e4d94ea528 Fix #2220 : MacOSX homebrew build not finding boost libs 2012-12-05 13:49:48 +00:00
fc4ca861da Fix libtorrent version check in torrent.py. fix #2223 2012-12-03 01:14:17 -05:00
74d59eb6ec Fix the version check in _libtorrent to work as intended. 2012-12-03 01:08:31 -05:00
ce4b4ef48e Handle torrent add failures in web UI
Show an error dialog and remove the torrent from the list
when a torrent file fails to upload or a URL fails to download.
2012-12-02 17:34:21 +11:00
2e0b0d9474 Make web build script sh compatible 2012-12-02 15:08:58 +11:00
0e4101a9a3 Add windows support to is_ip 2012-12-01 02:21:01 +00:00
ba4ca111c6 Fix Win32 connection manager hanging when starting new windowsless daemon 2012-11-30 14:44:05 +00:00
827b53792b Update Changelog and deluge.pot 2012-11-29 22:39:37 +00:00
6e75a194c3 Fix typo in json_api docstring 2012-11-28 23:35:56 +00:00
a3a9cae9f7 Fix #1474 : on_show_prefs hook is not executed immediatly after enabling a plugin 2012-11-27 22:47:03 +00:00
f447bd5cea Fix #2110 : Accept magnet uris with xt param anywhere within them 2012-11-27 21:17:26 +00:00
f79785abf2 Fix #2147 : Missing translations for plugin preferences page 2012-11-27 21:14:02 +00:00
a2423ba536 Fix #2146 : Missing translations in View|Tabs submenu
Also fixed small bug when hiding Status tab
2012-11-27 02:02:35 +00:00
4307699bbf Fix torrent names on libtorrent 0.16 on windows. 2012-11-26 19:42:36 -05:00
e7a2a8dcee Fix #2109 : Proxy settings not being cleared by setting None 2012-11-26 22:03:54 +00:00
67450f43b3 Fix print statements for Python2.5 2012-11-26 17:31:01 +00:00
10ccd9aaaf Update Changelog, translation files and compress js 2012-11-26 16:54:36 +00:00
16568404e7 Fix Windows tray submenu items requiring right-click instead of left-click 2012-11-26 13:31:41 +00:00
901f5a84bf Fix #2208 : Win32 Open Folder not working with non-ascii paths 2012-11-26 03:19:20 +00:00
8ffa80c2a2 Fix #2086 : Enable submenus for appindicator 2012-11-26 02:03:20 +00:00
0f16faabcb Fix use of translated text for widget name in build_menu_radio_list 2012-11-26 02:03:20 +00:00
508b5aed8f Fix #2201 : auth fails if auth file has extra newlines 2012-11-25 23:30:13 +00:00
f2b2f98fac Fix #2069 : WebUI: Login window layout problem when using larger than default font size 2012-11-24 17:11:25 +00:00
42e33d452e Fix #1890 : WebUI: Column in files and peers view could use some spacing
Also fixed the SpinnerGroup to no longer show horizontal scrollbar and added
vertical scrolling to detailstab.
2012-11-24 16:10:15 +00:00
ea75cfb6d7 Fix config not defined in ipcinterface 2012-11-24 15:49:57 +00:00
9155191b0a Fix #2103 : WebUI: Sorting by name is case-sensitive 2012-11-24 12:41:54 +00:00
0571799a07 Fix #2120 : WebUI: Manually entered values not being saved in Spinners 2012-11-24 12:41:54 +00:00
aaf4aa5226 Fix #2212 : WebUI: Unable to scroll in proxy preferences page 2012-11-24 12:41:44 +00:00
3e98ef5f89 Add quit dialog when changing classic mode.
Don't change visibility of connection manager when changing classic mode.
2012-11-23 20:47:26 -05:00
c398ef57a5 Fix unhandled error with empty clipboard on Win32 2012-11-23 01:04:01 +00:00
68b413af5f Updates to web gen_gettext script and add .build_data to gitignore 2012-11-23 00:53:49 +00:00
3f79d36489 Removing unneeded webui files 2012-11-23 00:36:37 +00:00
582c6735d0 Fix #2100 : Add option not to bring main window to front when adding torrents through ipcinterface 2012-11-22 23:38:27 +00:00
5d43c2ac94 Update bbfreeze and nsis scripts for win32 packaging
bbfreeze script:
  * Creates a VERSION.tmp file for use by nsis script
  * Includes all theme, icon and locale files. Closes #2096 & #2145
  * Add email.mime.multipart and email.mime.text. Closes #2074
  * deluged.exe and deluge-web.exe will no longer show a cmd window and created
    deluged-debug.exe and deluge-web-debug.exe as replacements if still needed
  * Overridden bbfreeze gtk recipe thus no longer requiring file editing.
  * Remove unnecessary python module includes

nsis script:
  * Deluge version now based upon bbfreeze output
  * Installer will warn if deluge already running. Closes #1217
  * Removed deluged and deluge-web shortcuts from start menu
  * Increased compression level for lzma
2012-11-22 23:19:05 +00:00
845b95d88f updated gitattributes to ignore deluge-web debug files 2012-11-22 23:19:05 +00:00
66437531e8 Update changelog. 2012-11-21 02:16:46 -05:00
666bb09513 Make sure queue order is preserved when restarting daemon. 2012-11-21 02:14:12 -05:00
7d88cb1850 Fix file renaming and moving with unicode characters on libtorrent 0.16
Fix torrent creation with unicode characters

Update changelog
2012-11-21 01:25:18 -05:00
d825be4901 Make path separators in Torrent.get_files consistent across platforms. 2012-11-12 21:12:54 -05:00
135c98634a Eliminate the need to manually call the on_toggle handler for move completed in add torrent dialog. 2012-11-12 21:06:16 -05:00
ecb457c043 Make sure sensitivity of move completed path is always set correctly in add torrent dialog. 2012-11-10 22:25:27 -05:00
cd8ab2805c Fix daemon starting with config dir containing spaces on Windows. 2012-11-09 18:44:36 -05:00
b7ca968fae Fix jitter in gtk torrent view. 2012-11-07 00:35:58 -05:00
8f71b8d5c6 Revert stable sort and speedup commits. 2012-11-07 00:16:24 -05:00
8a72187998 Replaced WMI process enumeration with the EnumProcesses API call. (Shorter, faster, does not depend on pythoncom.) 2012-11-06 22:30:19 +00:00
d9f1210fe7 Fix 2107 : create_plugin.py call correct version of python 2012-11-06 22:21:00 +00:00
0a9fe242e7 Move sensitivity check to a more appropriate place for move completed on add torrent dialog. 2012-11-02 19:25:24 -04:00
e53413902c Update changelog. 2012-11-02 19:17:42 -04:00
bd500c30de Merge remote-tracking branch 'github/1.3-gtk-movecompleted' into 1.3-stable
Conflicts:
	ChangeLog
2012-11-02 18:09:11 -04:00
b8b27bdaf2 Make move completed field sensitive only when check box is enabled on add torrent dialog. 2012-11-02 18:04:38 -04:00
ad8b757387 Fix changelog entry for move completed patch. 2012-11-02 02:09:21 -04:00
fd8dc457fa Add move completed option to add torrent dialog. 2012-11-02 02:06:33 -04:00
69509f446e Update changelog. 2012-11-01 23:41:28 -04:00
db502253c9 Generalize stable sorting to use unique column set for the ListView.
Add a default sorting to the ListView.
Switch gtk speedup patch for new sorting.
2012-11-01 00:25:00 -04:00
8d25a5e691 Merge remote-tracking branch 'bro/1.3-stable-torrentview' into 1.3-stable 2012-10-31 22:05:15 -04:00
3c85cc4b03 Make the gtkui torrent view stable sort. 2012-10-31 00:12:36 -04:00
03abe32054 Fix #2185: register call should be deregister in deregister_event_handler 2012-10-14 00:31:28 +01:00
7695c4e566 Add #1397 : Console UI - Support -s STATE in info
Cherrypick nick's commit from git master with code tidyup and workaround
for tuple issue in filtermanager so backward compatible.
2012-10-13 02:23:48 +01:00
a64fe05890 Ensure torrent_ids is a list
If torrent_ids is created from filter_dict it is a tuple. This results
in an error when attempting to remove a torrent_id from torrent_ids
later on in 'leftover filter args' and 'filter_state_active()'.
2012-10-12 23:48:40 +01:00
762ad783e2 Speed optimizations for the torrentview 2012-10-10 15:53:21 +02:00
aa969fd830 Fix #2169 : Add Torrent Dialog 'Download Location' not set correctly when folder typed into Other->Location field
Using get_current_folder() in the file chooser will use the default folder when a folder path has been typed into the Location field rather than selected with mouse. The solution is to replace it with get_filename().
2012-10-06 22:54:37 +01:00
e5f56e2fdd Fix #2171 : Add Peer dialog stops responding if empty or invalid values entered 2012-09-30 18:23:51 +01:00
610cd7dd33 Fix #2104 : Deluge has no indicator title 2012-09-29 19:15:49 +01:00
bb7b529c29 Fix #2112 : World readable tmp directory in json_api 2012-09-29 17:02:16 +01:00
43390b850a Fix 2163 : Cannot add torrent file with empty (0:) encoding tag 2012-09-27 18:36:50 +01:00
8c2189f161 Fix exception handling in rencode 2012-09-27 18:00:47 +01:00
37ea2854a2 Fix 2160 : Disable use of python bindings for libtorrent extensions and replace with session flag
The fixes a GIL issue causing libtorrent segfault. https://code.google.com/p/libtorrent/issues/detail?id=369

Note: The ut_pex plugin (Peer Exchange) will now always be enabled.
2012-09-27 17:56:13 +01:00
7b9bca0957 Fix copy pasta fail :( 2012-09-19 22:23:48 +10:00
ec3d698a14 Merge branch '1.3-stable' of deluge-torrent.org:deluge into 1.3-stable 2012-09-18 18:00:02 -07:00
3309f59333 Fix previous commit 2012-09-18 17:59:54 -07:00
68990b4a3f Fix execute plugin not working with unicode torrent names 2012-09-16 18:40:53 +10:00
17cac01673 Fix deluge-gtk not working with twisted 12 (fixes #2148) 2012-09-16 18:36:58 +10:00
18eb885983 Don't use deprecated twisted imports (fixes #2164)
Aliases have been removed in twisted 12.2.0.
2012-09-16 17:12:16 +10:00
cb661f2595 Update google.ico so tracker_icons tests pass again 2012-09-16 17:09:23 +10:00
fc14b00868 Only convert the move path to unicode if on windows 2012-09-14 15:56:13 -07:00
725d06f439 Add compile arg needed by libtorrent 0.16.x 2012-08-27 08:25:38 +10:00
3569e18712 Don't clobber filename when adding torrents with mapped_files 2012-08-21 18:31:59 -07:00
42118932f2 Fix exception handling 2012-08-06 15:54:28 -07:00
c480132fa2 Fix autoconnecting to the default host 2012-07-17 17:24:25 -07:00
313a04f9a6 Fix LP#1004793 : Console: Enable use of connect in non-interactive mode 2012-06-28 00:07:06 +01:00
d1f2776463 Update Win32 Installer readme
Also remove unneeded StartX.exe
2012-06-27 01:05:44 +01:00
dac524ccf3 Fix common.open_file for osx 2012-05-30 00:54:56 +01:00
bafd0209af Console: Fix test for empty color string 2012-05-30 00:54:56 +01:00
0a6c2ee147 Also handle alias for quit (exit) 2012-05-30 09:27:37 +10:00
85cdbec10d Only add quit to deluge-console args if it isn't already present
This prevents an error from being raised due to trying to stop
a reactor which is no longer running
2012-05-30 09:15:09 +10:00
f083a3b67b Ensure console commands are executed in order 2012-05-28 00:35:14 +10:00
d08ea7da81 Fix #2062 : Console discards text before first colour string 2012-04-20 12:32:20 +01:00
483c439e38 Fix #2065 : Console crash with missing closing quote 2012-04-19 15:52:59 +01:00
914413c88f Catch & log KeyError when removing a torrent from the queued torrents set
This seems to happen due to libtorrent firing the torrent finished event
twice.
2012-04-12 23:52:50 +10:00
438dff177c Fix formatting in ChangeLog 2012-04-11 23:09:14 +10:00
196458399e Update version number 2012-04-09 18:53:16 -07:00
1d243d5967 Remove some additional DLLs 2012-04-09 18:51:55 -07:00
418037dd43 Update version 2012-04-09 18:42:25 -07:00
900907a545 Update Changelog 2012-04-09 17:28:31 +01:00
b3a721b539 Update Translations from Launchpad 2012-04-09 17:17:12 +01:00
d783b8ead7 WebUI: Increase focus delay for password field cursor 2012-04-09 17:14:11 +01:00
5572f61022 Fix #2071 : KeyError in gtkui when file priority set to value '3'
Bug results from setting file priority value in core which does not
exist in the FILE_PRIORITY dict used by UIs.
2012-04-08 23:35:34 +01:00
fe6e9ec467 Gtkui: move height request to child widget in create dialog 2012-04-08 17:50:55 +01:00
675a64e213 Fix missing semi-colon in deluge.desktop 2012-04-08 12:04:59 +02:00
931b8aec71 Console: Fix prefixed space for tab completing commands
The join command adds space if 'p' is empty string.
2012-03-26 19:08:28 +01:00
f19caf69e0 Console: Fix missing trailing space for command options with tab complete 2012-03-26 19:04:55 +01:00
56a24f16f2 Only assign prioritize_first_last_pieces to torrent options if actually changed 2012-03-26 17:06:51 +01:00
275c939b95 Remove unnecessary translation from connection manager 2012-03-24 00:24:10 +00:00
8238c63156 Use (documented) formatdate over format_date_time 2012-03-23 19:23:01 +11:00
c19718b66a Grey out file priorities for 'is_seed:True' seeding torrents 2012-03-22 01:22:31 +00:00
eac52dec73 Bring MainWindow to front when opening another instance of gtkui 2012-03-22 01:14:41 +00:00
124daaf8b2 Update translations po files 2012-03-21 21:32:58 +00:00
5d6fa23011 Hide unused Infohash button in WebUI 2012-03-14 00:22:48 +00:00
0da64f7db4 Update ChangeLog 2012-03-13 00:05:44 +11:00
b9030dfb8b Preserve order when moving multiple torrents in the queue 2012-03-12 23:46:19 +11:00
3528549430 Add get_queue_position & use it for sorting ids 2012-03-12 23:46:19 +11:00
39a04aae20 Fix not properly detecting when torrent is at end of queue 2012-03-12 23:45:51 +11:00
72a2ace0a1 Update Changelog, deluge.pot and js compress 2012-03-11 19:33:06 +00:00
4240345daf Label Plugin: Mark 'Label Options' for translation 2012-03-11 18:40:04 +00:00
cb9867a26f Label Plugin: Defer translate No Label text in submenu 2012-03-11 18:26:53 +00:00
07e166b94a Label Plugin: Disable menu items for 'All' in sidebar 2012-03-11 18:26:53 +00:00
3c7f492451 Fix Label Plugin text 'All' for translation in sidebar 2012-03-11 18:26:18 +00:00
aeca5dd1e7 Mark torrent menu Pause text for translation 2012-03-11 17:17:29 +00:00
c194f6bbe4 Fix #2052 : Progress bar state text marked for deferred translation 2012-03-11 17:13:25 +00:00
4d77241603 Modified fix for #1957 non-acsii columns 2012-03-10 22:31:43 +00:00
a2a45f1a0b Fix gtk sidebar text for translation 2012-03-10 22:31:17 +00:00
217087a2fe Fix for Up Speed column not sorting in Webui 2012-03-10 13:17:24 +00:00
bb89a355e5 Merge branch '1.3-stable' of deluge-torrent.org:deluge into 1.3-stable 2012-03-04 16:41:43 -08:00
954c0e2d4d Change some of the win32 build/installer scripts to support bundling GTK
in with the installer
2012-03-04 16:41:13 -08:00
9ce738e39a Fix adding magnet error in webui when started from classic mode 2012-03-03 23:41:24 +00:00
911d583ff0 Bump version to 1.3.4 2012-03-03 11:55:13 -08:00
07bc1322dd update depends 2012-03-03 02:32:50 +00:00
1058435700 Set process name to match application using setproctitle
Using the setproctitle module the process name displayed in top
and other places will correctly reflect the binary name. This is an
optional dependency
2012-03-03 02:29:42 +00:00
0676aaf918 Properly wait for the component.shutdown deferred on shutdown. This should prevent the daemon from exiting before all the state has been saved. 2012-03-02 09:15:35 -08:00
5d0dace131 Fix #2045 : UnicodeDecodeError when using non-ascii chars in info
Input arg string needed decoding otherwise comparing with unicode
torrent name fails.
2012-03-02 15:42:15 +00:00
be75d5021b Execute: log stdout/stderr when command fails 2012-03-02 13:03:01 +11:00
b0029517eb Execute: make running commands asynchronous
This prevents deluge from hanging while it waits
for a command to finish.
This also prevents a deadlock from occuring
(c.f. warning at
 http://docs.python.org/library/subprocess.html#subprocess.Popen.wait)
2012-03-02 12:57:47 +11:00
2ae936df44 Remove setting torrent.is_finished in the resume alert
Set torrent.is_finished to false when torrent is in a Checking or Downloading state
2012-02-29 15:20:59 -08:00
1f5cfd16e0 Updates to previous fixes for setting is_finished 2012-02-29 02:56:14 +00:00
b5b0db6c60 Update Changelog and deluge.pot 2012-02-29 01:35:37 +00:00
1f660653ff Set is_finished to match is_seed after checking
Fixes issue where re-downloading data would not change is_finished
2012-02-29 01:35:33 +00:00
7020e5ca90 Blocklist: remove default url as it is outdated 2012-02-29 12:21:18 +11:00
00ebaae67a Blocklist: check for updates iff interval > 0 2012-02-29 12:18:24 +11:00
eb773bba2c Fix preferences dialog not opening with main window on Windows 2012-02-28 22:44:52 +00:00
e10cfb8f8c Fix #1976 : Text entry with trailing newline characters causes issues for Move Storage
Changed most GtkEntry truncate-mutliline properties to True for all single line
entries to prevent similar issues.
2012-02-28 19:29:36 +00:00
fcf26bad45 Add optparse custom version to prevent unnecessary loading of libtorrent 2012-02-28 19:29:35 +00:00
ec373c0ec9 Update translations 2012-02-28 19:29:34 +00:00
933f80c01c Alternative fix for re-enabling plugin issue 2012-02-28 19:29:34 +00:00
89634137b9 Update Changelog 2012-02-27 15:39:08 +00:00
e7dada6afc Fix #2021 : Share ratio limit not obeyed for torrents downloaded outside deluge
Share ratio limit is based upon torrent.is_finished and a seeded torrent added
to the session was not set after checking.
2012-02-27 15:31:53 +00:00
8db789ffe2 Fix #2038 : Chrome 17 disconnecting from webui 2012-02-27 15:31:53 +00:00
dd3aab1cef Catch glade object issue when re-enabling Autoadd
Found an additional glade object from the previous instance of Autoadd
calling cb_get_config resulting in an exceptions.AttributeError.
This workaround simply checks that get_widget is not None.
2012-02-27 15:29:50 +00:00
54769fe190 Fix #2044 : Unable to re-enable execute plugin 2012-02-27 15:22:04 +00:00
fa7edd0bad Fix plugins not showing enabled in webui 2012-02-26 23:00:06 +00:00
2b865273f6 Fix potential keyerror for on_torrent_removed in sessionproxy 2012-02-24 00:34:53 +00:00
403ad26111 Update Changelog 2012-02-23 00:51:29 +00:00
6bc3968ba4 Multiple Magnet links support in autoadd plugin 2012-02-22 18:38:16 +00:00
bbeb11b1e7 Magnet link support in autoadd plugin
Check the watch folders for .magnet files which contain valid magnet links
and add them.
2012-02-22 18:38:05 +00:00
e4840d6b37 tabs to spaces 2012-02-22 15:53:29 +00:00
88db73e244 More fixes for labels plugin webui
Disabled options and remove for filters No Label and All
Removed All from torrent menu
Fixed No Label not working in torrent menu
Bumped version to 0.2
2012-02-22 15:49:49 +00:00
a359374547 Fix #2035: If auto_add_trackers is empty, it is an array 2012-02-22 13:55:06 +00:00
c5e328c3bd Fix #2036: new labels are not sorted on torrent right click 2012-02-22 13:35:14 +00:00
bc425b392a Convert tabs to spaces in label.js 2012-02-22 13:34:57 +00:00
4feb816380 Fix missing desktop file preventing install 2012-02-20 16:56:20 +00:00
ff95d9720a Fix setting daemon listen interface from command line 2012-02-20 14:06:29 +00:00
7847362dbb Catch and log ReactorNotRunning when stopping reactor in gtk 2012-02-19 16:44:12 +00:00
7b1e8862b4 correction for glib.gerror commit 2012-02-19 13:32:45 +00:00
ed883125fd catch and log 'glib.GError: Unrecognized image file format' error 2012-02-19 00:54:33 +00:00
9799c64505 Fix #2037: webui 'Add Torrents' dialog torrents list not scrolling 2012-02-18 20:36:32 +00:00
d1f788ebe3 Further fix for progress bar display in webui
When first loading webui is browser this.style is undefined and p.style
contains the width of the progress column however after this point
p.style contains the width of the previous column so need to use
this.style which now represents the progress column width.
2012-02-18 18:59:13 +00:00
3744bdad69 Build compressed javascript for deluge-all 2012-02-18 18:26:04 +00:00
ea75828f25 Fix progress bar display 2012-02-18 18:23:57 +00:00
966fc6f64f Update extensions to Ext JS 3.4.0 2012-02-18 18:23:52 +00:00
5ff0d61b52 Add Webui keymaps for torrents - Ctrl-A (select all) and Delete 2012-02-18 03:42:00 +00:00
f5956f01e7 Ignore unmaximise event when window isn't visible
This fixes the bug where a maximised main window
will become unmaximised (on restart) after
quitting deluge from the system tray.
2012-02-18 12:34:05 +11:00
717db367e8 Add magnet uri support to Add Url in Webui 2012-02-18 00:39:24 +00:00
e0efe3885a Update Changelog 2012-02-16 16:58:32 +00:00
836da50f78 Remove orientation property from glade files to fix compatibility warnings 2012-02-16 16:44:15 +00:00
85b1753a28 Fix compatibility for Python2.5 and Debian Lenny
Recent commit to handle warnings were >=Py2.6 and glib binding is
unavailable on Debian Lenny.
2012-02-16 16:44:14 +00:00
eb6959fb98 Cleaner log entry if deluged missing 2012-02-16 16:44:14 +00:00
30c142ac4d Fix #1954 : 'invalid literal for float' console error when setting listen interface 2012-02-16 16:44:14 +00:00
08a75bd9f9 Wait for client to shutdown/disconnect before stopping reactor (fixes #2032) 2012-02-16 14:12:03 +11:00
754a5a7f8a Add scheduler plugin page to webui 2012-01-25 01:00:15 +00:00
863fd7d2b7 Webui applies changes when OK clicked in Preferences 2012-01-25 01:00:05 +00:00
56f2283e3e Fix collapsed treeview in Create Torrent dialog 2012-01-24 14:25:09 +00:00
272d2005e0 Add missing columns to WebUI
Added Download,Uploaded,Down Limit, Up Limit & Seeder/Peeds. Also selected
columns start out hidden to match gtkui and the name column has a minimum
width of 150.
2012-01-24 01:55:56 +00:00
375ee2dd1c correction for the comparision in previous commit 2012-01-19 01:28:39 +00:00
98dcc8e3b1 Fix stored file priorities settings
File priorities stored in torrent options were based upon the supplied
funtion values rather than the current values stored in libtorrent. So
if the priorities failed to be set by libtorrent the settings would be
out of sync.
2012-01-19 00:51:54 +00:00
e91458662f ui: fix error in last commit
The last commit assumed that loglevel would always be a string,
take into account that it can sometimes be None
2012-01-17 17:07:09 +00:00
2600785cbb Merge branch '1.3-stable' of deluge-torrent.org:deluge into 1.3-stable 2012-01-17 16:58:29 +00:00
e5576dff1e ui: fix setting capital log level
Whilst providing the log level as a lowercase string has worked
for a long time trying to use DEBUG doesn't work, so lowercase
the string first.
2012-01-17 16:58:18 +00:00
4c648bc09f Update Changelog 2012-01-10 02:08:17 +00:00
17d9739abb create the toolbar with the rest of the UI 2012-01-10 00:53:02 +00:00
c1bf52e8d9 update changelog 2012-01-09 22:38:18 +00:00
d60b436fcb web: rebuild the compressed javascript
There were a few changes when upgrading to ext 3.4 so rebuild and
compress the javascript files
2012-01-09 22:37:29 +00:00
2e0e0fb6b5 Merge branch '1.3-stable' of deluge-torrent.org:deluge into 1.3-stable 2012-01-09 22:34:59 +00:00
fe4f732c12 web: update to extjs 3.4.0
There are numerous fixes to the framework between 3.1.1 and 3.4.0 and
since there are no obvious bugs introduced it's only sensible to pull
the update in to the stable branch
2012-01-09 22:34:47 +00:00
25d930b307 Fix #1929 : Update setup.py to clean deluge*.egg_info dir from root dir 2012-01-09 22:19:24 +00:00
083c7fbb32 Fix #1936 : Referenced before assignment error in json_api 2012-01-09 22:19:24 +00:00
81fc47d080 web: fix gen_gettext script
The script for generating the gettext.js file was outdated and needed
a fix to work with the newer layout of the javascript source code, it
was still looking for Deluge.Something files which no longer exist.
2012-01-09 21:58:20 +00:00
e1745443bf Fix #1895 : Files Tab showing wrong files due to torrent_info race condition 2012-01-09 18:33:10 +00:00
649f933316 Update AUTHORS 2012-01-09 18:32:49 +00:00
8b46ed8bdb Remove unneeded license from blocklist 2012-01-08 14:03:22 +00:00
62aa339fd8 Fix #2010 : Move speed text in titlebar to the beginning 2012-01-08 03:53:30 +00:00
96d8f10080 Strip trailing space and tabs in aboutdialog 2012-01-07 19:53:24 +00:00
3d8e3f4add Webui: Smaller minSize for Sidebar and remove 1px border from mainpanel 2012-01-07 19:22:09 +00:00
08eb6002f8 Remove dotted line on buttons in Firefox 2012-01-06 20:52:04 +00:00
0015c9af86 Add Deluge and icon to start of toolbar in webui 2012-01-06 20:34:29 +00:00
4365e1ff39 Fix clipped Browse button in WebUI 2012-01-06 15:44:38 +00:00
0b6af77d57 Fix plugin uploads from behind a reverse proxy 2012-01-06 15:44:38 +00:00
6b2320d4b6 Fix password box focus issue in Firefox 9 for WebUI 2012-01-06 15:44:38 +00:00
a5742f892d Fix #1915 : Unable to stop the status bar from autohiding 2012-01-06 15:44:38 +00:00
01adb882ea Remove uneeded Title to save space in WebUI 2012-01-06 15:44:38 +00:00
9fd6d3d418 Hide unused Create button in WebUI 2012-01-06 15:44:38 +00:00
d4834bc6c7 web: fix font in loaded html
When dynamically loading the content panels in the details panel they
would sometimes look quite bad since the only font they have been
told to use is verdana. Fix this why using the same as extjs.
2012-01-06 15:06:21 +00:00
e4eda24e8f Update Changelog 2012-01-04 19:00:21 +00:00
39f648684e Fix #1961 : Missing 'All' filter option for Label plugin 2012-01-04 18:40:29 +00:00
56f8e213e3 Update POT and PO files 2012-01-03 00:38:02 +00:00
cb86828fa6 Update About dialog for translation 2012-01-02 19:12:48 +00:00
5cffc8f7e0 Add clean desktop file to setup.py 2012-01-02 16:53:28 +00:00
97912a28e4 Update Win32 README 2011-12-15 17:00:41 +00:00
9d2b0101d6 Fix issue in saving libtorrent session state 2011-12-15 16:10:21 +00:00
e49b7d5c23 Update README file 2011-12-15 15:41:00 +00:00
78a0ffd437 New AUTHORS file 2011-12-15 15:40:38 +00:00
dee8c30968 Add unneeded files for release to export-ignore 2011-12-15 15:33:47 +00:00
a34f224201 Build deluge-all.js 2011-12-07 01:20:21 +00:00
7a3c4440dc Update webui build file to run on Ubuntu 2011-12-07 01:07:19 +00:00
ce0c6d99f2 Revert "Fix #1976 : Trailing newlines in move_storage"
This reverts commit d96fae520d.
2011-12-05 18:14:56 +00:00
d96fae520d Fix #1976 : Trailing newlines in move_storage 2011-12-01 23:49:46 +00:00
d3c3d64cd4 Fix #1938 : AttributeError when attempting to shutdown daemon from client 2011-12-01 23:46:47 +00:00
b530658e20 Fix #1969 : Menu item 'quit & shutdown' available when not connected to daemon 2011-12-01 23:32:19 +00:00
eb70a7a6dc Fix #1984 : KeyError in preferences.py if key not in stored config 2011-12-01 19:30:57 +00:00
370035ffc5 Fix #1934 : Unicode error in AddTorrent Dialog 2011-12-01 19:24:33 +00:00
0941377fac Fix #1957 : Columns don't add resulting in keyerror for non-latin languages 2011-12-01 19:21:13 +00:00
1a8aa4b920 Fix #1898 : Email notifications do not include date/time they were sent 2011-11-30 00:05:13 +00:00
1c8327034d Revert "Fix #1338 Seeds and Peers totals not updating"
Did not fix the issue.
This reverts commit 1a9ae62669.
2011-11-29 17:52:13 +00:00
9ed155c456 Update to the DnD windows fix
Found that the original fix worked fine with GTK v2.24 but with v2.16 on Windows get_uris is empty
2011-11-27 01:44:30 +00:00
3d813ea1f8 Fix #1905 : No email sent to second email address in Notifications plugin 2011-11-26 14:51:49 +00:00
0f962aeda5 Fix #1953 : Console flickering on every update 2011-11-26 14:51:44 +00:00
3a0b6f8a6d Fix #1945 : Mutable default arguments in deluge.ui.client 2011-11-25 14:18:45 +00:00
cade8ee784 Change Windows default download path from '~' to '~\Downloads' 2011-11-25 13:46:34 +00:00
0d27032c06 AddTorrent file dialog now can browse network shares 2011-11-25 09:50:40 +00:00
3b8bbb2e77 Update Changelog 2011-11-22 23:16:27 +00:00
9c9064b246 Fix #1918 : Drag'n'Drop not working in Windows
Moved uri handling from mainwindow into ipcinterface process_args() and fix url to path conversion
2011-11-22 22:48:21 +00:00
d1a3cbebbe Remove code duplication in queuedtorrents.py, use ipcinterface process_args() instead 2011-11-22 22:48:21 +00:00
79f8af688a Modify log message from Error to Warning level 2011-11-22 22:37:51 +00:00
bbba60f34c Fix Webui files-tab menu setting wrong priority 2011-11-21 21:50:54 +00:00
a2d313383c Fix #1921 : GTKUI reports free disk space incorrectly 2011-11-20 18:00:19 +00:00
e336cd64b4 Fix #1967 : IndexError when trying to open a non-json conf file 2011-11-20 18:00:19 +00:00
eff3577505 Fix LP#821577 : UnpicklingError when external selection dragged onto Files Tab 2011-11-20 18:00:19 +00:00
2504b2520a Fix #1964 : Unhandled UnpicklingError with corrupt state file 2011-11-20 18:00:18 +00:00
d8560f5c25 Fix #1944 : Use errno constants for portability 2011-11-20 18:00:18 +00:00
51802f7c54 Fix #1912 : Exit nicely from get_libtorrent.sh if svn not installed 2011-11-20 18:00:18 +00:00
a3538c8937 Fix #1941 : Increase UIs max cache value to 999999 (15GiB) 2011-11-20 18:00:18 +00:00
714b7f3c55 Fix #1960 : Web UI statusbar shows total_payload_download for upload 2011-11-20 18:00:18 +00:00
f0c4a4c766 Fix #1928 : Crash when dragging column header
The fix specifically applied to on_alert_save_resume_data by moving function call str(alert.handle.info_hash()) into the try statement. For completeness any calls to str(alert.handle.info_hash()) also moved into try statements.
2011-11-20 18:00:12 +00:00
683e4be529 Fix #1940 : File & folder renaming issue when using Add Torrent dialog in Windows
The file rename in torrentmanager was calling lt.rename_file directly
so skipping the sanitize function normally applied when renaming.
2011-11-20 17:58:29 +00:00
93a860f2a1 Fix typo in Windows shutdown handler 2011-08-08 10:42:06 -07:00
9c4cd86492 Iterate over values not keys (fixes autoadd error) 2011-08-07 15:16:44 +10:00
fc6f9ebc3b Fix formatting of Changelog and add next version 2011-07-29 00:10:35 +01:00
603ca1b855 Fix i18n sub-dir issue in gitignore
Also fixes trailing whitespace in setup.py
2011-07-28 22:34:20 +01:00
3b89595d38 Update translation 'po' files 2011-07-26 00:49:48 +01:00
448478485a Add my name to author list 2011-07-22 19:28:31 +01:00
4234583fc7 Fix .desktop file creation on Windows by just ignoring it 2011-07-22 11:12:47 -07:00
bdd9bd11b5 Update version 2011-07-22 10:58:01 -07:00
8dbdb02967 Update windows setting 2011-07-19 16:50:32 -07:00
0555fbeb9d Fix python2.5 compatibility with except statements in remove_empty_folders 2011-07-16 14:11:52 +01:00
3126407d74 Update Changelog and ez_setup 2011-07-14 13:42:17 +01:00
2d09035dc4 Fix httpdownloader Tests 2011-07-14 01:00:26 +01:00
ed229d2ace Add intltool to dependencies 2011-07-13 23:29:39 +01:00
9e0d173115 Fix torrent file and folder renaming issues
Adds `sanitize_filepath` for use before passing to libtorrent rename_file
2011-07-13 22:39:23 +01:00
81d4b00ade Localize the Desktop file 2011-07-13 21:28:59 +01:00
1a9be0e9a4 Update Changelog, deluge.pot & gitignore 2011-07-10 17:45:37 +01:00
28fc325db9 Fix UnicodeDecodeError from 'deluge-console --help' with other languages 2011-07-10 16:30:00 +01:00
eb309813ea Fix #1505: Add libtorrent info to --version output 2011-07-09 23:09:17 +01:00
2e7bd90bda Fix #1801: ConsoleUI failed connect results in unhandled defered error and missing error message 2011-07-09 21:57:36 +01:00
f59eca4405 Fixes keyerror with existing file priorities set to High 2011-07-08 23:24:54 +01:00
fa209dfd5f Add handler for drag_data_received to supress warning 2011-07-08 23:15:15 +01:00
8e8717c867 Fix httpdownloader error with existing filename 2011-07-06 22:53:41 +01:00
8644bc219a LP Bug #496265: Peers in PeersTab show non-zero download rate when seeding 2011-07-06 21:33:02 +01:00
7c276f3133 Fix #1263: GTK UI not remembering column width
Removing a column from the treeview on shutdown causes all the
column widths to be zero which are saved to the state file.

The workaround is to not save the state file if all columns are zero.
2011-07-06 19:11:05 +01:00
ce1aca54b5 Fix #948: New Release Dialog does not show server version 2011-07-05 18:30:11 +01:00
54642720e4 Update ubuntu favicon in test_tracker_icons.py 2011-07-05 17:53:11 +10:00
18ebf5b912 Only deregister component if the registry still exists 2011-07-05 17:53:11 +10:00
ff087d133c Fix #1239: Translated Tracker Error text not counted in sidebar Error status 2011-07-04 21:20:59 +01:00
5d4c8241ea Fix translation of KiB/s 2011-07-04 21:13:44 +01:00
fbc664fa14 Fix #1258: Add Magnet and Url support to add command in console 2011-07-02 19:32:43 +01:00
cc130c0085 Fix up/down speed labels in status tab 2011-07-02 19:10:55 +01:00
87802aa965 Update Changelog 2011-07-02 18:57:57 +01:00
678be3ce15 Fix #1715: AddTorrentsDialog does not display filename changes when switching between torrents 2011-07-02 15:30:57 +01:00
52f89270e6 Fix #1582: Wrong path separator returned when moving storage in Windows 2011-07-02 15:30:57 +01:00
1a9ae62669 Fix #1338 Seeds and Peers totals not updating 2011-07-01 02:37:40 +01:00
e7b5be6a60 Fix #1477: Execute Plugin should ignore Added events from state file on startup 2011-06-30 22:38:34 +01:00
7e51c82705 Improved fix for losing Labels upon restart 2011-06-30 22:38:07 +01:00
d6e619c413 Add session_started to determine if TorrentAddedEvent is from state file 2011-06-30 22:33:48 +01:00
ba1cc6ef1f Fix #1232: Improve display of Peers Tab IPv6 addresses 2011-06-30 17:56:43 +01:00
b5a0f32826 Fix append trackers error occuring with magnet uris 2011-06-30 17:19:41 +01:00
2cceb3a349 Update append trackers commit to ignore state file adds 2011-06-28 01:42:26 +01:00
6ad3a770af Add #890: If added torrent already exists, append extra trackers to it 2011-06-28 00:53:02 +01:00
f7c21fd87b Fix #1246: Losing Labels upon restart 2011-06-27 23:09:08 +01:00
01465f583f Adjust file priorities to make Highest actually the highest allowed by libtorrent and High has been changed to what Highest was 2011-06-21 10:51:49 -07:00
d3b0df5788 Update Changelog 2011-06-20 00:18:13 +01:00
4f3c753fc1 Save and restore Preferences dialog size from config 2011-06-19 23:47:39 +01:00
6a873c524e Update potfiles and deluge.pot 2011-06-19 23:12:18 +01:00
010b6dd4af Fix preferencesmanager from failing to stop when trying to stop
loopingcall that wasn't started
2011-06-18 20:14:37 -07:00
00900fef1c Fix uri handling when dragged to gtk window 2011-06-17 22:27:39 +01:00
d2e1d66f43 Fix unhandled 'Connection was refused' error in gtkui 2011-06-17 18:00:40 +01:00
c95ca18b37 Add a file exists check to torrents passed as arg 2011-06-16 21:14:41 +01:00
34f81634e5 Fix path error with torrent files prefixed with 'file://' from Firefox 2011-06-16 21:14:41 +01:00
2cb77d17ce Increase max piece size to 16 MiB in create torrent dialog
Increasing it beyond this will require changes to
createtorrentdialog.py
2011-06-10 13:28:18 +10:00
4c32aa14d0 modify pluginbasemanager to search for egg_info dirs 2011-06-08 22:46:23 +01:00
5d9120b667 Add 2 more commands to setup.py
Two more commands were added to setup.py:
 * develop_plugins - Installs each of the plugins in development mode
 * egg_info_plugins - Create the '.egg-info' distribution directories for each plugin. This will make the plugin discoverable by deluge

Both these commands are intended to be used while developing deluge.
2011-06-08 22:26:28 +01:00
8a3bad9fc2 Fix #1456 - No ETA showing with multiple files 2011-06-05 13:10:02 +01:00
2005691312 Fix #1560 - FilesTab Progress value sorting by int instead of float 2011-06-05 13:10:02 +01:00
47c9cccd74 Merge branch 'translate_updates' into 1.3-stable 2011-06-05 00:28:20 +01:00
2186fdb870 Catch snd_path is None error in Notification Plugin 2011-06-04 23:35:03 +01:00
5b1e43735b Fix systemtray from stopping properly when appindicator is enabled 2011-06-03 14:54:36 -07:00
e54f6c84d6 Fix translations texts in glade and python files 2011-06-03 20:16:54 +01:00
30d91f17dc Remove page x from translatable in pref_diaog glade 2011-06-03 20:16:54 +01:00
af058bbdc7 Change translatable to No for gtk stock labels 2011-06-03 20:16:54 +01:00
7232dc4b01 Add gtk-* items to gettextize 2011-06-03 20:16:54 +01:00
263b10ffd2 Update gettextize to ignore .git folder 2011-06-03 20:16:54 +01:00
36d5ff5040 Fix translate string in notifications plugin 2011-06-03 20:16:54 +01:00
85d4602949 Fix translated string in addtorrentdialog 2011-06-03 20:16:54 +01:00
a75fa41c42 update create_potfiles_in to ignore plugins build dir 2011-06-03 20:16:46 +01:00
e75ae7c81e Merge branch '1.3-stable' of deluge-torrent.org:deluge into 1.3-stable 2011-06-03 09:01:48 -07:00
fad24e93f3 Update setuptools version in ez_setup 2011-06-02 21:49:27 +01:00
94d53ac368 Show errors when trying failing to properly stop a component 2011-06-02 12:04:56 -07:00
52bf08dfd1 Fix #1869: Set the disk io read/write to bypass OS cache in Windows as suggested in http://code.google.com/p/libtorrent/issues/detail?id=166 2011-05-31 09:57:59 -07:00
532973c3d1 Fix #1504 - Win32 run deluged as not logged in user via runas or service 2011-05-30 12:48:23 +01:00
254efa88e5 Add check to key_press_event for keyname returning None 2011-05-29 12:08:55 +01:00
583248f558 Allow a smtp port higher than 100
Add a shadow to scrolled window
2011-05-28 18:25:58 -07:00
69956ad1db Implemented search as you type capabilities to the treeview, ie, when the
treeview has focus and user starts typing, select the first matching
torrent name.
2011-05-28 22:12:32 +01:00
1e274cfb48 Update Changelog 2011-05-27 23:58:52 +01:00
b0e38d7bde Merge branch 'Add-F2' into 1.3-stable 2011-05-27 23:47:43 +01:00
4d643f2cba Fix #1861 - AutoAdd Warning (column number is a boolean) 2011-05-27 23:46:02 +01:00
09a56ae03c Catch an IndexError occurring in Files Tab when scrolling through long list of torrents 2011-05-27 23:46:02 +01:00
c2b5d29c6a Fix #1860 - Files Tab TypeError (could not parse subscript as a tree path) 2011-05-27 23:46:02 +01:00
a3d2b41b54 Fix #1195 - Right-click selecting issue when switching between files and folders 2011-05-27 23:46:02 +01:00
da679371b7 Add F2 key shortcut to rename files in Files Tab 2011-05-27 23:46:02 +01:00
83283cdcf3 Add XDG_DOWNLOAD_DIR for default download folder #1788 2011-05-27 23:45:54 +01:00
e180e2af88 Fix subheading in ChangeLog 2011-05-26 10:10:08 +10:00
14c3655ba1 Properly show the 'Checking Resume Data' state instead of just 7
Show the checking icon for torrents in the 'Checking Resume Data' state
2011-05-25 13:27:16 -07:00
f330469bc9 Set the WM_CLASS name to Deluge 2011-05-25 13:17:41 -07:00
c81fbf788d Update version numbers 2011-05-24 15:16:56 -07:00
a35b2497f3 Update javascript release files 2011-05-24 15:13:50 -07:00
8fe299dc21 Update translations 2011-05-24 11:49:35 -07:00
e66f0cb503 Small text updates 2011-05-24 01:58:40 +01:00
5e129b3c64 Fix up displaying versions in the about dialog 2011-05-24 01:42:35 +01:00
2d40d2b224 PEP-8 2011-05-24 01:41:15 +01:00
ce0234f0ef Change Connection Manager Key Shortcut to Ctrl-M 2011-05-23 22:20:10 +01:00
c225eae189 1862: Fix typo in move storage 2011-05-23 13:41:37 -07:00
afa941df2e Update Changelog 2011-05-23 01:22:18 +01:00
49cbcf1f9c Update certain torrentview columns to default to not visible 2011-05-23 01:00:23 +01:00
3c3b68e2cc Add ability to set columns as not visible by default by setting the kwarg default to False when adding the column 2011-05-22 15:18:17 -07:00
b93477c41e Feature #1308: Add Seeds/Peers ratio to torrent list view 2011-05-22 21:04:59 +01:00
766c48e3ca Feature #1646: Add columns for per torrent upload and download speed limits 2011-05-22 21:04:59 +01:00
1f73476dc3 Fix Up/Down buttons in Edit Trackers Dialog
This fix properly reflects the movement of the tracker in the dialog table rather than by the tracker index.
2011-05-22 21:04:41 +01:00
5bfb98f9a9 Change default value of close_to_tray to False
Prevents default install of Deluge disappearing if tray icon is missing.
2011-05-22 21:04:41 +01:00
d07b53f665 Add key shortcuts for menu items 2011-05-21 18:53:22 +01:00
449be00e33 Supress gobject warning in filtertreeview and torrentview
In console the warning "g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed" will appear. Quick investigation could find no solution with suggestions a python issue.
2011-05-21 18:53:03 +01:00
655af15695 Modify setup scripts to be executable 2011-05-21 18:46:10 +01:00
a549eac063 Add --sort option to deluge-console's "info" command. 2011-05-21 18:46:10 +01:00
6fa2728ddc Add seeding_time, active_time and tracker_status to deluge-console's "info" command. 2011-05-20 19:51:33 +01:00
9060de9b70 Fix spelling error in deluge-console output. 2011-05-20 19:49:22 +01:00
57ac902d50 Updates to desktop file
Add magnet mimetype and tryexec key
Fix exec key to handle files and urls to conform with new desktop-entry spec
Update name, comment and category keys
2011-05-16 22:14:43 +01:00
05578e0c75 Fix LP Bug #779074 - TypeError in on_key_press_event(): cannot concatenate 'str' and 'NoneType' 2011-05-12 18:14:10 +01:00
a0d4141afd fix unrequired requests 2011-05-07 13:19:41 +01:00
493d0ac690 fix a bug when the host_id doesn't exist 2011-05-07 11:51:47 +01:00
fe9fe7977c update changelog 2011-05-07 00:03:27 +01:00
e579a78d26 apply patch from #1742 2011-05-07 00:02:20 +01:00
bf96475840 update changelog 2011-05-07 00:00:18 +01:00
93c49495b2 apply patch from #1548 2011-05-06 23:59:31 +01:00
54ae8a4482 update changelog 2011-05-06 23:44:19 +01:00
d658c8fe47 fix #1537 editing trackers list, trackers have to be reselected 2011-05-06 23:43:40 +01:00
58134925a2 update changelog 2011-05-06 23:25:05 +01:00
244583ef97 Fix #1333 Peer list doesn't update automatically 2011-05-06 23:24:00 +01:00
0b821640bb fix #1481 file uploads from behind a reverse proxy 2011-05-06 22:38:55 +01:00
612ed4123f fix #1323 filter panels not scrollable 2011-05-06 22:32:46 +01:00
91b9eac075 update changelog 2011-05-06 22:23:12 +01:00
5be93cd5d8 Fix #1268, Torrent errors not displayed in webui 2011-05-06 22:22:29 +01:00
816f3ff6d2 update changelog 2011-05-06 22:09:05 +01:00
2e62140d2c fix issue #1567, js from plugins not working with different base setting 2011-05-06 22:08:59 +01:00
2381b1ae28 update changelog 2011-05-06 22:03:18 +01:00
6a131f021e fix issue #1799 2011-05-06 22:00:47 +01:00
871d9ac4b0 apply patch from #1562 2011-05-06 19:14:26 +01:00
0d665d772d fix the widths on the input boxes, whitespace changes too 2011-05-06 19:02:54 +01:00
aef2a83f25 fix the path given by the set-cookie header 2011-05-03 19:05:04 +01:00
e6cd4d17ee Fix #1278 by keeping references.
Conflicts:

	deluge/ui/gtkui/menubar.py
2011-04-28 10:44:18 +01:00
b9c49f27fa Include gif pixmaps in the package data 2011-04-09 22:34:23 +10:00
e2118b6bb2 Merge branch '1.3-stable' of git.deluge-torrent.org:deluge into 1.3-stable 2011-03-28 16:51:34 +01:00
d7ba74f01d split the auto_add_trackers textfield otherwise it breaks the label plugin 2011-03-28 16:50:47 +01:00
bc9abc8bc9 Fix libtorrent not compiling with boost libs 1.46 2011-03-26 17:34:56 +11:00
00ad550a52 Improve autoadd filename matching (fixes #1614) 2011-03-26 17:34:44 +11:00
884bfd777e Apply patch from #1581 to add an option to enable the app indicator
interface
2011-03-22 17:16:03 -07:00
e7db1b285f Fix indentation on Changelog 2011-03-09 00:56:04 +11:00
ee3a17bf37 Update ChangeLog for previous commits 2011-03-09 00:51:33 +11:00
292ffb35ac Handle redirection when adding a torrent by url 2011-03-09 00:37:35 +11:00
fd458fbe64 Handle partial downloads due to incorrect headers (fixes #1517) 2011-03-09 00:05:07 +11:00
b9fdb5a65f Update translation template files 2011-02-19 11:25:00 -08:00
36f92231a6 Updated Changelog 2011-02-15 17:37:50 +00:00
6cb584d53d update changelog 2011-02-15 12:57:09 +00:00
2eb1a51f6b make the edit trackers window resizable 2011-02-15 12:54:25 +00:00
84804d37cc fix scrolling on the edit trackers window 2011-02-15 12:50:38 +00:00
1da7a518b5 Fixes for gtk-ui translations 2011-02-14 23:39:16 +00:00
808d9bfba8 Fix translate issue for Trackers tree in sidebar 2011-02-14 23:39:02 +00:00
53b4a06fd1 Fix: os.join created root path in Remove_Empty_Folder if variable 'folder' had a leading slash 2011-02-14 23:37:33 +00:00
4490cd371a Sidebar: Enabled strings for translation and added icons to Trackers filter 2011-02-11 21:48:49 +00:00
7d36a4fa51 Fix #1527 - Converting unicode to unicode error in move_storage 2011-02-11 21:48:41 +00:00
6f844a86d2 Fix Create Torrent Dialog Box - Some buttons raise Type Error if no row selected 2011-02-11 21:48:35 +00:00
03689a805b Fix #1510 - Cannot create a torrent with only non-zero tier trackers 2011-02-11 21:48:28 +00:00
1d0857964e Fix #1513: Unhandled Twisted Error in test_listen_port 2011-02-11 21:48:20 +00:00
fd3a33af03 #1514 - Indicator Applet Patch 2011-02-09 19:14:33 +00:00
2354eeca7b Fix #690 - Renaming folders does not remove old empty folders 2011-02-08 19:34:16 +00:00
ca0003a7af Catch a possible DivByZero error when moving folders around in fileview tab 2011-02-08 17:38:03 +00:00
2c615e468b Fix #1336 - Uneeded Horizontal Scrollbar shows in Files&Peers Tab 2011-02-08 17:37:53 +00:00
3794773e95 Fix #1248 - Deluge-console unicode support on redirected stdout 2011-02-08 17:01:37 +00:00
1731fd641b Fix #1506 - max speed not restored on a yellow->green transition 2011-02-08 05:00:25 +00:00
c379b6c3b2 Fix #755 - Can't set listen_ports through console UI 2011-02-05 01:08:37 +00:00
e1896d2ace Fix #1450 Trailing white space in paths 2011-02-05 01:08:36 +00:00
5f168f3a25 Fix #1500 - Console crashes on command longer than terminal width. This error is raised if the cursor is off screen and is supressed with try-except 2011-02-05 01:08:33 +00:00
8346b4bb77 Fix #1282 - Text for AutoManaged changed to 'On/Off' and localized 2011-02-05 01:08:31 +00:00
39bbe76436 Updated help text for deluge-console on Windows 2011-02-05 01:08:27 +00:00
3bd28208d1 Fix for deluge-console adding torrent files in Windows 2011-02-05 01:08:26 +00:00
ffebfb9cdf Fix #1508 - TypeError in cell_data_queue() could not convert argument to correct param type 2011-02-05 01:08:24 +00:00
93091fbe23 Fix #1373, #1386 - Creating and moving non-ascii folder names in MS Windows 2011-02-05 01:08:11 +00:00
efd2762255 Fix #1507 - Temporary file race condition in core/core.py:add_torrent_url 2011-02-05 01:08:04 +00:00
4870d34a52 #1494 - Add Downloaded and Uploaded columns to torrent view 2011-02-05 01:06:26 +00:00
26410ca9c1 Apply patch from #1194 2011-02-04 19:49:54 +00:00
c1477e45cb Fix typo 2011-01-27 11:18:40 -08:00
25e58bc8a2 Fix #1498: Use os.path.normpath on new_folder to remove any double slashes or other problems that could be in the string 2011-01-27 11:11:28 -08:00
4d2a0b1856 Fix #1484: trying to access the screen object when not using interactive mode 2011-01-16 15:58:50 -08:00
82fbbad385 fix bug #1355 2010-12-12 00:02:41 +00:00
29a306e378 Merge branch '1.3-stable' of deluge-torrent.org:deluge into 1.3-stable 2010-12-01 10:21:56 +00:00
5cfe3b5601 fix a bug that can occur when upgrading 1.1 config files 2010-12-01 10:21:26 +00:00
3f458e46dd Fix #1283 Consistent icons and add localization to file priorities
Signed-off-by: John Garland <johnnybg+deluge@gmail.com>
2010-11-11 14:02:21 +11:00
1067eb7f98 rebuild the compressed javascript 2010-11-01 09:15:19 +00:00
dca27a4cf9 update the build file to include the spinnerfieldfix file 2010-11-01 09:15:14 +00:00
b0ceae8d28 Fix copying scripts 2010-10-31 10:50:51 -07:00
dc0bf3bc88 Update versions and changelog 2010-10-31 10:15:02 -07:00
3b9d7ff9c3 remove the convert conf script that won't actually work anymore 2010-10-31 14:35:12 +00:00
a165d5d746 fix a silly bug 2010-10-31 10:13:22 +00:00
cc02ebea6a Merge branch '1.3-stable' of deluge-torrent.org:deluge into 1.3-stable 2010-10-31 09:18:36 +00:00
41ffee5d8a change entry_points to a dictionary and split it up into console and gui scripts 2010-10-31 09:16:18 +00:00
14a89b3f8a don't depend on being executed from a specific directory 2010-10-29 10:09:15 +01:00
6f0c2af58a Fix up Changelog (entry was in wrong section) 2010-10-25 09:59:06 +11:00
84cccabf19 update changelog 2010-10-24 23:44:40 +01:00
7fb483adde fix a bug in the MultiOptionsManager that didn't fire the right arguments in the initial event fire 2010-10-24 23:42:29 +01:00
28ce7a70a0 apply patch from #1377 2010-10-24 13:30:39 +01:00
14565977fa include a file that fixes the SpinnerField onBlur method (no idea why it is set to emptyFn) 2010-10-23 22:22:00 +01:00
e4420ef354 fix the path to the loading gif (not that its actually used) 2010-10-23 21:24:05 +01:00
02ad0b93ab Fix hang on quit 2010-10-23 01:14:48 +11:00
6d2a001635 Fix #1373 use of cyrllic paths 2010-10-16 12:56:29 -07:00
2a3eb0578c Fix #1349 force a theme style with expander-size = 15 to show entries in the sidebar properly. 2010-10-15 19:31:36 -07:00
60fac28217 Keep a torrent paused after a forced recheck if it was paused to start. 2010-10-10 12:34:13 -07:00
59e01e7ecf add a check to ensure that the events loop doesn't continue indefinitely 2010-10-10 19:51:50 +01:00
4c52ee4229 Update ChangeLog for previous commit 2010-10-07 22:46:49 +11:00
8428524793 wrap client.disconnect() call with a check to see if its classic mode 2010-10-07 00:14:55 +01:00
21c8d02d9a Update ChangeLog for previous commit 2010-10-03 19:52:33 +11:00
0c687c7684 Make sure config value strings are utf8 encoded (fixes #1369) 2010-10-03 19:24:29 +11:00
78f9efefd9 Move decode_string/utf8_encoded to common 2010-10-03 19:24:27 +11:00
6b228ce31f Fix sidebar not updating (#1365) 2010-10-03 00:01:29 +10:00
40ce4ec731 Use better attribute / method names in blocklist 2010-09-26 11:39:47 +10:00
c029c312e4 Fix attribute error in blocklist plugin 2010-09-26 11:37:29 +10:00
16c38cd027 Set locale to the user's default settings in the gtkui 2010-09-20 02:44:18 +10:00
e23a6b852a Organise latest changes into appropriate sections 2010-09-19 20:59:27 +10:00
90e4de54e9 Do not include unnecessary dlls in windows build 2010-09-18 16:03:21 -07:00
c1505bea3a Update versions 2010-09-18 11:31:31 -07:00
6235e832fe include missing theme images 2010-09-18 00:48:22 +10:00
a71f14c47e include the .order files 2010-09-16 09:23:35 -07:00
ed3b23b0fc add all the other scripts to package_data 2010-09-16 09:23:19 -07:00
6402634ec1 Update win32 build files 2010-09-14 11:48:05 -07:00
3e68733cfd More clean-up of setup.py 2010-09-14 11:40:41 -07:00
f847a7dc4e Remove the custom 'install' class and include_package_data 2010-09-14 11:40:34 -07:00
c7954c20eb Fix preference page index when removing a preference page 2010-09-13 18:22:08 -07:00
dc7ed11601 Update ChangeLog 2010-09-13 16:11:57 -07:00
d898def9ec Fix bugs with unicode torrents in AutoAdd plugin. 2010-09-13 02:22:18 -04:00
3e2f6c4060 Fix bug in AutoAdd plugin where watchdirs would not display in gtkui when first enabled. 2010-09-13 02:22:17 -04:00
321a22a6f0 Increase max piece size to 8 MiB in create torrent dialog (closes #1358) 2010-09-13 08:53:19 +10:00
b4774af2f3 Fix VersionSplit behavior when comparing to a dev version. 2010-09-11 05:39:40 -04:00
d0fd709c74 AutoAdd plugin can now recover when one of the watchfolders has an unhandled exception. 2010-09-03 22:30:24 -04:00
e24212b3f8 Fix "adjustment with non-zero page size" deprication warning in autoadd plugin. 2010-09-03 22:28:41 -04:00
f8f72af6dc Add TorrentFileCompleted event. 2010-09-03 17:11:57 -07:00
b9caa4eeeb Fix issue when adding torrents without a 'session'. This can happen
when a plugin adds a torrent, like how the AutoAdd plugin works.  The
user that adds this torrent will be an empty string.
2010-09-03 14:29:36 -07:00
6c3b216b40 Use a temp filename with add_torrent_url 2010-08-31 00:11:58 +10:00
eaad867885 Update get_free_space test 2010-08-31 00:11:54 +10:00
f6b9f67df8 Fix error in last commit. 2010-08-26 02:33:24 -04:00
24fe3f7fd5 Ensure preferencesmanager only changes intended libtorrent session settings. 2010-08-26 02:23:40 -04:00
da2fb41a3a Fix scheduler so that it keeps current state, even after global settings change. 2010-08-26 01:39:40 -04:00
f8d7f22167 Ignore global stop ratio related settings in logic, so per torrent ones are used. 2010-08-24 22:47:24 -04:00
b75abc70e5 Add max active downloading and seeding options to scheduler. 2010-08-24 00:58:28 -04:00
2d821bd79a Merge branch '1.3-stable' of deluge-torrent.org:deluge into 1.3-stable 2010-08-23 17:35:31 -07:00
12d9a7a5bd Fix key error after enabling a plugin that introduces a new status key 2010-08-23 17:35:19 -07:00
c118fa36a9 Moved xdg import so it is not called on Windows, where it is unused. fixes #1343 2010-08-22 15:38:22 -04:00
82c91cdc51 AutoAdd plugin changes
adds queue to top option
adds ability to append extension instead of deleting torrent once added
2010-08-22 00:01:58 -04:00
5501094214 Fix unhandled exception when adding a torrent to the session 2010-08-21 12:54:19 -07:00
b41aa808be Fix issue where the save_timer is cancelled when it's not active 2010-08-21 12:54:13 -07:00
b9336889f5 Update version 2010-08-20 14:20:51 -07:00
995f5387eb Update windows files 2010-08-20 14:19:42 -07:00
38958d3c4f Update ChangeLog 2010-08-20 14:15:21 -07:00
b45e019f08 Fix man deluged not showing '-u' on its own line 2010-08-20 01:16:09 +10:00
d93fcf6eea Fix #1341 issue where Config would try to cancel the save_timer when it is None. 2010-08-18 12:32:11 -07:00
a2d75a5274 Add cache expiry check by key update times to fix issue where some status updates would not return
correctly if they were done < cache_time from the previous status request
2010-08-18 12:17:31 -07:00
8797c3ce1b Add additional test for get_torrents_status and fix the other one to properly invalidate the cache
time from startup before proceeding
2010-08-18 12:17:23 -07:00
79749cca03 Add test to demonstrate flaw in SessionProxy design. Need to keep track of update times for each
status key individually to fix this.
2010-08-18 11:05:21 -07:00
5fd8628761 fix the script resource on windows 2010-08-14 17:38:31 +01:00
0e80b3ea0a add the apple iOS bookmark icons from #1339 2010-08-14 16:15:18 +01:00
aa61d33ee2 Merge branch '1.3-stable' of deluge-torrent.org:deluge into 1.3-stable 2010-08-14 16:06:00 +01:00
13f29a77dd fix the system.listMethods json call when running in classic mode 2010-08-14 16:05:41 +01:00
97453d1411 Add test suite for SessionProxy 2010-08-10 09:58:28 -07:00
62d02091b3 Fix getting a torrent's status with an empty key list to return all the
torrent's status keys instead of an empty dict
2010-08-06 17:26:23 -07:00
161ad0ff0d use the get_libtorrent.sh script to get libtorrent if it is missing 2010-07-22 21:13:27 +01:00
7f323ec0fc add libtorrent fetch script 2010-07-22 18:17:51 +01:00
05aebbb575 remove the libtorrent submodule 2010-07-22 18:04:49 +01:00
de85e1dcdc a couple of fixes to stop the webui crashing when running within the gtkui 2010-07-18 23:11:02 +01:00
1ce480ff23 Only use an icon if it passes some sanity checks 2010-07-17 17:13:15 +10:00
007a9912d2 Use a blank icon when the tracker icon downloaded isn't a proper image 2010-07-15 19:17:48 -07:00
d793b9e6b8 Attempt to create a move_storage destination path if it doesn't exist 2010-07-15 10:50:15 -07:00
72ec926c1a Do not attempt to move a torrents storage if the destination path does
not exist
2010-07-12 14:45:51 -07:00
0d431ae7db Try to import system rencode before deluge.rencode to allow the use of the new rencode library at: http://code.google.com/p/rencode/ 2010-07-08 16:39:53 -07:00
f1e0e3be15 Add logging the user when a torrent is added or removed 2010-07-05 21:10:16 -07:00
e8bf5eb592 Fix ChangeLog 2010-07-04 02:13:31 +10:00
d9a2c4db72 Fix uncaught exception when closing deluge in classic mode 2010-07-02 02:43:07 +10:00
8fb7277a82 Fix typo 2010-07-02 02:41:30 +10:00
35128cf18f more improvements to the shift select 2010-07-01 14:21:37 +01:00
6ff1da2391 fix select 'upwards' 2010-07-01 14:08:20 +01:00
4614188c62 update changelog 2010-07-01 13:46:27 +01:00
80297b8e45 allow for shift selecting in tree grids 2010-07-01 13:45:22 +01:00
9173a9cfdd Update Changelog 2010-06-22 18:26:43 -07:00
571d1079f6 Fix #1302 an uncaught exception in an state_changed event handler in SessionProxy was preventing the
TorrentManager's stop method from properly saving all the resume data.
2010-06-22 18:25:50 -07:00
0497c407e1 Always look for -mt boost libraries first 2010-06-18 09:51:50 -07:00
8b58c960f3 fix typo 2010-06-12 22:48:00 +01:00
b615ebe1b8 change bits to bytes, thanks to charles 2010-06-11 15:59:33 +01:00
3ed8279219 Fix typo in label plugin - thanks konti 2010-06-11 00:51:46 +10:00
f2944bdeef Handle os.remove failing on windows 2010-06-08 03:20:48 +10:00
0fcd90ee2c Python independent version of previous commit 2010-06-08 01:57:13 +10:00
26460808e7 Fix console ui not liking paths with backslashes on windows (#1293) 2010-06-08 01:30:10 +10:00
7aba1af0b2 Print a more informative error message if the torrent file doesn't exist 2010-06-08 01:26:49 +10:00
4d2b7df49d Fix execute plugin only executing last event (#1306) 2010-06-08 00:20:07 +10:00
bd775d0d40 Only encode if necessary 2010-06-07 20:18:37 +10:00
7fb3c3c04c Fix unicode support in console ui (#1307) 2010-06-07 20:18:35 +10:00
19c27ee8c5 Add some debug logging statements 2010-06-04 18:05:27 +01:00
d69b8e1099 Fix an error in the key 2010-06-04 17:37:45 +01:00
88daf82cb0 Fix saving the correct event name 2010-06-04 16:37:50 +01:00
99c1a61383 Save the execute config after adding/removing/saving commands 2010-06-04 16:30:51 +01:00
2e55769c18 Fix typo in execute plugin 2010-05-20 00:06:18 +10:00
259d2633e7 Fix man deluged not showing '-d' on its own line 2010-05-16 22:32:59 +10:00
8e5aab660c Fix remote save path dialog not disappearing after creating a torrent 2010-05-16 18:13:34 +10:00
fc96e9d02c Fix only being able to click "remote path" once when creating a torrent 2010-05-16 18:13:31 +10:00
821d403a6c Fix deluged crashing on windows when logfile's directory doesn't exist 2010-05-16 13:12:51 +10:00
5e0d988ef0 Revert "Fix trac wiki turning CamelCase words into broken links"
This reverts commit 925ac42f7c.
2010-05-11 23:46:48 +10:00
925ac42f7c Fix trac wiki turning CamelCase words into broken links 2010-05-11 23:29:02 +10:00
1ac72b81b6 Update email address and copyright 2010-05-11 03:52:17 +10:00
3417caf1d2 Fix label plugin not remembering newly created labels 2010-05-09 17:52:29 +10:00
1bcfc91c35 Remove unused code from label plugin 2010-05-09 17:52:25 +10:00
6ee0e5b6be Update docstrings to use names from previous commit 2010-05-09 17:07:11 +10:00
58a74202e1 Use better names for TrackerIcons' args 2010-05-09 17:01:47 +10:00
a4c6f4e8c9 Return the noIcon for empty strings as well 2010-05-09 16:44:12 +10:00
60f3d32de7 Raise IconsError instead of IndexError (fixes infinite looping) 2010-05-09 16:36:54 +10:00
b3eed8a1f0 Add test for tracker_icons for when requesting an icon for host that is "". This test results in an infinite loop. 2010-05-08 20:10:12 -07:00
37137d9b54 Return 0 in get_free_space if the download_location is invalid 2010-05-08 20:09:57 -07:00
4fb14b581d Use previously defined host variable instead of getting the tracker host from the TreeModel 2010-05-08 20:09:49 -07:00
98da4d0291 Do not request a tracker icon if the host is "" 2010-05-08 20:09:37 -07:00
f0c06f4bc5 Update Changelog 2010-05-08 11:50:19 -07:00
63d701305c rebuild deluge-all and ext-extensions 2010-05-08 16:19:40 +01:00
99396afa0c update the build files for deluge-all and ext-extensions 2010-05-08 16:19:40 +01:00
6231dbd1ca fix the null comparison 2010-05-08 16:19:40 +01:00
8f021c7f06 set the baseCls for the add label form panel to x-plain 2010-05-08 16:19:40 +01:00
6bb4559d18 Make host_to_url support redirection and add another test 2010-05-08 16:26:08 +10:00
7c9eea0361 Try favicon.ico if there's a HTMLParseError 2010-05-08 15:50:57 +10:00
15247507d4 Fix relative redirecting in blocklist plugin 2010-05-06 23:31:25 +10:00
10de8d5475 Remove plugins that aren't release ready 2010-05-05 17:48:04 -07:00
e304c1f719 update the ChangeLog 2010-05-05 23:03:19 +01:00
48d3e89d84 Update windows build files 2010-05-05 15:01:52 -07:00
44f9e17a09 Update version
Update ChangeLog
2010-05-05 14:52:18 -07:00
e7907a63ee fix uploading plugins in shit browsers 2010-05-05 12:25:34 +01:00
cee416b1b5 fix expanding nested folders in the files tab 2010-05-05 11:55:21 +01:00
53a9c217e7 Fix tracker_icons not handling relative redirects 2010-05-05 04:05:52 +10:00
d6c8b13041 Handle trackers with incorrect / missing icon mimetypes 2010-05-05 03:19:54 +10:00
ba03356151 Add more HTTP status codes to httpdownloader 2010-05-05 02:49:55 +10:00
d28cf93686 Rename mimetype helper methods and rewrite to use a common dict 2010-05-05 02:31:05 +10:00
452656e09d remove some trailing commas that break the ui in IE 2010-05-04 12:02:49 +01:00
9c460266ac add _trial_temp to the gitignore file 2010-05-04 00:30:54 +01:00
bb0bd36c51 Properly fix creating torrents in the gtkui with non-ascii filenames 2010-05-04 00:28:24 +01:00
5ea7e21943 add some icon preloading and improve the statusbar css classes 2010-05-04 00:09:20 +01:00
facb4669e3 add the ubuntu icon 2010-05-03 22:01:20 +01:00
e4ef17975c stop parsing the html page once the parser has left the <head> of the page 2010-05-03 21:28:25 +01:00
c4b20aa595 Fix error when requesting a tracker icon for None 2010-05-03 13:24:54 -07:00
bc028998d7 Fix some tests in test_core 2010-05-03 13:13:26 -07:00
7e7da94a6e fix the Tracker resource for the webui 2010-05-03 20:52:38 +01:00
53930e0898 handle non-supported images/files in the icons folder 2010-05-03 20:38:57 +01:00
b13adbafbf add an ok icon and use it for the connection restored status 2010-05-03 20:32:22 +01:00
556c8b831a Update translation template 2010-05-03 11:50:16 -07:00
a6d10562f1 Don't request a tracker icon for labels or tracker states 2010-05-04 04:37:41 +10:00
a8ac98bb37 Update web ui to use new TrackerIcons 2010-05-04 04:37:41 +10:00
d7fa383da3 Update gtk ui to use new TrackerIcons 2010-05-04 04:37:41 +10:00
6ded75caef Remove no longer needed fetch_url 2010-05-04 04:37:41 +10:00
88929d4821 Rewrite tracker_icons.py (#995) 2010-05-04 04:37:19 +10:00
8747611e9e Add decorators module and test file 2010-05-04 04:33:21 +10:00
acba442ddb fix encoding issues where the users filesystem isn't utf-8 (needs testing) 2010-05-03 18:43:31 +01:00
5b0f93ba72 improve behaviour when webserver goes away 2010-05-03 02:14:51 +01:00
619092aee0 fix plugin info displaying upon select 2010-05-03 02:01:21 +01:00
89fb5b02d7 move the InstallPluginWindow class out of the PluginsPage file
convert the plugins grid over to a listview
2010-05-03 01:54:25 +01:00
75b69b1f11 fix setting the root node 2010-05-03 00:31:49 +01:00
f5eddafea9 tidy up the code for the files tab 2010-05-02 23:20:45 +01:00
d49e1eda79 fix updating the file tree in the file details tab 2010-05-02 23:00:05 +01:00
e86d2ad4e2 apply unicode patch from nullie, fixes (#1140) 2010-05-02 22:13:14 +01:00
5effdd4cd4 store listen_ports and outgoing_ports as tuples for the config set, fixes #1242 2010-05-02 18:32:21 +01:00
c2b4fad389 implement getting and saving label options 2010-05-02 18:16:07 +01:00
82a5b5262c fix the torrent grid, clear the torrents on disconnect, not logout 2010-05-02 18:16:07 +01:00
1b0e08b3d9 fix disabling the execute plugin 2010-05-02 18:16:06 +01:00
49ec3a1535 remove the paranthesis from the @exports 2010-05-02 18:16:06 +01:00
23544bd6b2 Close the connection manager on shutdown - patch from Jan Steffens 2010-05-02 22:39:25 +10:00
5766e04987 Fix deluge-gtk hanging on shutdown (#1247) - thanks Jan Steffens 2010-05-02 22:39:18 +10:00
0857af98d0 fix the spinner limits in the label options 2010-04-30 22:06:49 +01:00
5e78daf726 fix the spinners on the various preference pages 2010-04-30 22:06:32 +01:00
1efb700ed8 enable and disable the form fields upon the checkbox change 2010-04-30 21:34:28 +01:00
e0153e8bdc disable the JSON component upon webserver stop 2010-04-30 14:11:36 +01:00
b46562d932 disable the webui plugin settings and display an error message when deluge-web is missing 2010-04-30 14:04:15 +01:00
5c8eccdd82 reduce the size of the details panel 2010-04-30 13:31:17 +01:00
c45583e8e7 enable and disable the panel toolbar buttons upon selection change 2010-04-28 17:46:21 +01:00
ce46dcdf7a implement the webui so commands can be modified 2010-04-28 17:42:58 +01:00
63f5c8b116 add the icon-edit class, use the same icon as edit trackers 2010-04-28 16:58:07 +01:00
111bea19d9 fix #1240 and #1208 2010-04-28 16:43:14 +01:00
68f0e9ddc7 renderer the event column correctly and remove the bottom panel 2010-04-28 16:09:53 +01:00
5e1f6a8738 switch the gridpanel to a listview 2010-04-28 15:51:47 +01:00
28a313e74e fix up the label plugin making it more stable and work with the new filter panel api 2010-04-28 15:43:06 +01:00
5b6faa47b0 fix the header click event handler 2010-04-28 15:39:39 +01:00
0f12200f6f store the states as a dictionary 2010-04-28 15:33:05 +01:00
7420c6f12f use the header click event to ensure that the filters get updated
correctly
2010-04-28 15:29:40 +01:00
fb0adbcded return this.states instead of the store contents 2010-04-28 15:25:31 +01:00
59b7a175eb store the states without the zero values removed as this.states 2010-04-28 15:24:49 +01:00
cbcd277d91 remove windows line breaks (grr) 2010-04-28 15:19:28 +01:00
269e0b89b6 dont enable plugins twice 2010-04-28 15:10:58 +01:00
698a5ff475 update the deluge.config dictionary with the new values 2010-04-28 14:20:31 +01:00
fd122db7b7 change the multiple filters to be configurable, deprecating the show trackers with zero torrents option 2010-04-28 14:15:50 +01:00
67905b6f5b fix enabled plugins after connecting to a daemon 2010-04-28 14:00:39 +01:00
7df7f13e26 select the text when focusing the password field 2010-04-28 13:41:09 +01:00
066d199c78 fix setting a custom limit when one is already set
focus and select the spinner contents upon window show
2010-04-28 13:39:56 +01:00
c8c5e3449a add a window that allows you to quickly set a custom bandwidth limit 2010-04-28 13:28:47 +01:00
00dc5f0128 remove the button to launch the unfinished file browser 2010-04-28 13:28:00 +01:00
cd10555a8a construct the statusbar in the ui initialisation 2010-04-28 12:40:54 +01:00
158feaa8e0 integrate the statusbar menus into the statusbar and have the limit change handler in the deluge statusbarmenu class 2010-04-28 12:37:35 +01:00
3310cc636f move the statusbar menu class out into a seperate file 2010-04-28 12:03:07 +01:00
9849a16d2c rename files to match the classes they contain 2010-04-28 11:55:07 +01:00
bf28b3ac31 fix the connection manager when the ui disconnects from a daemon so it doesn't end up in a loop 2010-04-28 11:50:56 +01:00
759ae6356d remove the function wrap from the connection manager 2010-04-28 11:28:51 +01:00
c0fd70a856 fix removing the filter panels upon disconnect 2010-04-28 10:45:38 +01:00
028a35bfc8 fix adding an already removed torrent 2010-04-28 10:42:25 +01:00
fec735f948 fix the first item being selected upon creation 2010-04-28 08:42:29 +01:00
9f185da446 update the proxyfield comboboxes and switch some simplestores to arraystores 2010-04-28 08:24:37 +01:00
8414b9cfa9 fire only one event per check, pass an array of nodes
implement #1161 for the webui
2010-04-28 01:06:28 +01:00
91f44c2ad3 fire the same args as the OptionsManager changed event 2010-04-28 00:48:37 +01:00
31304d3397 lazily set the value if the items aren't rendered yet and re-enable setting the allocation in the add window 2010-04-27 23:58:30 +01:00
310b4bad31 allow the allocation to be changed again 2010-04-27 23:49:11 +01:00
9e7dde8997 change radiogroups so they can be used as a single form field 2010-04-27 23:48:04 +01:00
dfde04561f adjust the width of the columns in the con manager 2010-04-27 23:31:12 +01:00
545e4ef717 fix the change event on the spinner group 2010-04-27 23:26:31 +01:00
b1cf238489 show the preferences window when the protocol traffic and freespace icons are clicked 2010-04-27 23:19:52 +01:00
7fe5d37094 fix the spinnergroup widths 2010-04-27 23:18:03 +01:00
a7940d5bf9 use deferredRender: true on the card layout to fix the spinnergroups and
comboboxes
2010-04-27 22:56:02 +01:00
e0e2b1b350 improve the page switching 2010-04-27 22:05:15 +01:00
a58c391675 use blank classes for the sorter in the edit trackers window 2010-04-27 21:49:27 +01:00
9f46958f20 tidy up and convert the gridpanel to a listview 2010-04-27 21:40:55 +01:00
dd82f95975 split out the add connection window into a seperate file 2010-04-27 11:58:39 +01:00
67e27b9b7a fix reporting connection errors on the console (Closes: #1228) 2010-04-27 11:01:01 +01:00
1cc315878a complete the layout of the label options window 2010-04-27 10:31:53 +01:00
412b96ba55 xml escape notifications sent via libnotify (Closes: #1185) 2010-04-27 10:31:53 +01:00
d6b7917350 Fix test_add_torrent_url_with_cookies 2010-04-27 03:01:54 +10:00
8b23af062a add the layout for the maximum tab 2010-04-26 01:34:35 +01:00
3b1d038d2d add missing getFilter function and improve hasFilter 2010-04-26 01:34:35 +01:00
a47f9bc8dd make enabling the plugin more robust 2010-04-26 01:34:35 +01:00
466b245fdf make it easier to manipulate filters 2010-04-26 01:34:35 +01:00
bfdaa47aff add helper methods for adding and removing columns to the torrent status grid 2010-04-26 01:34:35 +01:00
c3290b4ac2 add the save path column to the grid 2010-04-26 01:34:35 +01:00
342001c642 implement the handler for the torrent menu 2010-04-26 01:34:35 +01:00
b4404feed7 add 2 new methods that return the torrent ids to make rpc calls easier 2010-04-26 01:34:35 +01:00
85c0725f83 add a method to get the current states in the filter 2010-04-26 01:34:35 +01:00
29634505e4 remove the old web templates 2010-04-26 01:34:35 +01:00
faa1752d04 select the first filter if the current selected one is removed 2010-04-26 01:34:35 +01:00
2edf19c187 fix displaying empty '' filters 2010-04-26 01:34:35 +01:00
42b3dc7dde add the ability to add labels
set the filter panel to show_zero
2010-04-26 01:34:35 +01:00
80f151be94 move the state updating into the FilterPanel to allow for a custom show_zero value to
be specified
2010-04-26 01:34:34 +01:00
c8ada0ba07 only enable the extra menu options if it is a label 2010-04-26 01:34:34 +01:00
e05384909a add inital options window layout
implement removing labels
specify a custom template for the label filters
2010-04-26 01:34:34 +01:00
3a12a50f3e allow custom templates to be specified for filters 2010-04-26 01:34:34 +01:00
5b0ce6b3d8 remove the function wrap and deluge.sidebar construction 2010-04-26 01:34:34 +01:00
9cde1f3e45 initial implementation of the label plugin webui, purely a mock up at the moment 2010-04-26 01:34:34 +01:00
1825ce09fb fix removing filters that no longer exist
add a filtercreate event
2010-04-26 01:34:34 +01:00
62158d7861 Renamed raiseError to raisesErrorsAs 2010-04-26 02:54:13 +10:00
4de8e57f56 remove some accidental alerts 2010-04-24 01:44:22 +01:00
a3d9b93480 register the execute plugin 2010-04-24 01:42:11 +01:00
7e12222d33 create a plugin registration system to allow for plugin loading on the fly
remove the plugin event handlers from the event manager
fix enabling/disabling plugins when the preferences page hasn't been rendered yet
2010-04-24 01:40:34 +01:00
bf2fc64ce0 remove an unrequired function() wrapping 2010-04-24 00:43:24 +01:00
3fdfedb7f7 revert previous change, we want remove_script to throw an error if the script doesn't exist
fix remove debug and dev scripts in the pluginmanager
2010-04-24 00:34:42 +01:00
01e847b997 fix the execute plugin disabling and change the namespace of the preferences page 2010-04-23 23:48:29 +01:00
50162694b5 fix plugin disabling 2010-04-23 23:47:10 +01:00
ade5f596f4 don't raise an error if the script isn't in the resource 2010-04-23 23:43:20 +01:00
8b7c1681ae fix the execute plugins webui section 2010-04-23 19:30:40 +01:00
2376e857d2 fix up the deluge-web plugin interface 2010-04-23 19:30:40 +01:00
d024c293ed Revert previous change 2010-04-20 20:08:08 -07:00
54617db03f Allow accessing network shares when adding torrents 2010-04-20 12:25:18 -07:00
70580e35db Fix starting plugins 2010-04-20 08:56:07 -07:00
8d02fc3db6 Fix #1238 starting plugins in the gtkui 2010-04-20 08:50:20 -07:00
112b0dc1f0 fix the zeroPad calls in the date function 2010-04-20 08:32:11 +01:00
3fcdcc8eec couple of tweaks to the plugin page layout 2010-04-19 23:17:27 +01:00
7711239452 add the updated override to FormLayout to allow for the field labels to be hidden/shown with field.show()/field.hide() 2010-04-19 22:29:11 +01:00
283cff7852 Apply patch supplied in #1235 to add the time to fdate 2010-04-19 22:27:12 +01:00
fb4bfe7656 re-add the SpinnerGroup type and enable the Network preferences page 2010-04-19 17:08:08 +01:00
070443f811 only use the fix for webkit browsers 2010-04-19 16:29:40 +01:00
76483bf766 restructure the ext-extensions folder and fix some copyright headers 2010-04-19 15:35:33 +01:00
dd1716c240 improve the selective downloading adding support for directories and don't recreate treenodes 2010-04-19 15:35:33 +01:00
c176ff900f fix updating the columns if the node hasn't yet been rendered 2010-04-19 15:35:33 +01:00
9e8d588a05 add a method to TreeGridNodeUI that allows column values to be updated 2010-04-19 15:35:33 +01:00
0fbbf4ac6c fix setting file download priority in the add window 2010-04-19 15:35:33 +01:00
61dd9a5589 Fix setting config values in the console ui including setting paths with
spaces in them
2010-04-18 18:07:26 -07:00
9a632fc3d3 1234: Add time to the torrents added date - patch from tobbez 2010-04-18 14:52:18 -07:00
e0f2c2473e fix error, use os.makedirs instead of os.mkdir, effectively mkdir -p 2010-04-17 22:13:17 +01:00
80e480854e Fix fsize by initialising gettext 2010-04-16 00:08:56 +10:00
86232cac8e Fix #1113 set move on completed to False after a success storage move 2010-04-14 15:49:21 -07:00
bba825703b refs #1180, old label preferences are removed from torrent when new label is set 2010-04-13 15:21:49 -04:00
3f3f7bb5b4 Fix #1225 by reverting change to fix #1180 since that isn't really
considered a bug and just causes more issues
2010-04-13 10:15:10 -07:00
047bdf9e3e Only pause torrents when importing blocklist on startup 2010-04-12 20:42:37 +10:00
0ae609c6df Apply patch from #1226 to allow use of certificate chain files 2010-04-11 23:14:07 +01:00
76fa8e707a Split out the OptionsPanel into seperate classes and files 2010-04-11 23:11:54 +01:00
fdc7d3d7fc Fix #1098 use triple quotes in the docstrings of the generated methods 2010-04-11 11:24:45 -07:00
35dfcf3a77 Pause transfers until blocklist is imported (#861) 2010-04-12 01:01:02 +10:00
f21dd242f6 Fix renaming files in add torrent dialog 2010-04-12 00:07:50 +10:00
8bafc9f966 tidy up and rename Remove.js to RemoveWindow.js 2010-04-09 22:13:42 +01:00
901d2d715c Fix #1222 do not try to set options on a torrent_id that is no longer in the session 2010-04-09 13:05:02 -07:00
02b71451c6 Fix enabling the Freespace plugin by initalizing self._timer on enable()
Stop the timer on disable()
2010-04-09 11:21:07 -07:00
6e737518d8 Fix splitting folders in add torrent dialog (fixes #1112) 2010-04-10 01:01:08 +10:00
addda6cfcc Fix #640 make file size suffixes translatable 2010-04-08 17:43:57 -07:00
afa283cd2d Add an errback for when calling a component's start() fails and revert it back to a Stopped
state in this case
2010-04-08 17:16:28 -07:00
84b33c3418 Fix get_torrent_status by creating a status dict from the cache after it's been updated 2010-04-08 17:09:55 -07:00
a15500d472 Fix menu item icons and glade warnings 2010-04-08 17:01:43 -07:00
7d4c791241 Fix #1180 properly set default options when switching a torrent label 2010-04-08 16:49:40 -07:00
4be615b084 Fix #1218 improper use of callLater 2010-04-08 15:00:07 -07:00
8e4d88f03c implement moving trackers up/down 2010-04-08 17:51:49 +01:00
38c85cf7bb convert the EditTrackers window to use a ListView and split out the various windows
into seperate files
2010-04-08 17:38:16 +01:00
bc165133d0 Fix get_torrent_status returning all keys when cache is outdated 2010-04-08 00:41:48 +10:00
117fe3bb43 Fix the sessionproxy when using keyworded filters.
The caching of state filters has been removed to simplify things a bit.  This shouldn't have too much
impact since the torrent status requests are still using diffs.
2010-04-02 15:53:03 -07:00
5dab17df89 Fix #1210 save sort column order in files tab -- patch from squisher 2010-04-02 12:46:18 -07:00
3560dac792 convert the PreferencesWindow over to using a ListView rather than a
GridPanel
2010-04-02 16:46:32 +01:00
c970a80030 finish converting the AddWindow over to a ListView 2010-04-02 15:44:26 +01:00
09de50ec18 import PIL.Image rather than just Image 2010-04-01 10:10:56 +01:00
78a1ef0cc5 Fix unintended revert of change 2010-04-01 09:55:16 +01:00
d2d9269c87 Close #1205 add free space icon to gtkui 2010-04-01 09:55:15 +01:00
0d091cdacc replace ∞ with its html code &infin; 2010-04-01 09:55:15 +01:00
ac7a1f0065 fix bug showing the menu via key in the torrentview (Closes #1191) 2010-04-01 08:30:30 +01:00
772653d872 Fix unintended revert of change 2010-03-31 20:14:39 -07:00
ce23ff34a7 Close #1205 add free space icon to gtkui 2010-03-31 18:15:29 -07:00
c1200ed63f use getHeaders which is backwards compatible with twisted 2010-04-01 01:19:46 +01:00
af17346ac6 return a valid version 2 filetree 2010-03-31 20:35:44 +01:00
e9a922f829 Fix #1145 show deluge instead of hiding if it is behind other windows 2010-03-31 11:47:54 -07:00
387ea4a911 fix when there is only 1 file 2010-03-31 17:42:46 +01:00
7f1dadf3cd remove all the trailing commas as ie doesn't like them 2010-03-31 17:21:16 +01:00
2417e8537b resize tracker icons if they are too big and PIL is installed 2010-03-31 15:40:40 +01:00
91692bc966 use object format rather than dictionary 2010-03-31 15:40:40 +01:00
4296344502 handle losing connection to the webserver so we don't get stuck firing off loads of ajax requests 2010-03-31 15:40:39 +01:00
7053163f88 use FileTree2 in the TorrentInfo class when specified
adjust the filetree walking functions to match the server side code
2010-03-31 15:40:39 +01:00
14d9f6b7ba fix displaying directory names
tidy up and fix the size of the files being displayed
tweak the layout of the OptionsTab
2010-03-31 15:40:39 +01:00
692ec5bb1b clean up the Url window a little bit and rename Url.js to UrlWindow.js
create the FileWindow on demand and change the filename to match the classname
2010-03-31 15:40:39 +01:00
6039280fb5 split out the AddWindow file into multiple files for easier management 2010-03-31 15:40:39 +01:00
48876fa45c tidy up the file window and fix using Deluge.Client still 2010-03-31 15:40:39 +01:00
ae54d3fa18 Fix creating remote torrents 2010-03-30 16:44:26 -07:00
47509ee705 fix up the FilterPanel and the css class for the selected item 2010-03-30 19:25:50 +01:00
47a80526b3 begin a tidyup of the sidebar, switching from a GridView to a ListView which is faster 2010-03-30 17:33:56 +01:00
183064f857 store the other menu item when we encounter it looping over for later 2010-03-30 14:31:36 +01:00
7c5dacba5f use Number.MAX_VALUE rather than 99999 2010-03-30 14:27:53 +01:00
1c807ad7c8 fix tracking spinner values 2010-03-30 14:27:41 +01:00
6d83556ba8 clear oldData when clear() is issued which fixes data disappearing in the details tab 2010-03-30 13:45:04 +01:00
de9ba4986d fix a couple of issues with the values in the status tab 2010-03-30 13:31:33 +01:00
2956a7db54 Keep track of newly added torrents in the SessionProxy 2010-03-29 18:49:41 -07:00
76de427b96 remove a needless loop in the update_ui() method call 2010-03-30 00:21:37 +01:00
e9df745dd0 move the ProxyField into the preferences package 2010-03-29 23:43:48 +01:00
bf224b0556 tidy up the encryption page 2010-03-29 23:43:20 +01:00
79e62e6069 add a fix for triggerfields in the preferences page 2010-03-29 23:35:53 +01:00
7b84f54974 make greater use of the SessionProxy 2010-03-29 20:22:15 +01:00
4ca14d68c1 make use of the sessionproxy 2010-03-29 20:12:08 +01:00
ee9c7d1971 Fix #1202 set self.state during instantiation regardless of the libtorrent state 2010-03-29 10:57:29 -07:00
7dff81b60b Fix some typos 2010-03-28 22:20:47 -07:00
66bd2e3030 Add sessionproxy.rst 2010-03-28 12:45:51 -07:00
da9af84dc1 Add new component SessionProxy
Use SessionProxy in place of core.get_torrent_status calls
2010-03-28 12:43:23 -07:00
0b44023f92 update all the copyright headers 2010-03-28 13:02:09 +01:00
dd8400558c use a platform agnostic way of combining paths in the FileTree 2010-03-28 12:16:35 +01:00
61b5659972 fix the toggle field and scrolling in the preferences window 2010-03-28 12:16:35 +01:00
c987b74d61 split out the ProxyField to a seperate file 2010-03-28 12:16:35 +01:00
c430ef9a84 Merge branch 'master' of deluge-torrent.org:deluge 2010-03-27 20:07:51 -07:00
7be5b4c8bc Add 2 new states to Component: Starting and Stopping
Fix issue where a Component could have it's start and stop methods called more than once while waiting for their deferreds to fire
2010-03-27 20:05:20 -07:00
ab38ca2ad4 fix the order of the data directory and add peer record ip address sorting again 2010-03-28 03:45:02 +01:00
4d5d31a2b0 add support for defining order via a .order file 2010-03-28 03:45:02 +01:00
eaa03a6f2c change a Deluge.Events to deluge.events 2010-03-28 03:45:01 +01:00
01bb9c4df5 initial commit of the big javascript refactor 2010-03-28 03:45:01 +01:00
46a6576c68 Fix test_component to properly return deferreds from it's test methods 2010-03-27 19:43:42 -07:00
0182641bbb Use the python diff for *.py 2010-03-27 18:51:50 -07:00
e939f17654 fix updating the peers grid 2010-03-27 15:00:48 +00:00
17903c78d4 update the sorter to point to the correct function 2010-03-27 15:00:47 +00:00
676c59c318 rename Deluge.Sorters to Deluge.data.SortTypes and reflect this within the file 2010-03-27 15:00:47 +00:00
4ec10575f3 fix the records names to match the json object we receieve 2010-03-27 15:00:47 +00:00
323638a751 add a new namespace for data records, Deluge.data
rename Deluge.Torrent to Deluge.data.Torrent
add new file Deluge.data.Peer that contains records in the Peers grid
add a singleton that contains sort functions
2010-03-27 15:00:47 +00:00
ce0dc49572 Update .gitignore file to work with git <= 1.6 2010-03-27 17:28:44 +11:00
3f0edee17a Add win32 files from 1.2-stable to keep in sync 2010-03-26 13:14:51 -07:00
ea65974dc2 Remove old win32 files 2010-03-26 13:13:58 -07:00
ddd0f40d4c Add .gitattributes file 2010-03-26 13:12:30 -07:00
12b2f47762 Merge branch 'master' of deluge-torrent.org:deluge 2010-03-26 13:10:58 -07:00
250471fe47 Add .gitignore file 2010-03-26 13:10:35 -07:00
1a26287a5a Merge branch 'master' into autoadd
Conflicts:
	deluge/plugins/pluginbase.py
2010-03-26 11:16:03 -04:00
5c42cfbf64 Fix pluginbase 2010-03-25 15:01:15 -07:00
1cfc4f522e Merge branch 'master' into autoadd 2010-03-25 17:56:20 -04:00
73db03a33b Fix up some docstrings 2010-03-25 14:43:15 -07:00
efe2c06347 remove some useless code 2010-03-25 17:41:15 -04:00
53fd0a57ee add quotes around attribute name 2010-03-25 15:55:01 -04:00
017d1e058e autoadd plugin will now transfer settings from core autoadd folder 2010-03-25 15:30:54 -04:00
e7e480cf3e Fix up some docstrings 2010-03-25 12:01:40 -07:00
c978c6d016 Fix test_alertmanager 2010-03-25 11:47:05 -07:00
8fb56f0410 Update versions in the man files 2010-03-25 10:49:51 -07:00
211d0bee5d Added autoadd plugin 2010-03-25 12:03:36 -04:00
e7c7b8f4db Fix typo 2010-03-24 22:55:45 -07:00
78f9f22a40 Raise a KeyError exception if trying to stop a component that hasn't
isn't registered
2010-03-24 22:52:03 -07:00
c8f2173a04 Use a hack to get the version instead of relying on pkg_resources. This allows the docs to be built without having to install deluge. 2010-03-24 15:36:28 -07:00
256ae0745c Update year 2010-03-24 14:29:17 -07:00
8dad06cfbd Fix some typos 2010-03-24 14:17:58 -07:00
b8270be10f Add ability for plugins to set their component update interval by
setting a 'update_interval' value in their object.
2010-03-24 13:29:41 -07:00
afbca066d7 Fix typo in super call 2010-03-24 13:24:04 -07:00
ee8531aa24 update the debug and compressed js files 2010-03-24 18:04:06 +00:00
7d27b847fb remove unrequired attributes from the button configs 2010-03-24 18:03:38 +00:00
73ec9b0338 Fix the progress bars for directories, was calculating the progress incorrectly 2010-03-23 23:45:52 +00:00
4005003003 remove the last of the resources that used absolute paths and move them to css with relative paths 2010-03-23 23:20:03 +00:00
3e4f2f94dd fix the progress bar usage 2010-03-23 14:36:34 +00:00
d39b5bd071 fix the name for the add window instance 2010-03-23 11:09:49 +00:00
52ea19249c Fix issue where plugins would try to be stopped after they have been
deregistered
2010-03-22 19:59:11 -07:00
a93bbc35a1 Merged test_versionsplit.py into test_common.py 2010-03-22 18:16:17 +11:00
79ab0f118f Add test case for deluge/common.py 2010-03-22 18:11:21 +11:00
9d13b17a3c Fix VersionSplit comparison to do a proper compare and not simply
against the version strings
2010-03-21 15:57:53 -07:00
6aacc6e75c add 2 extra debug logging statements to the Upload controller 2010-03-21 18:59:05 +00:00
c03f519f9a add some base parameter validation 2010-03-21 10:33:02 +00:00
c6caae848f Fix another problem with component change 2010-03-20 20:54:36 -07:00
5945b24476 Fix pluginmanagerbase using new component module 2010-03-20 19:29:36 -07:00
606b623d73 AlertManager will now cancel all pending delayedCalls prior to stopping. 2010-03-20 19:15:33 -07:00
16b832f7ab Fix importing libtorrent 2010-03-20 19:15:33 -07:00
b0714f625f Rewrite component module to handle deferreds properly
Add test_component
Fix test_core to work with new component module
2010-03-20 19:15:33 -07:00
670ad51de1 drop the Config resource and just include it in a script tag on the index page
this allows for dynamic base setting
add support for setting the base via a request header X-Deluge-Header
2010-03-20 14:14:46 +00:00
986e632475 add a missing Ext.namespace in order to create Deluge.preferences 2010-03-20 14:14:30 +00:00
f08c0e053c tidy up doc strings and change InstallPlugin to InstallPluginWindow 2010-03-20 13:35:21 +00:00
fd9dc2d892 add the new command line switches that deluge-web has 2010-03-20 12:41:51 +00:00
67bcaa267a allow the base path to be specified by a command line switch on deluge-web 2010-03-20 12:01:02 +00:00
5a9b671c85 add the jsdoc showing it extends from Ext.util.Observable 2010-03-20 11:26:54 +00:00
af9eeb02b0 rename Deluge.Events to Deluge.EventsManager 2010-03-20 11:02:13 +00:00
ff1ad9d764 fix logging out 2010-03-20 11:01:44 +00:00
7e5e28ea2b update to the new namespace format 2010-03-19 08:48:13 +00:00
51555cab83 fix the quick limits menus
fix displaying speeds with limits
2010-03-18 23:01:42 +00:00
dd866f07de big refactor to meet the new coding style to allow for tidier namespaces 2010-03-18 22:56:18 +00:00
26defff7fc fix building after the theme switch about 2010-03-18 12:41:07 +00:00
7947773a88 move the docs generating out of the js folder and include ext-js when generating the docs 2010-03-17 23:54:59 +00:00
ed03721789 upgrade to extjs 3.1.1 2010-03-17 23:17:13 +00:00
0f6cab42a8 reorganise the themes to make it easier to upgrade extjs 2010-03-17 23:13:32 +00:00
4031b9f94b ensure that we are definitely using the filename 2010-03-17 23:09:44 +00:00
a23648c657 fix the statusbar bandwidth limits (Closes: #1181) 2010-03-17 00:10:33 +00:00
9672480d39 add support for selecting multiple filters 2010-03-16 23:47:44 +00:00
7a115622df add "All" to the list of filters for tracker hosts 2010-03-16 23:44:38 +00:00
f7071b4428 fix the sidebar and torrent filtering (Closes: #1176) 2010-03-16 22:42:52 +00:00
296d790421 If the torrent has been added via a magnet link then try and extract the name from the dn key in the url. Fixes #1154. 2010-03-16 01:14:27 +00:00
228d623aef compress the response of Upload 2010-03-15 12:12:44 +00:00
e83737805d show the connection manager when the ui disconnects 2010-03-14 10:00:04 +00:00
2952a5a7a3 fix up the statusbar switching 2010-03-14 09:20:57 +00:00
21431f18e1 reset the torrents object upon a disconnect so there aren't any errors when reconnecting 2010-03-14 09:05:12 +00:00
4929ba3c44 pass in true to the formatter so fsize doesn't ignore zero values 2010-03-14 08:55:26 +00:00
81d28b686f add a failure callback when uploading a torrent file 2010-03-14 08:46:46 +00:00
e2840148af remove a torrent from the grid as well as displaying an error message 2010-03-14 08:46:46 +00:00
450d526eca Fix issue where the gtkui sometimes won't start if there is a stale lock file or socket in the ipc/
directory.
2010-03-13 12:17:34 -08:00
ae426eb0cd add support for asking the user to change their password if it is their first login 2010-03-13 18:42:46 +00:00
3e6c956ac6 change first_load to first_login in the ui config keys as well 2010-03-13 18:42:46 +00:00
3a54a9aebc change load to login as it seems more sensible 2010-03-13 18:42:46 +00:00
f6c058dd34 add a first_load config parameter 2010-03-13 18:42:46 +00:00
cd7681b909 Fix #1172 notify startup complete when adding torrents externally 2010-03-13 10:08:16 -08:00
d2dafe4180 update the libtorrent submodule to point to 0.15-stable 2010-03-12 10:04:47 +00:00
92837080cd add the libtorrent submodule pointing at RC_0_15 2010-03-11 23:06:47 +00:00
97c2d0346a remove libtorrent submodule that is tracking trunk 2010-03-11 22:59:34 +00:00
da9cb956a8 fix the submodule in master 2010-03-11 22:43:29 +00:00
0ed6eb8564 convert the port field from a "uxspinner" to a "spinnerfield", fixes #1170 2010-03-11 20:13:02 +00:00
f7f928f0b9 fix the entry point for web plugins 2010-03-10 10:39:20 +00:00
24ce77cdf0 add a home icon and corresponding icon class
adjust the file browser window title and add the remaining toolbar items
2010-03-09 23:48:56 +00:00
3a56af99c0 add the toolbar for the filebrowser in initComponent
add a browse button to MoveStorage
2010-03-09 23:40:29 +00:00
c1bf8c1da1 update the sort after an update 2010-03-09 23:32:12 +00:00
f825e8996a update the sort after an update 2010-03-09 23:26:54 +00:00
b919613a51 fix the spinner css classes to use relative paths 2010-03-09 23:06:24 +00:00
38802245b6 display the speed in the title bar 2010-03-09 22:48:33 +00:00
c6da126f55 fix the path to the spacer image when using a different base to / 2010-03-09 22:21:15 +00:00
84374fd83a use Deluge.config.base for the path to the status html page rather than just / 2010-03-09 22:19:01 +00:00
8de2d30de0 add forward and back icons for the filebrowser toolbar 2010-03-09 22:16:03 +00:00
a961947720 add a toolbar to the file browser 2010-03-09 22:16:03 +00:00
ae5071d6cb fix the button css adding !important to ensure that the background-image from them is used
use iconCls for the toolbar rather than fixed paths
2010-03-09 22:16:03 +00:00
00c896ff1d fix the paths of static content so a base config parameter can be used 2010-03-09 22:16:03 +00:00
0f126bcbd5 add the add and create icons to the css file 2010-03-09 22:16:03 +00:00
57fa3d8834 fix the tracker icons when used via a Proxy 2010-03-09 22:16:03 +00:00
e0a8fd70f5 use relative rather than absolute paths for icons 2010-03-09 22:16:03 +00:00
e2b78be264 improve support for a base config parameter 2010-03-09 22:16:03 +00:00
6fd3cd56ff fix the header year and file path 2010-03-09 22:16:03 +00:00
88004c0d54 build deluge-all to bring it up to date with the latest code 2010-03-09 22:16:03 +00:00
739636cc0b On queue_column_sort and seed_peer_column_sort, sorting is now made on a separate function, queue_peer_seed_sort_function so that code can be re-used and only the necessary treemodel lookups are made. 2010-03-08 03:08:13 +00:00
238e183851 Cleaned up the seed_peer_column_sort function. Code reuse is always better. 2010-03-08 02:52:09 +00:00
8a15a18361 PEP-8 and seed/peer sorting support. 2010-03-08 02:06:15 +00:00
2ed9f97bb0 add a stub file/class for a filebrowser 2010-03-07 19:16:20 +00:00
a1be15ffb2 update the libtorrent submodule to point to the public git repository 2010-03-07 19:16:20 +00:00
44d3e2fa2f Merge branch 'master' of deluge-torrent.org:deluge 2010-03-01 17:55:00 -08:00
2ce62bf19b Fix #1161 ask the user if they want to switch to Full allocation if
trying to change file priorities in the add torrent dialog while using
Compact.
2010-03-01 17:53:33 -08:00
3a86fd7068 give the fileuploadfield a width so the text field expands correctly 2010-03-01 22:45:35 +00:00
a69ed83e25 begin adding support for a base config parameter 2010-03-01 17:51:35 +00:00
e5c734fb05 Fix #1162 problem with the queued torrents dialog from not properly adding to the add torrent dialog if set to auto add 2010-02-28 16:58:19 -08:00
cfeae2baf4 Fix #1109 auto add halting when a torrent with invalid filename encoding is in the directory 2010-02-28 16:21:46 -08:00
0ffca9a1f6 Fix silly error from last commit 2010-02-26 14:49:19 +00:00
b8521e7e28 include the ability to profile the web server, code lifted straight from the daemon 2010-02-26 14:26:52 +00:00
50ae65b58a Use faster (non-regex) version of is_url. 2010-02-25 02:01:08 +11:00
4a7782af28 Fix #1143 deluge-console crashes when autocompleting non-existing
directory
2010-02-22 17:11:53 -08:00
5bbe8bec5c update the required libtorrent version to 0.14.9 to match 1.2-stable 2010-02-22 11:59:09 +00:00
a065f95075 Cross-platform fix for #1147. 2010-02-21 18:43:44 +11:00
8dd4d2f094 Fixed typo. 2010-02-21 02:32:24 +11:00
9ad59d5f48 fix #1148, saving execute commands, tuples can't be assigned to stupid me 2010-02-19 23:48:54 +00:00
7999bd1e8c now the size and speed formatters hide on 0 fix the status tab so it displays the same as the gtkui 2010-02-19 20:43:27 +00:00
c81b1620ca fix the doc for fspeed and hide if speed == 0 2010-02-19 20:22:37 +00:00
6d4cf138c8 fix #1147 in trunk as well 2010-02-19 19:50:24 +00:00
a011d6d659 Merge branch 'master' of deluge-torrent.org:deluge
Conflicts:
	libtorrent
2010-02-19 00:39:11 +00:00
1790a1cf2d add an additional check to ensure that the libtorrent folder has files in it 2010-02-18 18:23:36 +00:00
b5533a22bc need to not remove the libtorrent folder 2010-02-18 18:19:29 +00:00
6750e9f122 add libtorrent 0.15 branch as a submodule 2010-02-18 17:26:13 +00:00
04abf6d17b remove the libtorrent folder as we'll now be using git submodules 2010-02-18 17:22:49 +00:00
00734d14b6 update the ChangeLog 2010-02-18 02:32:27 +00:00
bb00387903 fix the peers progress renderer 2010-02-18 02:20:43 +00:00
ea365bf671 fix the cancel button in the edit trackers window 2010-02-18 02:02:32 +00:00
1d2a6f7f0e implement a better remote events system 2010-02-17 01:50:05 +00:00
7bd5ba3cdb use createDelegate and add the onHide method that stops updating the hosts grid 2010-02-17 01:34:42 +00:00
68b5f92ec0 build up the details tab html within the javascript as well as making it easy for plugins to add extra items 2010-02-10 23:16:17 +00:00
04242ba91c fix the broken torrent menu and use icon classes rather than straight icon urls 2010-02-10 22:35:47 +00:00
eef9d8ec13 update the copyright header year for all the js files
implement a new update method that will be compatible with the torrent status deltas
add a new script containing a record for a Torrent
2010-02-10 22:15:29 +00:00
0e9a691954 Fix weird gtk bug that breaks create dialog box's pieces size selection. 2010-02-04 11:17:26 +00:00
9b23ce9e06 Use the preferred locale encoding when renaming files on add 2010-02-03 02:41:24 +00:00
f9d2e96d39 fix the ip address sort function 2010-01-29 16:40:49 +00:00
caed5accea use get_host() in connect() 2010-01-29 15:35:51 +00:00
343521ca25 stop the torrent grid from resetting its position upon update 2010-01-29 11:04:26 +00:00
1d29f67a75 fix the progress bar in the grid 2010-01-28 22:49:56 +00:00
da8367de4d fix the row height 2010-01-28 18:43:30 +00:00
0647c4e3d7 use the BufferView to ease torrent loading in the interface 2010-01-28 18:39:16 +00:00
976824ad99 revert to the default theme if the selected themes stylesheet is missing 2010-01-27 20:23:15 +00:00
a4e12c1d94 change the favicon on the docs template 2010-01-27 11:14:05 +00:00
db4d0fabe7 remove the entry for jsdoc 2010-01-26 18:21:09 +00:00
25b282fdb8 add the full path to the info returned by the file tree 2010-01-26 18:20:43 +00:00
518a73079a fix some issues with the add window 2010-01-26 18:18:14 +00:00
0634592bd9 add a doc string 2010-01-26 18:17:24 +00:00
3e13fe1229 change the formatting 2010-01-26 17:42:17 +00:00
7125eab8b2 add a doc string 2010-01-26 17:42:02 +00:00
57a9e925a7 no need to have this wrapped in an inline function
add a solitary doc string
2010-01-26 17:35:18 +00:00
4afcae325a use createDelegate rather than bind, saving implementing our own method of setting a functions scope 2010-01-26 17:31:32 +00:00
dc764b2ad5 add some basic doc strings 2010-01-26 17:26:53 +00:00
454321614b update the doc strings 2010-01-26 17:07:23 +00:00
d39f6843c9 add the deluge docs template and a build_docs shell script 2010-01-26 17:05:48 +00:00
f63435db90 remove the old jsdoc-toolkit docs folder 2010-01-26 15:25:38 +00:00
8c3b6cb0db add a project file for ext-doc 2010-01-26 15:23:45 +00:00
a89d0d42aa rebuild the non-dev scripts 2010-01-26 14:03:14 +00:00
3368c4c67d re-enable a number of disabled scripts
use hbox for the buttonPanel and remove the pre ext3 hack
2010-01-26 13:59:25 +00:00
447cb52bf1 add .x-mixed-download to the priorities css
fix the way the directory stats are updated (parent directories weren't being updated)
2010-01-26 13:25:44 +00:00
2afd0a4e97 fix the progressbar renderer for the file tree
add a new file priority "Mixed"
add progress bars and priorities for directories using the new tree format
2010-01-26 13:18:16 +00:00
7727a98c45 add a second FileTree class that stores everything as a dict within the tree so information can be stored for directories 2010-01-26 13:12:32 +00:00
744f11e19b rename the TreeGridCustomColumn to TreeGridRenderColumn and add the column object to the template so its accessible from the renderer 2010-01-26 13:11:29 +00:00
0a86a30c2a Initialize session_id to -1 so that it will always return something even
if no connections to the daemon have been established
2010-01-26 02:42:30 +00:00
ec410fc1a9 Remove some debug code 2010-01-26 02:01:53 +00:00
7af689e57f change the priority renderer to return '' if there is no value 2010-01-25 15:10:14 +00:00
fa0d6b1aa0 Increased GTK UI limit for download / upload to 60000. 2010-01-25 09:46:08 +00:00
8fc4caa2f1 Wait on the session state before requesting torrent status updates 2010-01-25 04:58:01 +00:00
25afa04ba3 Use torrent status diffs in the TorrentView to reduce the amount of rpc
traffic from the core->gtkui
2010-01-25 00:15:12 +00:00
c202f7727f Add some rpc stats to the gtkui debug logging 2010-01-24 22:44:44 +00:00
d74050e7a6 partially working files tab added back in 2010-01-24 04:06:06 +00:00
c7635b0ff0 remove commented out line that scanned for the width which is redundant now width is a property of the renderer 2010-01-24 03:29:44 +00:00
0d069d0fe8 change the queue number server side 2010-01-24 03:27:43 +00:00
e441f96204 use Ext.ux.StatusBar 2010-01-24 03:01:12 +00:00
99197b2063 set the correct svn:ignore properties 2010-01-24 02:59:37 +00:00
92d19fd58d initial commit of the big js layout overhall (ui loads but there are parts missing) 2010-01-24 02:55:32 +00:00
b4b95c9423 Don't opitimise when doing a debug build. 2010-01-24 02:23:57 +00:00
e79f6ada2f Move the formatting of RPCRequests to a function so that it's not done every time a rpc request comes
in
2010-01-23 23:50:43 +00:00
0e0cc30128 Add ability to get the session id and validate it.
Fix up some docstrings
2010-01-23 23:41:06 +00:00
9b26f6ebee Fix up the build_debug so that it removes 'NDEBUG' from the CFLAGS 2010-01-23 22:33:24 +00:00
30280b0803 Remove debug print 2010-01-23 22:05:49 +00:00
fe6bcd62be remove all the torrents from the store upon logout 2010-01-23 20:34:32 +00:00
14cea4fbc7 change the data store to a json store to save translating the data into an array first 2010-01-23 15:50:32 +00:00
899ac7c86e remove starting the events manager upon client connect 2010-01-23 15:39:05 +00:00
39341f623f fix the formatting and change it so the events manager is started on the login event 2010-01-23 15:38:07 +00:00
42cbf4f5c6 change the default theme to gray 2010-01-23 15:37:04 +00:00
a3d98029f9 fix formatting and set Ext.USE_NATIVE_JSON to true 2010-01-23 15:35:44 +00:00
031f75a2bb disable the override to formlayout for the time being 2010-01-23 15:34:50 +00:00
a59332b4ef fix logging in 2010-01-23 15:34:32 +00:00
1b2d5bc6ad tweak the way the login is built up 2010-01-23 15:31:17 +00:00
f14b3a8459 fix typo 2010-01-23 14:38:28 +00:00
76fcfa498d add gzip encoding to responses that are just text 2010-01-22 12:39:33 +00:00
2073ae0221 change the default theme to blue for the time being 2010-01-21 21:17:18 +00:00
cd24acd74f upgrade to ext js 3.1 2010-01-21 21:01:02 +00:00
1ac0403f05 switch the css file in the server list 2010-01-21 20:28:10 +00:00
90e562ff98 update the rest of the css files 2010-01-21 19:53:02 +00:00
e010a789c4 remove the carriage returns 2010-01-21 19:50:55 +00:00
964d85d908 update the theme images 2010-01-21 19:34:05 +00:00
3068f006e2 remove the slate theme that is no longer supported 2010-01-21 19:28:40 +00:00
f4cf3d9893 convert spaces to tabs 2010-01-21 19:19:37 +00:00
708ad2e665 add a __contains__ method to the config class
fix upgrading old configs when the key doesn't exist in the old config
2010-01-20 21:04:40 +00:00
0819697c5b update the gettext.js generation script and gettext.js 2010-01-20 20:37:14 +00:00
0121d721cb Make sure all data is passed to pagePart. Accept x-gzip encodings. 2010-01-20 12:36:07 +00:00
a82b6e4fb5 add 2 new commands that allow for libtorrent to be built with debugging enabled 2010-01-20 12:08:29 +00:00
4420f2fae5 Fix hanging when using commands from the command-line
Fix displaying plugin command output on the command-line
2010-01-19 23:00:48 +00:00
f8f9438950 Fix #1128 Show an error dialog when unable to start a 'deluged' process 2010-01-18 02:36:03 +00:00
e211b6feca Update main window glade orientations 2010-01-17 22:18:45 +00:00
d9b9f22998 Completely disable gzip decoding when allow_compression=False. Add extra test. 2010-01-16 04:50:01 +00:00
aaa7dae18e Fix date in 1.2_RC changelog. Add release date to trunk changelog. 2010-01-16 04:21:25 +00:00
2de185adea bump version to 1.2.900 rather than 1.2.9.900 2010-01-14 14:17:05 +00:00
0e2dd9f389 Add gzip decoding support to httpdownloader (implements #1012). 2010-01-14 12:43:59 +00:00
cbac2fbd5a Fix typo. Remove obselete function. 2010-01-14 12:32:04 +00:00
be70305365 Make sure that the port test status image is always reset between tests. Added a "loading" image when the test is in course. 2010-01-12 03:15:50 +00:00
f586b91a59 Remove workaround for lt 0.15 when setting the trackers 2010-01-10 20:17:59 +00:00
623c5ab57b Fix displaying new release dialog in Windows 2010-01-10 19:47:31 +00:00
ed00536468 Add missing import(removed on a previous check-in???). 2010-01-10 16:26:41 +00:00
430b96f4f5 Do not save_state right away, but rather wait for the timer loop 2010-01-08 23:36:44 +00:00
ac66f305e7 Fix displaying root folder when using the 'path.utf-8' keys in torrents 2010-01-08 21:26:33 +00:00
8175b2af58 Use cStringIO to open zip files in python 2.5 2010-01-07 15:27:05 +00:00
4dbc93b1fa Rewrote call to use maybeDeferred (this handles methods that return deferreds).
Fixes #1114.
2010-01-07 00:45:47 +00:00
9b97c6a578 put the default password in the manpage for those too lazy to type "deluge default web password" in google 2010-01-05 14:07:16 +00:00
97375f1a7c Fix #1117 can't use the '3' key 2010-01-04 00:18:53 +00:00
6312ad4a7e Add rudimentary support for local files 2010-01-03 18:02:30 +00:00
b06f46ea7c Fix blocklist ignoring try_times.
Make blocklist print error messages on failures.
2010-01-03 16:27:05 +00:00
a570e67a4d Fix #1116 not being able to use command aliases when not connected to a daemon 2010-01-03 01:37:57 +00:00
221c9984d6 Fix #1115 not showing usage for the 'debug' command 2010-01-02 23:25:45 +00:00
ccc97f83a8 Yet, some more logging clean-ups.... 2010-01-01 22:49:02 +00:00
d557cda55c Clean-up logging. 2010-01-01 22:45:03 +00:00
eee6d4c030 The !FreeSpace plugin only calculates free-space on existing directories. Cleaned-up logging. 2010-01-01 21:44:55 +00:00
177ec7d5c2 Allow choosing which columns are seen on the torrent view by right-clicking it's headers. 2010-01-01 21:27:13 +00:00
f30a10f2b8 Add "Save Path" column to the torrent view. 2010-01-01 21:23:57 +00:00
1c665b7d2f Simplify logic flow a bit (should make local file support easier).
Improve docstrings.
2010-01-01 16:02:20 +00:00
717897b343 Don't apply 'stop/remove on completed' rules to torrents in a Queued or Paused state 2009-12-28 21:50:13 +00:00
7f33292aca Fix not being able to rename folder due to constant updating 2009-12-26 17:10:14 +00:00
3e67620e55 Fix torrent info name not being utf-8 decoded when root file/folder name is blank 2009-12-26 17:09:05 +00:00
bc8cacdbd1 Update svn:externals to point to libtorrent RC_0_15 branch 2009-12-25 21:33:01 +00:00
ec9564d0c1 #496: Remove deprecated functions in favour of get_session_status() 2009-12-25 21:29:47 +00:00
ffb241a4de Strip lines/spaces 2009-12-25 21:27:07 +00:00
d57b2b43ec Implement #457 progress bars for folders 2009-12-24 20:06:23 +00:00
19e2ab2187 Have the .desktop file run 'deluge-gtk' 2009-12-23 23:54:00 +00:00
8e7d4f2cd4 Change share ratio calculation to use the total done instead of the all time downloaded value. This change will make the share ratio calculation not use data downloaded in failed hash checks. 2009-12-23 18:44:00 +00:00
ef2ca43c3d Add in a '_' builtin method if unable to initialize gettext 2009-12-23 01:34:58 +00:00
8bedc613a0 Fix possible TorrentFinishedEvents being emitted on startup for already completed torrents 2009-12-23 01:28:33 +00:00
cd3221baf6 Fix exceptions when gettext/locale cannot be initialized properly 2009-12-21 19:41:31 +00:00
e0ebffb8fa More relaxed definition of what a commented line is in a blocklist.
Decorate readranges with raiseError rather than parse to increase performance.
2009-12-21 13:58:24 +00:00
5a8c443d50 Add another test to httpdownloader.
Make it compatible with python 2.5.
2009-12-21 13:48:00 +00:00
c7d52f3ce5 fix filtering on the tracker host, use == rather than in so tracker urls that contain another trackers url within them aren't picked up as well 2009-12-21 10:26:50 +00:00
fad6ba2193 Fix blocklist status icon not opening proper preferences page.
Show blocklist's file date using the locale's date / time representation.
2009-12-20 09:01:07 +00:00
22c9d7c0ee Fix some packing due to the last commit 2009-12-20 04:23:50 +00:00
3a864bcdad Plugin preference pages will now expand to fill 2009-12-20 04:18:21 +00:00
14f894959f Fix displaying folders in the add torrent dialog 2009-12-20 04:02:41 +00:00
6aebcef2b5 Fix file renaming 2009-12-20 03:45:14 +00:00
9e53e33c24 Fix #1104, #735 use path.utf-8 if available 2009-12-18 04:36:42 +00:00
62a336b7d8 Remove redundant variable. 2009-12-17 23:08:55 +00:00
0cc00ba5df Partial fix for #1103 if the per-torrent option for stopping at a ratio has been unchecked, then do
not stop it at the global setting.
2009-12-17 21:40:21 +00:00
a161bbfcb6 Fix #1095 incorrect piece size used when using some non-English languages 2009-12-17 21:27:04 +00:00
f03d1818fa Upgrade older confs instead of just dying.
Fix major logic error when checking if an update is needed.
2009-12-16 13:46:39 +00:00
13b2e7da26 Fix import on startup which got broken in previous commit. 2009-12-16 12:46:57 +00:00
377f8cf886 Fix blocklist not working for all locales (#1059). 2009-12-16 11:55:34 +00:00
72c9a46fa3 Apply #1100 sort plugins list by name 2009-12-15 17:37:05 +00:00
53b9cdebcd Fix #1099 use triple quotes on docstrings 2009-12-15 06:36:02 +00:00
dc9e2597da Fix showing the remove torrent dialog twice if using the delete key and pressing cancel in the dialog 2009-12-14 23:20:35 +00:00
bc27c2cdf7 Remove Notifications from list 2009-12-14 23:16:56 +00:00
a9631daf7f Fix #768 save tracker list for create torrent dialog 2009-12-14 18:46:08 +00:00
d1f6ca90fc Fix #1086 deprecated gtk.Tooltips usage 2009-12-14 18:20:51 +00:00
68749a7ad5 Fix #594 tray password dialog freeze in Windows
Made the password dialog prettier
2009-12-14 02:15:08 +00:00
5b94861fc9 Fix issue where stoping a daemon that you aren't connected to causes the gtkui to shutdown the
currently connected daemon.
2009-12-14 00:48:18 +00:00
a8697114c1 Fix #823 setting config values to -1.0 2009-12-13 22:47:15 +00:00
0042fb1767 Add #891 remove torrents by pressing the Delete key 2009-12-13 22:16:05 +00:00
b69e25e308 disconnect the client if getting information fails 2009-12-13 21:50:16 +00:00
3c24d72489 use metavar to change the output of --help by optparse 2009-12-13 21:49:10 +00:00
358b5f4b19 Fix issue where hosts will show up erroneously as Offline 2009-12-13 21:46:55 +00:00
43df21517e Disconnect from daemon if getting the info fails 2009-12-13 21:34:26 +00:00
43a5a9111b Fix autoconnecting to a host other than the first one in the list 2009-12-13 21:29:46 +00:00
773f65d708 Add an error dialog when trying to add a duplicate host
Center the add host dialog over the connection manager
2009-12-13 21:25:22 +00:00
cd7b5082a0 Fix #1036 autoconnecting to localhost daemon on start-up 2009-12-13 20:49:23 +00:00
f3f3b3669f Fix #782 do not ask for tray password when window is not minimized to tray 2009-12-12 22:38:26 +00:00
7e0d09a7bc Fix #692 no longer require tray password when quitting from the tray icon while the window is
visible.
2009-12-12 21:22:51 +00:00
42e904b63c reset the add torrent window on hide 2009-12-12 15:56:49 +00:00
35186faf78 Fix printing 'rm' command usage when called with no arguments 2009-12-11 21:19:48 +00:00
62dfd6a664 Implement #1063 option to delete torrent file copy on torrent removal - patch from Ghent 2009-12-11 21:00:12 +00:00
8212a66d5a fix #1075 (changing priority on a whole folder) 2009-12-11 20:45:59 +00:00
eac2a10a12 Fix possible exception when upgrading from a 0.5 state file 2009-12-10 21:28:51 +00:00
9f034657b0 Fix [6003] as it reverted a change 2009-12-10 21:15:56 +00:00
f7b3e11729 update some of the icons in the webui 2009-12-10 18:24:31 +00:00
b47f6badd7 disable the files and options tabs until a torrent has been selected 2009-12-10 17:45:40 +00:00
2ecb233b5b fix uploading plugins when the daemon is not localhost 2009-12-10 17:35:35 +00:00
040f1a5c6d fix the onResize method for the togglefield so it resizes the textfield to the correct size 2009-12-10 17:26:45 +00:00
a126081d2c implement installing plugins via the webui 2009-12-10 15:40:37 +00:00
104852d47e fix the upload_plugin method as it wasn't upgraded to deluge-rpc spec 2009-12-10 15:31:27 +00:00
a2cc2cdd8f remove the margin and padding from the bottom of the options fieldset 2009-12-10 14:35:10 +00:00
7650ebc373 fix enabling plugins on the fly 2009-12-10 14:32:55 +00:00
a4e8d1eb46 Fix using the console in Windows, but only in command-line mode 2009-12-10 01:26:26 +00:00
b9d2094a15 tweak the download prefs page so no scrollbars appear 2009-12-10 00:38:48 +00:00
3f383df479 improve the ToggleField widget, having the checkbox to the left of the
field rather than above it
2009-12-10 00:32:24 +00:00
1ba3955025 add tooltips to the statusbar items
add disk free space to the statusbar
2009-12-10 00:06:34 +00:00
0d3f364aac Apply cookie date fix from adios 2009-12-09 13:13:04 +00:00
d119fa3629 fix a bug in the execute plugin when move_completed is used the incorrect path was passed in 2009-12-08 11:24:56 +00:00
5129682727 tweak the sizes of some form elements to improve the layout 2009-12-08 02:09:03 +00:00
96becf60bd begin the makings of the togglefield widget that allows enabling of move completed/copy torrent files/auto add torrent files fields 2009-12-08 01:56:15 +00:00
9c3efd17cb Change the compressed js script to deluge-all.js to avoid naming conflicts on case sensitive filesystems 2009-12-01 17:11:07 +00:00
19455a7adf copy server.py across from the 1.2 branch 2009-12-01 13:02:46 +00:00
57c96477c1 Add button to Other preferences to associate magnet links with Deluge 2009-11-30 03:50:28 +00:00
f9c61bbc11 Fix #1085 only use ints for specific options to prevent unhandled exception 2009-11-29 21:32:56 +00:00
a80c4e18e7 Fix crash in Windows when creating a torrent 2009-11-29 07:38:29 +00:00
e73c65e602 Properly show 100.00% and reduce number of progress bar updates during a torrent creation 2009-11-29 07:37:29 +00:00
8c283875fb Register just 'deluge' not '/usr/bin/deluge' in the magnet uri handler 2009-11-29 01:45:46 +00:00
1353ce6903 Attempt to register as the default magnet uri handler in GNOME on startup 2009-11-29 01:40:30 +00:00
3136e5490f Add some checks for OSX since it doesn't support SVG icons 2009-11-29 00:52:00 +00:00
cffce4a706 swap the order of the buttons in the remove window 2009-11-26 14:59:04 +00:00
1c318504cf update the build script and rebuild deluge.js and ext-extensions.js 2009-11-25 18:52:00 +00:00
115a7c3795 rename deluge-yc.js to deluge.js in trunk 2009-11-25 18:51:19 +00:00
3fcb0e7ae5 exclude some more things from the sdist 2009-11-25 18:37:40 +00:00
a567b23262 prevent undefineds ending up as a key in the option manager 2009-11-25 18:37:06 +00:00
93468f342a Set batch_write to False in __init__ 2009-11-25 18:23:55 +00:00
635260e686 add the updated setup and new MANIFEST file from 1.2 2009-11-25 17:58:50 +00:00
94625c48b2 Fix loading the saved metadata when loading state with magnet uris 2009-11-25 01:55:51 +00:00
20dc0a5e8a Fix files list when using magnet uris 2009-11-25 01:41:50 +00:00
e6135aa2a9 Fix some accidental reverts 2009-11-25 01:00:25 +00:00
1cb42252b8 Don't throw errors when de-registering notifications.
If sound notifications is not possible or disabled, also disable the sound customization notebook page.
2009-11-22 08:14:09 +00:00
7812f7b4e4 Update the Notifications and FreeSpace plugins descriptions.
On the Notifications plugin, moved the Core and GtkUi notification implementations to `core.py` and `gtkui.py` respectively.
2009-11-22 06:56:50 +00:00
127b577440 If plugin is installed on an older client, known_events might not exist yet. 2009-11-22 06:13:11 +00:00
a5e8a9dc69 Only import gtk inside the GtkUi notifications implementation. Like this one won't need have gtk installed if only the daemon is running. 2009-11-22 05:58:32 +00:00
9bfa5f10b6 Since the WebUI does not yet do anything, remove it's entry point from the notifications plugin.
Cleanup debugging output.
2009-11-22 03:55:36 +00:00
67c0f8609b Merge Heads. 2009-11-22 03:08:28 +00:00
7061e09a8e Remove unused module. 2009-11-22 02:35:55 +00:00
e327d87ebc Moved all notifications into their own classes from which the Core, GtkUi, and possibly latter, Web, plugins inherit from.
The plugins now just handle configuration stuff.
2009-11-22 02:35:47 +00:00
c4f0920c18 Notifications are now working for the built-in TorrentFinishedEvent and the custom one for email, popup, blink and sound notifications. Sounds can even be tweaked for each of the events types.
Needs some code cleanup.
2009-11-22 02:35:37 +00:00
adb22bdfa5 Add the test module so that it can be version tracked. 2009-11-22 02:35:28 +00:00
01a43544d5 Remove un-used module. 2009-11-22 02:35:19 +00:00
8420d6105b Custom notifications now working for emails, popups, blinks and sound.
Blinks might need some changes because, there's no need to formar or gather extra info, so, it might not be needed to allow plugin developers to register custom handlers for it.
2009-11-22 02:35:12 +00:00
1b7a50f88b Checkpoint:
* Custom notification providers working for email.
  * Configuration through the GtkUI working.
2009-11-22 02:35:02 +00:00
8a6ec7232d Merge SVN and HG heads. 2009-11-22 02:34:51 +00:00
535940e2e6 Notifications(email, blink, popup, sound) are working both for classic mode and daemon mode.
Still need some further tests for using `component.get('Notifications').notify*()`.
2009-11-22 02:34:35 +00:00
0723a77214 First notifications plugin commit.
Working when not in classic mode. In classic mode, needs some more coding.
2009-11-22 02:34:23 +00:00
1f58910a38 Fix adding torrents with different metadata by storing the bencoded dict too. If we bencode the stored metadata dict, there is a chance the order of the dict will be different and change the info-hash. 2009-11-20 19:13:12 +00:00
634ecdeb1d Fix issues adding magnet uris 2009-11-19 04:51:19 +00:00
aa86aa6fe1 Fix issue where some torrents with special characters could not be added 2009-11-19 02:39:07 +00:00
789356d44d Fix exception on startup when the system tray icon is not enabled 2009-11-19 02:29:37 +00:00
2b3bd4f1f3 Change the event_list to be a dictionary of known_events and their docstrings 2009-11-16 00:39:15 +00:00
ad04b2a137 Add way to get a list of DelugeEvent classes 2009-11-14 23:42:04 +00:00
1a1ab4e780 Fix endless loop when trying to autoconnect to an offline daemon 2009-11-13 05:26:54 +00:00
330b8b3ced Fix autoconnecting to the next host in the list if the selected one isn't available 2009-11-13 05:22:38 +00:00
bdba9cd00a Fix #1071 issue where Deluge will fail to start if there is a stale ipc lockfile 2009-11-13 01:07:36 +00:00
f98c3adf2f Comment out a debug log 2009-11-10 18:28:27 +00:00
ec2c5ab937 Reduce height of Add Torrent Dialog by ~80 pixels 2009-11-10 02:45:36 +00:00
8dff2375d0 remove alpha from the title 2009-11-09 23:48:32 +00:00
4e2c0a70c4 Allow for colons in PeerGuardian/SafePeer lists' descriptions.
Check that the start & end range resembles an ip when checking a list's validity.
2009-11-09 08:54:13 +00:00
41353c9ae4 Force blocklist to re-detect the format when a download is forced.
Move remove_zeros to common.py and simplify / speed up.
Change debug logging lines to be more uniform.
2009-11-09 01:52:58 +00:00
e73052df1c Fix printing info, help, etc.. on the command line 2009-11-08 17:22:57 +00:00
9b8282010c Fix disabling/enabling plugins after switching daemons 2009-11-08 04:04:40 +00:00
dd67a935cb Fix #1067 import os 2009-11-06 19:22:13 +00:00
0a84bc73c5 Only try to stop LoopingCalls if they are running 2009-11-05 04:35:17 +00:00
baa177a1b1 Fix deleting old .fastresume files with fresh configs 2009-11-05 03:44:46 +00:00
fa5b7e7a66 allow commands that are .pyc files to be used 2009-11-04 23:49:07 +00:00
902ef3fa28 run the path from the add command through os.path.expanduser 2009-11-04 23:36:27 +00:00
8144d15689 add a basic move storage window that fixes #1057 2009-11-04 20:45:21 +00:00
dd860e67f7 remove the connected call upon an update to reduce the number of ajax calls 2009-11-04 19:54:59 +00:00
19d9c71b13 Allow the 'help' command to be called when not connected to a daemon 2009-11-03 22:08:18 +00:00
46906f5447 remove accidentally left in debug line 2009-11-03 14:48:24 +00:00
1893b92f37 make the delete key work in the console ui 2009-11-03 12:47:23 +00:00
fb1d7cfece Fix adding torrents from the Queued Torrents dialog 2009-11-03 03:25:57 +00:00
59b93f4d2e Fix showing the 'Other' speed dialogs in Windows 2009-11-03 03:19:30 +00:00
6880a142e3 Remove debian/ folder 2009-11-02 17:50:32 +00:00
3d76122666 escape the hyphens in the console and web manpages 2009-11-02 17:33:06 +00:00
0f81e2816f forward port the setup.py fix to trunk and update the 1.2 branch ChangeLog 2009-11-02 15:35:56 +00:00
59c7fcf854 Update translations 2009-11-02 01:35:13 +00:00
f6a4d19084 Add the clear() back 2009-11-01 17:49:32 +00:00
ec259d6aea Use batch writing mode in the help command 2009-10-31 22:05:35 +00:00
7983187818 Do not include an 'announce-list' key in torrents when there is only one tracker 2009-10-31 19:49:14 +00:00
2a4cf7cb56 Improve 'info' command draw speed 2009-10-31 18:52:52 +00:00
3b07cc40bd Don't bother clearing the screen during a refresh 2009-10-31 18:44:27 +00:00
fd24e1c17c Fix crash when string length makes line longer than terminal width 2009-10-31 18:43:48 +00:00
f876c17efd Fix crash when removing multiple torrents 2009-10-31 05:50:01 +00:00
ee7f4e452d Fix adding torrents when not showing the add torrent dialog in Windows 2009-10-31 00:08:53 +00:00
7c10dd4c0e Fix #1052 crash when issuing commands while not connected to a daemon 2009-10-30 20:06:07 +00:00
a110ad1d20 Fix improper dos line endings 2009-10-30 19:08:23 +00:00
7c2a2af1f0 Fix displaying non-ascii strings in the console ui -- patch from Ian Martin 2009-10-30 18:00:13 +00:00
6d2d3c0fd0 Fix torrent name being blank when root folder is renamed to /
Update changelog (for previous commit as well)
2009-10-30 00:15:22 +00:00
888997372c Make sure renamed files are utf-8 encoded. 2009-10-30 00:02:25 +00:00
5991abcec5 Use filename suggested by content-disposition header.
Closes #1040.
2009-10-29 06:02:20 +00:00
675d1219cd Consider 0 unlimited when displaying limits in the statusbar 2009-10-28 17:43:29 +00:00
a1e4c51c9c fix #990, showing 0 as a limit when it means unlimited in the statusbar 2009-10-28 17:38:35 +00:00
93e3d2acf6 need to actually continue from the loop otherwise another error still occurs 2009-10-28 13:33:27 +00:00
219f745e68 create a method to escape all possible forms of newlines in a translation as well as the quotes 2009-10-28 13:24:37 +00:00
d6e18f7729 fix displaying the protocol speed in the webui
also update the update_ui method in json_api so it gets the status more like how the gtkui does
2009-10-27 11:39:53 +00:00
d27d7c6733 fix the eta sort order in the webui 2009-10-27 11:16:55 +00:00
831b81529c update the ChangeLog so andar doesn't beat me up
fix displaying tracker urls with & in the url in the gtkui
2009-10-27 11:07:30 +00:00
826f1a2be9 add < and > escaping to the html escape method 2009-10-27 10:57:47 +00:00
e17bd472a8 fix actually escaping (foolish me had left it commented out) and also only update if there has been a change 2009-10-27 10:34:07 +00:00
de82302c67 create a simple html escape method and escape the fields in the details tab 2009-10-27 10:26:59 +00:00
81949449ae fix a couple of bugs in the M.O.M and fix the options tab and file priorities in the torrent add window (success!) 2009-10-27 10:25:16 +00:00
acc850dab9 fixes #1046, changing the option name in the ui rather than the core which would break the other uis 2009-10-27 09:12:22 +00:00
208eef713a Fix #1047 move completed does not work if saving to non default path 2009-10-27 03:08:47 +00:00
dbe90d2882 Use custom user-agent when downloading files with httpdownloader. 2009-10-26 13:58:42 +00:00
3153a545ca Update translations 2009-10-26 01:54:19 +00:00
65545df485 modify the M.O.M so the API is practically the same as the O.M, so the only method that accepts an id is changeId 2009-10-25 17:48:28 +00:00
29d01993c9 Fix typo, update plugin info. 2009-10-25 13:42:11 +00:00
9627b7cb92 Fix exception when using the 'halt' command 2009-10-24 19:49:20 +00:00
c068384845 Fix create_plugin.py script 2009-10-24 05:51:26 +00:00
92eb10be29 Fix #215 ETA sort order 2009-10-24 04:56:10 +00:00
c6d4208a29 Fix previous commit [5864] 2009-10-24 03:47:35 +00:00
c6eaec6998 Fix #799 translate connection status 2009-10-24 02:04:19 +00:00
b77e846744 Fix starting plugins when the pluginmanager is started 2009-10-23 23:23:38 +00:00
566d3c5ebf Fix possible exception when trying to load pre-1.2 plugins 2009-10-23 01:15:30 +00:00
6eee4fb31f Fix 'autostart localhost if needed' option 2009-10-23 01:07:46 +00:00
36e74e05ca fix removing torrents that fail to download when added via url 2009-10-21 20:30:07 +00:00
2289b5f173 fix switching the options when a different torrent is selected
fix showing the private flag
2009-10-21 20:15:16 +00:00
f6b5eb0a0c fixes to the M.O.M and the options details tab, still not 100% though 2009-10-21 19:48:44 +00:00
d70edb245b show the infinity symbol if ratio is less than 0 2009-10-20 22:45:32 +00:00
21701cb096 fix setting bandwidth limits via the statusbar 2009-10-20 22:33:18 +00:00
da2a7ef138 fix setting the add options in the mom 2009-10-20 21:53:54 +00:00
3f1d769ffc merge changes into trunk 2009-10-20 21:44:27 +00:00
9c491c13cc Add option to create torrent name sub-folders in extract folder
Fix issue where the plugin would not stop extracting files after being disabled
2009-10-19 02:10:43 +00:00
bdc173cf4b use os._exit() rather than exit() when forking 2009-10-14 15:53:31 +00:00
4ae439a99a Pause the TorrentDetails component when the window is minimized.
Clean up the pause/resume component code in mainwindow
2009-10-14 15:49:55 +00:00
04217e16d4 big bunch of fixes to the M.O.M along with a couple to the O.M 2009-10-13 16:21:28 +00:00
4a00edc066 move the parameter type converting into a seperate method 2009-10-13 15:22:24 +00:00
aa274eca74 improve the forking code 2009-10-13 15:20:45 +00:00
c0b5bcc7d3 add the option to fork the webui 2009-10-13 11:32:40 +00:00
551d38c7a0 fix a bug in the connection manager where the host list wasn't refreshed after a host was added 2009-10-13 09:56:49 +00:00
c3f433500b allow setting of the value without firing an event 2009-10-12 16:45:28 +00:00
23c949d4ec give names to both the radio buttons so they end up in a group (duh) 2009-10-12 16:44:30 +00:00
3d85791a03 fix a bug in converting non-boolean values back to boolean in the options manager 2009-10-12 09:53:13 +00:00
a3636ccdb7 Fix saving torrent state on fresh configs
Do not try to call doIteration() on the reactor if it has already stopped
2009-10-11 18:46:35 +00:00
e0111271a3 change the value of torrent.queue from -1 to 99999 so the grid sorting works the same as the gtk ui 2009-10-10 14:06:08 +00:00
44217fd977 add a man page for deluge-web 2009-10-10 13:45:31 +00:00
6274a32ca1 Add man pages for deluge-console and deluge-gtk
Update the other man pages
2009-10-09 16:26:10 +00:00
11c0e9a304 Likewise in trunk.. 2009-10-09 00:40:46 +00:00
844f98db04 Fix path errors when adding torrents externally in Windows 2009-10-09 00:19:07 +00:00
3c69822761 Modify setup.py to allow building without libtorrent/ 2009-10-08 02:51:49 +00:00
3a90109724 Likewise in trunk 2009-10-08 02:43:54 +00:00
ce0968e6dc Update gettextize.sh script to use proper encoding
Regenerate deluge.pot
2009-10-05 00:00:37 +00:00
2e6b21aa85 Add script to regenerate the POTFILES.in file
Update the POTFILES.in file
2009-10-04 23:48:18 +00:00
8a5ccbc2d4 Update setup.py 2009-10-04 23:19:34 +00:00
718a12b492 Update ChangeLog and README 2009-10-04 23:07:24 +00:00
34b25d77f1 Fix blocklist plugin 2009-10-04 22:47:27 +00:00
b680ff48e5 Use new method to add plugin tab
Stop graph tearing
Patches from Ian Martin
2009-10-04 19:25:10 +00:00
9a0b6030e6 Allow plugins to properly add tabs and have them restored upon restart - patch from Ian Martin 2009-10-04 19:24:15 +00:00
0e532c7f4e Commit #1019 allow up to 4 MiB piece sizes 2009-10-04 19:15:35 +00:00
384a828795 Commit #850 make urls clickable in the comments field 2009-10-04 19:11:37 +00:00
5c481c3b13 A few fixes for the blocklist plugin 2009-10-04 19:09:06 +00:00
c3193f3c70 Add support for forward slashes in config setting 2009-10-03 22:53:21 +00:00
cb36beded4 Fix #1018 issue with 2nd level folder rename in the gtkui and save resume data on file/folder renamed 2009-10-03 22:10:38 +00:00
fbd6db859f fix bug in the tracker icons resource 2009-10-03 20:44:19 +00:00
d28e5998b9 Commit Ideal's one fastresume file patch with some tweaks 2009-10-03 00:15:43 +00:00
0a9cccb5e8 Fix up the sizing of the downloads preference page 2009-10-01 10:51:27 +00:00
5be72551f0 add copyright header 2009-10-01 10:46:35 +00:00
e1f68fb8fa fix the package name in common
change the script name in webui
add copyright headers to the js file and change indentation
2009-10-01 10:45:59 +00:00
365d21ed04 rename deluge-execute.js to execute.js 2009-10-01 10:43:03 +00:00
2d10f88714 add the missing s to %(filename)s 2009-10-01 10:40:48 +00:00
3d83dab4a1 add a GPL copyright header to the javascript plugin template 2009-10-01 10:39:09 +00:00
c17eb14dd2 remove the paranthesis from the export deco since they aren't needed anymore 2009-10-01 10:36:10 +00:00
95af21eca9 fix up the webui side of the plugin, even if it is skeletal 2009-10-01 10:35:46 +00:00
8fd03cb9ac remove the template folder, since the webui no longer uses templates 2009-10-01 10:33:50 +00:00
9d6aeaecdb add the common module that now exists in most plugins 2009-10-01 10:33:02 +00:00
02e7a7d361 fix web plugin entry point 2009-10-01 10:32:20 +00:00
a0a8c598da move the code that updates the buttons in the CM depending on the host status into a single method 2009-10-01 10:25:11 +00:00
eae452dbe4 change indentation to 4 spaces 2009-10-01 10:12:56 +00:00
3baa1a18d4 disable the connect button if the host is offline 2009-10-01 10:09:21 +00:00
6b13eeeb38 change the _libtorrent module so that the included libtorrent is checked for the correct version also (incase people have been following svn and the version requirement changes) 2009-09-29 09:24:16 +00:00
9fafa31afe fix silly bug in the setup script. bad damoxc. 2009-09-29 09:20:25 +00:00
fd9bf112c4 just some whitespace changes 2009-09-28 16:53:52 +00:00
3f8abf1e34 move the stateful stuff to Deluge.js before any other js has executed 2009-09-28 16:48:02 +00:00
d075ac888e use the version check within deluge so the correct version is checked for 2009-09-28 15:18:51 +00:00
a4d1fbd0bd Fix unbound local error when adding a torrent fails. 2009-09-26 16:25:16 +00:00
66402b7526 Remove some unnecessary dependencies 2009-09-26 03:15:09 +00:00
0be6d83d92 Remove 'state_location' and 'config_location' preferences and all references from the code. We should use configmanager.get_config_dir() instead. 2009-09-25 00:57:22 +00:00
7749f99828 change the labelAlign to top and icnrease the width of the fields 2009-09-24 16:42:36 +00:00
51b15c78a8 add a comment and remove one of the OLD_CONFIG_KEYS 2009-09-24 15:56:42 +00:00
5c5a0712b0 only try and load the old config if the file exists 2009-09-24 15:55:21 +00:00
fb154eaba9 Set the maxValue of the port spinner to 65535 2009-09-24 14:26:05 +00:00
9df5269fee give a bit more love to the connection manager, updating buttons when the host status is updated as well 2009-09-24 08:41:00 +00:00
8270c397da fix bug in the start_daemon method 2009-09-24 08:37:20 +00:00
e0671a0daa fix bug in the stop_daemon method 2009-09-24 08:35:40 +00:00
1b6d92c778 add a start_daemon method 2009-09-24 08:33:35 +00:00
401aa28ba8 update deluge-yc and ext-extensions 2009-09-24 08:11:11 +00:00
9bdcb04cb3 change the spinner strategy so it's an integer 2009-09-24 08:08:43 +00:00
68b4af839f disable the remove button and the stop daemon button when no host is selected 2009-09-23 19:10:44 +00:00
ce449e7b3b fix bug when upgrading old passwords on new logins 2009-09-23 18:16:08 +00:00
a23812f880 Fix #1014 autoadd should verify that the autoadd location is a directory 2009-09-21 05:39:43 +00:00
0d2c73063c Fix previous commit to recursively copy the args 2009-09-19 05:41:36 +00:00
9c40b777f3 Make a copy of the args and kwargs when making a daemon call in classic mode.. This makes it's
behaviour to the same as when making a RPC
2009-09-19 05:16:33 +00:00
3f8441af6a Update the about dialog and have it show the core version and libtorrent version 2009-09-19 00:18:14 +00:00
3901f3e6b2 update the create_plugin script allowing for the new webui plugin stuff 2009-09-17 07:36:13 +00:00
5645d6644d update the example plugin with the new webui plugin stuff 2009-09-17 07:27:33 +00:00
2f49c5cfa7 rewrite the plugins page using the new get_plugins method in the web json api
update the grid when a Plugin{Dis|En}abledEvent occurs
2009-09-16 09:53:49 +00:00
037fbcaaa7 store remote events and register them when the events are started 2009-09-16 09:39:30 +00:00
f831cdce9a add a method that returns both the available and enabled plugins to reduce the number of AJAX calls required 2009-09-16 09:38:46 +00:00
443b4854b4 remove the test children accidentally left in 2009-09-16 09:38:17 +00:00
13109f8a1f just a couple of small tweaks 2009-09-16 09:03:30 +00:00
e4fb98bd02 add a working javascript loader
implement the core code for disabling/enabling plugins on the fly
2009-09-16 09:02:26 +00:00
b2390b8ff4 have the plugin manager remove the scripts and directories from the server when a plugin is disabled 2009-09-16 08:42:39 +00:00
92ecb3fe87 don't enable plugins until connected to a daemonm 2009-09-16 08:32:33 +00:00
63aa818c47 remove the seeds status key from the Peers key list 2009-09-15 11:51:03 +00:00
dcfa83bf09 remove the js loader, doesn't work correctly 2009-09-15 07:29:08 +00:00
cd0f4f69fb have the help button open the user guide on the wiki 2009-09-15 07:28:09 +00:00
dd519f936c tie up the find more button so it opens the plugins page on the wiki 2009-09-14 21:28:02 +00:00
45840727e9 add a js loader class, taken from http://www.extjs.com/forum/showthread.php?p=272104 2009-09-14 16:32:23 +00:00
137be4c8f1 add a method to gather the plugins resources for when they need to be loaded after the ui 2009-09-14 16:31:59 +00:00
6fc1e23fce indicate whether the UI is in debug mode via an additional script tag in the index page 2009-09-14 16:24:47 +00:00
3c02a499a5 stop a session from subscribing to the same event more than once server side 2009-09-14 16:04:52 +00:00
fc1b1a6aa8 improve the plugin manager so that it handles the adding and removing of scripts 2009-09-14 15:56:09 +00:00
b164fef0c5 extend the Deluge.Events class to include support for subscribing to the remote events 2009-09-14 15:55:36 +00:00
daab4aade6 fix a KeyError in the JSON component
implement the EventQueue for the server side handling of events
2009-09-14 15:41:12 +00:00
aa4202b9ed add enable/disable methods to the JSON component
remove the empty enable/disable plugin methods from the web api
2009-09-14 10:36:40 +00:00
da5697490d change the scheduler plugin to use the new plugin architecture 2009-09-14 10:26:59 +00:00
63b02f28d1 change WebPluginBase so it has empty enable/disable methods (web plugins don't need to enable/disable themselves, it's optional) 2009-09-14 10:26:29 +00:00
e7095195f7 fix enabling plugins when the UI is created
change Deluge.Plugin so it implements the enable/disable methods that merely fire events that the plugins can use
2009-09-14 10:19:15 +00:00
4df98df1f2 change Deluge.Plugins to an object rather than array 2009-09-14 10:07:56 +00:00
3d33696c94 add copyright headers to all the preference pages 2009-09-14 10:05:53 +00:00
fef34b3f6f fix the plugin base class scope in the constructor
enable plugins when the UI is initialised
add an array for plugins to put in
2009-09-14 10:02:35 +00:00
7d495e2a16 add a javascript base class for plugins 2009-09-14 09:44:35 +00:00
77253f835c return a 404 if no resource is found, also enable the JSON component when the server starts 2009-09-14 09:25:27 +00:00
3367d0af48 improve the LookupResource class so plugin resources can be put in a sub directory 2009-09-14 09:23:46 +00:00
5e829ca160 tidy up the config dictionary and add default_daemon option 2009-09-14 08:18:29 +00:00
0bc97733bf Do not fail to start if deluged.pid contains no data 2009-09-13 17:17:37 +00:00
7343c5bb39 Fix typo and logic error. 2009-09-13 15:33:45 +00:00
2b46224ef1 Readers raise ReaderParseError when parsing b0rks.
on_import_failure, now handles parse errors.
2009-09-13 14:45:23 +00:00
0952f84d6c Detect now handles creating a reader.
Finished writing detect_format and hence auto_detect (could it really be?)
is_valid() doesn't need to take in a filename (already has it).
2009-09-13 13:51:00 +00:00
d6597bdc22 Added is_valid method to readers.
detect_format now takes in optional compression type.
2009-09-12 14:25:38 +00:00
5573d7ef7d fix indentation 2009-09-10 14:26:14 +00:00
1ebb490e4e fix an AlreadyCalledError when getting a hosts status 2009-09-10 14:19:05 +00:00
a78ab9529f Fix up the Execute plugin's gtk code 2009-09-09 20:47:12 +00:00
3d4e05b5e0 Run the plugin's show_prefs callbacks before the preferences dialog's show() 2009-09-09 20:04:04 +00:00
9c641bb6d0 Fix more indentations 2009-09-09 17:08:00 +00:00
9c6ff72a83 Fix indentation 2009-09-09 17:05:13 +00:00
c0276a541c improve the WebPluginBase class, registering it with the json rpc-api and adding space for scripts/stylesheets 2009-09-09 16:51:44 +00:00
c333ad4f6a remove obselete plugin base file 2009-09-09 16:39:35 +00:00
0ddb1526a1 Add 'plain' as a possible ico type 2009-09-09 05:12:41 +00:00
aca9e853d7 change UTC to GMT and add a method for generating the expires int and string 2009-09-08 09:55:19 +00:00
2caee15f7f Pretty up the Proxy preference page by dynamically showing/hiding fields as needed 2009-09-07 20:47:51 +00:00
b849a4b451 Fix #1009 enabling a plugin twice in the gtkui
Prevent plugins from being enabled more than once in pluginmanagerbase
2009-09-05 19:32:01 +00:00
d1c6e551a9 another patch from David Mohr adding basic cookies support in core 2009-09-04 16:30:56 +00:00
82682dbb2d applying patch from David Mohr replacing the Timer object with LoopingCall 2009-09-04 15:58:41 +00:00
4e3f4128fa Apply patch from David Mohr to make core.py more 1.2 compatible 2009-09-02 22:36:34 +00:00
a6ab62f7ce re-set the _session_id cookie updating the expires time 2009-09-01 22:39:34 +00:00
5d85af9adf Add SSL exception to license in the about dialog 2009-08-31 22:16:39 +00:00
9712d1c16f Updated the feeder __init__.py for 1.2 2009-08-31 19:07:11 +00:00
753e17d612 importing the feeder-plugin for porting to 1.2 2009-08-31 18:55:51 +00:00
7a09ef5356 add the beginnings of the plugins preferences page 2009-08-27 19:13:45 +00:00
f10bf6961b Add PluginEnabledEvent
Add PluginDisabledEvent
Add event handlers to enable/disable plugins on events
2009-08-26 16:59:29 +00:00
6ca835314e add a method for grabbing plugin info 2009-08-26 08:53:58 +00:00
32ed499b2a connect up the key-press-event and have the context menus pop up when the menu key is pressed 2009-08-24 22:13:54 +00:00
bcbe3108c9 ensure the port is a Number 2009-08-24 20:08:03 +00:00
00882ac867 Hide the 'Open File' menu option when connected to a remote daemon 2009-08-23 20:46:31 +00:00
df72c38f22 ensure that the value is a number 2009-08-21 01:06:22 +00:00
24db5bd72a make sure the value is a float 2009-08-21 00:57:08 +00:00
a75405feb0 working version of the proxy preferences page with field hiding, config saving, the whole shebang 2009-08-21 00:50:56 +00:00
aa97b5a273 allow the preferences config panel to overflow and tweak the pages so only the ones required to overflow do so 2009-08-20 23:50:59 +00:00
80634db44c Fix num_pieces calculation 2009-08-20 22:27:40 +00:00
1b3448ad91 add spinner strategies to all the spinners on the bandwidth page 2009-08-20 01:23:04 +00:00
f127d1c451 decrease the margin-top on the server fieldset 2009-08-20 01:19:18 +00:00
e2fb2ddd03 tweak the layout slightly 2009-08-20 01:12:43 +00:00
e05e0b4e35 add support for binding an option to multiple fields 2009-08-20 01:08:09 +00:00
9962206907 include yet more preferences (ssl, port, certificate locations) 2009-08-20 00:55:58 +00:00
937f8715a4 only output config keys that the ui needs in /config.js 2009-08-20 00:54:57 +00:00
54083e0a7e remove some unused configuration values 2009-08-20 00:47:27 +00:00
88471024d9 have the option manager return the field from a bind 2009-08-20 00:47:02 +00:00
e676bcf576 add the session timeout to one of the options on the interface preferences 2009-08-20 00:32:32 +00:00
1a635e8860 only return deferreds for those methods that require it 2009-08-20 00:31:31 +00:00
7d0ccb8847 fix returning the call when the method doesn't return a deferred 2009-08-20 00:27:34 +00:00
ea3f8b7d34 fix the message boxes on the return of the password change call 2009-08-20 00:12:41 +00:00
56aca8f2f9 rewrite the interfaces preferences page as a class
implement password changing
2009-08-20 00:05:35 +00:00
c94c9c36e4 have the change_password method accept an old_password parameter for extra checking
move the password checking logic into a seperate check_password method
2009-08-20 00:04:55 +00:00
865027b3ec increase the expires time each time a session is checked for authentication 2009-08-19 23:30:36 +00:00
9f3ef6556a add an isObjectEmpty method to Ext to test to see if an object == {}
fix a couple of bugs in the options manager
only call core.set_config if there are changed options
call all the pages onApply method if they have one
2009-08-19 23:17:50 +00:00
b4547c0bf0 add a show_session_speed option
add a get_config() method to the web api
2009-08-19 23:16:19 +00:00
219a509bee Fix terminal resizing support 2009-08-19 22:13:58 +00:00
39a09f2704 Fix piece size calculation 2009-08-19 02:14:29 +00:00
4ca5f9a371 Use piece_sizes in KiBs
Fix bug with webseeds
Fix bug with multi-level directories
2009-08-19 01:45:55 +00:00
4014b3fba9 remove an extra creation of the options manager 2009-08-18 22:19:09 +00:00
97163b7cb0 change the session timeout to be configurable 2009-08-18 22:04:58 +00:00
199a307cd9 Add 'cache' command to the console ui to display the cache status 2009-08-17 20:21:02 +00:00
3d3f7e53f9 Fix docstring 2009-08-17 20:20:45 +00:00
fed7392a5d Add a 'plugin' command to the console ui to enable, disable and list available/enabled plugins 2009-08-17 20:09:22 +00:00
fb4e4856d1 Show an error instead of crashing when trying to use a command option without a required argument 2009-08-17 19:13:09 +00:00
2b31544754 Fix console ui from crashing when the terminal size is shrunk 2009-08-17 18:02:56 +00:00
06ecfceb74 Fix print torrent info to the console 2009-08-16 17:13:34 +00:00
66eaa4071d Add the auth level to the RPC Export docstring
Fix up docstrings in the rpcserver module
2009-08-14 23:11:22 +00:00
2681acbc8d Add 'RPC Exported Function' to the beginning of every docstring on rpc exported functions 2009-08-14 22:47:28 +00:00
567a42b0ec Fix some docstrings 2009-08-13 05:02:39 +00:00
74ed19b5f2 Do not use property decorators as 2.5 does not support .setter et al 2009-08-12 21:18:39 +00:00
f562e8aff3 remove log messages as they don't work 2009-08-12 08:20:19 +00:00
8ef55c380e add a log message stating which json encoder is being using 2009-08-12 07:24:10 +00:00
c35535edc3 Print libtorrent version in the log 2009-08-12 07:22:13 +00:00
bd5998ec05 Remove gtkui.rst for the time being 2009-08-12 07:17:21 +00:00
c33cf71b62 stop using get_stats and fix the protocol overheads in the statusbar 2009-08-12 00:59:19 +00:00
b431368b67 remove cruft in the preferences folder 2009-08-12 00:43:40 +00:00
58c3b60ca7 add a new preferences page for encryption 2009-08-12 00:42:48 +00:00
a207e1010b increase the width of the spinners on the bandwidth page 2009-08-12 00:19:33 +00:00
5376ae307a Add maketorrent.rst 2009-08-12 00:11:08 +00:00
b74fdcf558 fix calling core methods 2009-08-12 00:10:07 +00:00
1cfc057b05 Add new maketorrent module 2009-08-12 00:09:22 +00:00
c9b8428106 change onLogout to logout 2009-08-11 23:58:19 +00:00
2c65d21b0b remove rogue print statement 2009-08-11 23:57:54 +00:00
3ed6e28adc fix the scope of the each loop 2009-08-11 23:56:35 +00:00
7f597aff70 fix for when the login window hasn't been rendered 2009-08-11 23:55:01 +00:00
6b8ff92fe2 improve the connection manager 2009-08-11 23:43:56 +00:00
3e8c17b071 complete the new auth system using cookies & sessions 2009-08-11 23:39:58 +00:00
1b17d66576 add a missing method 2009-08-11 23:15:42 +00:00
444272344e change it so the event is only subscribed to for a single fire 2009-08-11 23:15:20 +00:00
7c0590f399 fix a bug when firing the error event 2009-08-11 23:14:38 +00:00
c0d0498f36 Add rst files for all the modules 2009-08-11 23:05:13 +00:00
ba909ebcc9 add an error event to the rpc client 2009-08-11 22:53:53 +00:00
074c2f85a5 return if stats is null or false 2009-08-11 22:51:37 +00:00
6334820a5d stop the update_ui method from calling core methods when the client isn't connected
make the current http request available to exported methods via a __request__ global that gets set before each call
2009-08-11 15:22:59 +00:00
2de8069c9f add an onOk event handler that saves and closes the preferences window 2009-08-10 10:24:45 +00:00
78df3d10ce fix update calls in a few places 2009-08-10 09:58:51 +00:00
01ec3f5b5a change runCheck to update 2009-08-10 09:56:43 +00:00
33d889aaf8 add dump and load methods to the json module if it isn't simplejson 2009-08-10 09:46:57 +00:00
2bece0e03d add everything aside from encryption to the network preferences 2009-08-07 07:33:35 +00:00
38aaea29a0 increase the icon size to 64 so it doesn't look crummy in application switchers that use large icons 2009-08-07 07:31:27 +00:00
c2361f5865 update javascript to ext 2.3 2009-08-07 07:10:55 +00:00
bf0218d785 update the doc string for export 2009-08-07 07:09:53 +00:00
c154301dbd Add a force recheck command to the console 2009-08-06 20:16:23 +00:00
299add850c Have the console command 'info' display all torrents info when no argument is given 2009-08-06 20:15:52 +00:00
7b9fe6ea94 working implementation of the port configuration 2009-08-06 19:03:08 +00:00
5af8fec10a add a spinnergroup widget to make the port sections in the network preferences easier 2009-08-06 18:58:37 +00:00
9bf89455e6 Get the number of rows/columns on refresh() 2009-08-06 18:21:18 +00:00
8425e9915d Move the add_torrent_url_with_cookie url to our server 2009-08-04 01:01:26 +00:00
fa2dedda73 add an override to setValue within the ext spinner extension so setValue amounts are run through the strategy 2009-08-03 22:26:18 +00:00
f216ffe54e Add a comment 2009-08-03 21:45:03 +00:00
ea57cad95b call check_ssl_keys prior to listenSSL 2009-08-03 21:41:53 +00:00
ee573b4816 Add a check_ssl_keys() function that will check for the keys and generate them if needed 2009-08-03 21:39:06 +00:00
352ec837d5 add a webui plugin to core and gtk for integrating the web interface with the core 2009-08-03 21:37:35 +00:00
706c52dd1b Move generate_ssl_keys() out of RPCServer 2009-08-03 21:34:07 +00:00
ac9be780cf Revert 5619
Fix find_json_objects when there is a newline at the end of the string
Add test for find_json_objects
2009-08-03 20:27:03 +00:00
5f561dabda fix a bug in the Config class relating to the config directory 2009-08-03 19:49:47 +00:00
c0ce36b216 only stop the port/socket if one exists
add a start_reactor=True param to the start method
2009-08-03 19:23:27 +00:00
76587be1a7 change the pluginmanager component name to Web.PluginManager 2009-08-03 19:21:53 +00:00
e496fda499 fix for when there isn't a save timer yet 2009-08-03 19:04:54 +00:00
704435f721 Config copies the defaults dict now since it is mutable
Fix saving with the save_timer after setting an item
Add test for testing the save timer
2009-08-03 18:43:05 +00:00
e8b04c1542 Add a test for saving the config 2009-08-03 17:39:12 +00:00
abc3964f73 Reset the config_files when the config directory changes 2009-08-03 16:56:01 +00:00
c2299b793c add .gif images from the images folder also 2009-08-03 16:27:45 +00:00
1f817b3d56 change it so starting in ssl mode is left up to the server
add a stop method that doesn't stop the reactor
2009-08-03 15:40:58 +00:00
a14f4f6869 Fix get_deluge_icon 2009-08-03 14:40:24 +00:00
4cfa6485d7 remove the paranthesis from the decorators in core.py 2009-08-03 11:46:49 +00:00
92a37b7d81 Make sure url, filename and headers are strings before downloading. 2009-08-01 03:00:04 +00:00
9b0d4f6118 Add support for cookies when adding a torrent by url.
Don't set torrent if torrentId is null.
Fix typo.
2009-08-01 02:38:30 +00:00
ded6bb9566 Change the config format
Add test_config
2009-08-01 02:26:26 +00:00
838cef1c36 Fix shutdown handler with GNOME session manager 2009-08-01 00:15:05 +00:00
eef9345e8b Add test file for httpdownloader. 2009-07-31 23:53:23 +00:00
d5f7df8a96 Fix issue where the column state wouldn't save if not using English 2009-07-31 18:47:42 +00:00
aeb087eb3d add the cache preferences page 2009-07-31 08:35:28 +00:00
bdaf0062af Don't clobber the label config 2009-07-31 07:52:01 +00:00
a528f78529 Properly unload Execute plugin when disabling it 2009-07-31 07:40:50 +00:00
2334fff388 Add support for the deluge-gtk start script 2009-07-31 00:57:04 +00:00
983e37d4ab Make sure the 'quit and shutdown daemon' menuitem is shown when switching daemons 2009-07-31 00:46:42 +00:00
ee442536a8 Fix properly disconnecting from the currently connected daemon when connecting to a different daemon 2009-07-31 00:39:09 +00:00
2089fd1823 Add gtkui.common.get_deluge_icon() and use it 2009-07-31 00:18:35 +00:00
26af4214fa add the other preferences page 2009-07-30 23:49:34 +00:00
1429b87da7 disable all the textfields that should have accompanying checkboxes 2009-07-30 23:49:05 +00:00
b8b292c7fb convert the other icons that i could see to the icon theme 2009-07-30 23:46:03 +00:00
91c5028701 use the icon theme's icon where available 2009-07-30 23:41:27 +00:00
974b9a5f3c Fix showing some menuitems when disabling classic mode due to an already running daemon 2009-07-30 23:38:14 +00:00
e6cf3a2fd9 Fix saving column widths when quitting from the tray with the window hidden 2009-07-30 23:23:16 +00:00
2447ed4425 add the indent class and also apply it in the options tab 2009-07-30 23:14:12 +00:00
48ba81b61b add a strategy to the daemon port spinner 2009-07-30 23:13:49 +00:00
63af59ab46 finish the queue preferences page 2009-07-30 23:11:28 +00:00
ccaf4e65f7 Increase the seed time limit spinner max value to 10000 2009-07-30 22:51:44 +00:00
5998eea0bd hide all the preferences page upon the first page change and don't set the width/height 2009-07-30 22:32:58 +00:00
0c4cc4d0e2 fix the dodgy splitter positions on the spinners 2009-07-30 22:26:23 +00:00
8ad774cd3c build the config panel in the initComponent method 2009-07-30 22:14:37 +00:00
c383345cd9 Use the proper download_location when adding a newly created torrent to the session 2009-07-30 22:04:23 +00:00
9c4b6afc05 listen to the 'check' event on the field also incase it is a checkbox 2009-07-30 21:50:16 +00:00
c76e67b109 convert the daemon preferences page into a class 2009-07-30 21:42:04 +00:00
525ffee93e Fix up some docstrings 2009-07-30 21:41:51 +00:00
15dd22812d Fix a bug in the sidebar states when show zero is checked 2009-07-30 21:37:01 +00:00
f07c0d9894 Implement better version check when importing libtorrent -- account for minor version numbers 2009-07-30 21:27:36 +00:00
d685b2ddd6 Move the VersionSplit class to deluge.common 2009-07-30 21:14:50 +00:00
90789982f7 fix the config names of some of the fields 2009-07-29 16:35:52 +00:00
abb05829dc disable setting bandwidth limits via the statusbar for the time being
make the uxpsinner fire the change event when they spin
2009-07-29 16:16:03 +00:00
ee16bffbbd add a cookies field to the url window 2009-07-29 16:05:27 +00:00
97a7890a28 fix a bug in the add torrent via file in browsers other than FF 2009-07-29 10:17:10 +00:00
9b56fab8a1 fix the build script to include the multioptionsmanager and rebuild 2009-07-29 09:59:10 +00:00
999803fce5 set the server to always run in debug mode if 'dev' is in the version 2009-07-29 09:11:19 +00:00
0ac8e39dda build and commit the compressed copies 2009-07-29 09:01:11 +00:00
f031ec5628 increase the widths of the textfields and pass in inputValue rather than value to the radiogroup 2009-07-29 08:58:28 +00:00
5ec004b2ff use item.el.getValue() to compare the value when picking the radio in the radiogroup 2009-07-29 08:55:24 +00:00
a62c545d4a fix a bug in setValue for the RadioGroup 2009-07-29 08:22:19 +00:00
82a4367aa9 use boolean values rather than string values for the radiobuttons 2009-07-29 08:19:45 +00:00
f4b34637dd add the new bandwidth pane in the compressed file 2009-07-28 23:37:11 +00:00
21f09a636a an initial attempt at the bandwidth pane 2009-07-28 23:33:37 +00:00
58b5c1a68f the first iteration of the preferences window that loads AND SAVES preferences (at least the paths in the downloads section) 2009-07-28 22:39:32 +00:00
be07281207 allow set to take an object of options and also update bound fields after the set 2009-07-28 22:31:57 +00:00
deac8e0128 add a property to the field object since we can't use a bi directional lookup in javascript :( 2009-07-28 22:04:00 +00:00
174d974da8 tweak the doc strings (although jsdoc-toolkit still seems to be failing) 2009-07-28 21:51:58 +00:00
eb889c1e33 change the way bound fields work within the optionsmanager 2009-07-28 20:58:24 +00:00
34b0289f24 change Deluge.OptionsManager to only handle a single set of options, and add Deluge.MultiOptionsManager to manage multiple sets 2009-07-28 18:01:58 +00:00
ed4a741e4d make the config constructor parameter optional 2009-07-28 16:53:40 +00:00
9e10012004 make the deprecation warning on get_stats say that its coming from get_stats 2009-07-28 07:39:30 +00:00
ba6f30dad1 Add a deluge._libtorrent module to handle importing libtorrent
Use the new module
2009-07-26 03:26:18 +00:00
100dd1e2a7 Fix test_client 2009-07-25 04:05:00 +00:00
ac36c6b3ee Blocklist now uses get_ip_filter.
Added docstrings.
2009-07-25 03:57:45 +00:00
ac28a01e0b download_file now returns the filename of the downloaded file
when the deferred is successfully fired.
Updated the docstrings in HTTPDownloader.
2009-07-25 03:56:33 +00:00
2731d5be17 Fix get_free_space test 2009-07-25 01:49:05 +00:00
a8c79d1954 Use the deferred returned by getPage in test_listen_port. 2009-07-25 00:54:56 +00:00
22a982430c Remove _update method 2009-07-25 00:41:20 +00:00
25f96f57bb Remove some unnecessary code
Clean up docstrings
2009-07-25 00:39:25 +00:00
e24ba6a025 Change core.test_listen_port to use twisted instead of urllib
Add test for test_listen_port
Remove some unncessary code
2009-07-25 00:30:45 +00:00
321e042a06 Move the InvalidTorrentError check to torrentmanager.remove 2009-07-24 23:40:03 +00:00
5977647528 Add get_free_space() to core 2009-07-24 23:36:43 +00:00
f6d3c108f7 Add InvalidTorrentError. 2009-07-24 10:32:14 +00:00
034606b203 fix the remove torrent dialog 2009-07-23 22:30:08 +00:00
037871e1b3 Fix up some docstrings
Add some deprecation warnings
Add more tests for core
2009-07-23 21:19:01 +00:00
fbaa8db003 Update some docstrings 2009-07-23 04:23:41 +00:00
1b7be24bdf Change core.remove_torrent to only accept one torrent_id, not a list
Added test for core.remove_torrent
2009-07-23 04:14:08 +00:00
0ca5a10d5e Couple more tweaks to the docstrings 2009-07-23 00:46:23 +00:00
0fa403929a update the docs for the ui common module 2009-07-23 00:42:38 +00:00
996d8fd2cc Test commit 2009-07-23 00:27:43 +00:00
5f89f5239e add autodoc for ui.common
fix some docstrings in the json_api module
2009-07-23 00:24:07 +00:00
94891cb1f6 Test commit 2009-07-23 00:23:48 +00:00
d7168f5f49 Test commit 2009-07-23 00:20:57 +00:00
129f3bb7c7 Test commit 2009-07-23 00:19:43 +00:00
1291fd52d1 Test commit 2009-07-23 00:13:54 +00:00
41b3d555c3 Test commit 2009-07-23 00:09:13 +00:00
3af616adb1 Test commit 2009-07-23 00:07:27 +00:00
d972a0c951 Test commit 2009-07-23 00:06:44 +00:00
a29cd7bf1e Test commit 2009-07-23 00:01:21 +00:00
5ca119827b update documentation about the webui 2009-07-22 23:53:30 +00:00
aef0a4616f Don't depend on sphinx to build 2009-07-22 23:52:18 +00:00
5278c82580 Add a version for twisted-web too 2009-07-22 23:40:58 +00:00
a1e41d1fe6 Add required version for twisted. 2009-07-22 23:35:54 +00:00
50ba89659c Remove some unncessary code 2009-07-22 23:06:24 +00:00
ead063e279 Add a 'build_docs' command to build the documentation 2009-07-22 23:04:48 +00:00
85c49595ee update the doc string for add_torrent_url 2009-07-22 20:56:08 +00:00
e5021cdbc8 remove the docs/build folder
revert the removal of the __rpcapi file for auto-generating the rpc api docs
2009-07-22 20:50:06 +00:00
46b5e9b406 exclude docs and tests from find_packages also 2009-07-22 20:31:16 +00:00
f1c192b996 just autodoc the Core and Daemon classes rather than use the RpcApi class 2009-07-22 20:23:16 +00:00
063c8b3980 add the deluge remove js script to the debug list
add a css class for the windows icon
2009-07-22 20:11:18 +00:00
fafe2d3bea add a new window for removing torrents that allows the torrent data to be also removed 2009-07-22 18:57:24 +00:00
88c77f063d Update to the latest ez_setup.py 2009-07-21 18:02:49 +00:00
c9228c99a7 Updated docstring in add_torrent_url.
Wrote test for add_torrent_url which tests sending headers.
2009-07-21 02:45:16 +00:00
698d37f535 setup automatically generating the core's rpc api 2009-07-20 10:51:33 +00:00
8a25bd4adc add a page on deluge-rpc 2009-07-20 10:25:21 +00:00
891bc9df89 use configmanagers get_config_dir rather than get_default_config_dir 2009-07-20 10:08:29 +00:00
6bb4d857c2 add some logging showing pkey/cert locations when starting the webserver 2009-07-20 09:57:17 +00:00
2591845512 Fix error when trying to install. 2009-07-20 09:41:44 +00:00
3c74a8e4bf update the docs, creating a simple structure for user orientated documentation 2009-07-20 09:36:16 +00:00
8bb70f1671 rebuild the docs 2009-07-20 09:09:53 +00:00
c62258fa48 move docs out of the deluge package 2009-07-20 09:02:09 +00:00
cd7b202d9d moves tests out of the deluge package 2009-07-20 09:01:43 +00:00
ae5011ec92 setup the build_spinx command 2009-07-20 09:00:47 +00:00
dcccc3f4de add_torrent_url now uses httpdownloader's download_file.
This also allows it to send request headers.
As a result it can download torrents from sites that require cookies.
2009-07-20 08:47:32 +00:00
3a94a33b56 just return the deferred created by httpdownloader 2009-07-20 08:39:46 +00:00
a2893cc1b7 change download_torrent_from_url to use the httpdownloader module 2009-07-20 08:20:17 +00:00
e1ee5c3436 Blocklist reader's read() now calls callback with two arguments: start and end.
This will allow us to better detect when a blocklist reader fails to parse an entry.
Renamed is_valid to is_ignored to make the purpose of the function less ambigious.
2009-07-20 04:49:55 +00:00
8fbe456410 change BLANK_IMAGE_URL to /images/s.gif rather than http://extjs.com/s.gif
begin converting D.P.D to a class
2009-07-16 13:25:00 +00:00
9aec641965 set the mimetype for the documentation 2009-07-16 09:43:36 +00:00
45eb817301 make the locations of the pkey/cert configurable 2009-07-16 09:24:55 +00:00
aa05a27d28 use the same ssl key and certificate as the daemon (will add the option to specify a different one later) 2009-07-16 08:58:05 +00:00
0490df5a42 clear the options panel when the add window is closed 2009-07-15 18:56:41 +00:00
2450599789 trim the trim variable so there is no decimal point 2009-07-15 18:54:58 +00:00
929a501453 remove the borders on the GridPanels 2009-07-15 16:43:42 +00:00
ba91b6e587 Updated imports.
Added decompresser and reader dicts.
Make import_list actually import list into libtorrent session.
Begin auto-detection of blocklists.
2009-07-15 14:00:57 +00:00
4df5fe20ce Use wiki formatting in DEPENDS 2009-07-15 03:06:58 +00:00
35136b652d Update README and add a DEPENDS file that lists the dependencies 2009-07-15 02:50:26 +00:00
e9d7b71fe8 Changed decompressers names.
No longer use new module, decompressers will decorate an un-instantiated class.
2009-07-14 04:59:35 +00:00
c9a622b846 Prevent exception when clicking 'Rescan Plugins' button when not connected to a daemon 2009-07-13 21:55:34 +00:00
f42e8c4316 Show an Error dialog if starting the core in classic mode is unsuccessful 2009-07-13 21:44:21 +00:00
d0fb657ada Fix exception when quitting in classic mode 2009-07-13 20:23:17 +00:00
fbba1795ad Make the test port button insensitive when not connected to a daemon 2009-07-13 19:45:30 +00:00
0f453eb8f1 Fix some deprecation warnings regarding spinbuttons page adjustment size 2009-07-13 18:27:08 +00:00
bdcc0047a8 Fix opening the preferences window when not connected to a daemon 2009-07-13 18:26:40 +00:00
c4c6d1d511 Fix syntax error 2009-07-13 18:04:26 +00:00
f1350da011 Removed old code from get status. 2009-07-13 05:15:03 +00:00
4c9d01efe8 Removed type combo box from gtkui (will be auto-detecting type).
Removed old format readers.
Added new format readers and decompressers.
2009-07-13 05:12:26 +00:00
c7db93e954 rebuild docs 2009-07-12 23:33:54 +00:00
26b4f4020b disable the options tab in the add window (will complete post release) 2009-07-12 23:33:34 +00:00
2156d1f6f6 large changes within the optionsmanager
fix the details panel to reflect this
add setting of file priorities in the add window
2009-07-12 23:27:41 +00:00
324679de1f build the compressed version 2009-07-12 23:26:52 +00:00
3b810f5ce3 fix a bug in the radio group setValue when the buttons haven't been rendered yet 2009-07-12 23:23:05 +00:00
9762853d32 add a try/except block testing for openssl support before adding it as an option to the commandline 2009-07-08 18:07:12 +00:00
e9541ab7c6 Fix setting cache options 2009-07-08 07:10:15 +00:00
6a78e51475 Fix race condition when blocklist is up to date.
Make import_list return a deferred to prevent error (still doesn't do anything).
Fix typos.
2009-07-07 06:51:47 +00:00
2b789b501b Better fix for last commit.. AuthManager will now raise a BadLoginError if the username or password
does not match
2009-07-06 21:09:22 +00:00
b6793f7268 Fix client.connect() not firing the errback when a login attempt result is 0 (meaning no
authorization)
Fix console connect command
2009-07-06 20:00:41 +00:00
66243d1859 allow for the scope to be specified when calling the walkFileTree method 2009-07-06 11:51:06 +00:00
4cefabe2db add a generic method for walking the file tree in the add window 2009-07-06 11:36:12 +00:00
c2e3f3d228 Store removed columns' state so that plugin's columns are restored properly 2009-07-06 07:05:39 +00:00
9238fab360 Likewise for Windows close/shutdown events 2009-07-06 06:51:54 +00:00
594bc7cb9f Have the gnome "die" signal call gtk.main_quit instead of shutdown 2009-07-06 06:50:40 +00:00
c53af6af33 Fix status reporting. 2009-07-06 06:49:34 +00:00
b3a3b9e4f1 Fix loading old configs with version numbers 2009-07-06 06:38:06 +00:00
2909e285fc Fix restoring vpaned position when window is maximized
Fix stopping gtkui with ctrl+c
Fix showing the connection manager window in the certain of the window if maximized on start-up
2009-07-06 06:29:45 +00:00
efa125ac83 Fix starting plugins when enabled 2009-07-06 05:18:18 +00:00
cdddc38780 Put string conversion from last commit in correct place. 2009-07-06 04:54:45 +00:00
1f2072f8c2 Make sure last_update is an ascii encoded string. 2009-07-06 04:40:57 +00:00
d8e265011a Several blocklist fixes. 2009-07-05 18:38:51 +00:00
1b997b2349 The default format version and file version should be 1 2009-07-05 17:42:36 +00:00
e9f62ea08c Fix typos in blocklist core.
Remove reset_ip_filter and block_ip_range from deluge core.
2009-07-05 16:27:22 +00:00
75338d8a9e Make sure child folders of renamed folders are properly renamed in the torrent options 2009-07-05 16:25:05 +00:00
1b29d267cc Add / to the end of folder names when renaming 2009-07-05 16:19:47 +00:00
f221a39bcf Updated config values names in gtkui. 2009-07-05 06:20:19 +00:00
76bc45a3bf Add some tests for core 2009-07-05 01:17:38 +00:00
2ced8ad189 Change add_torrent_magnets to add_torrent_magnet
Have add_torrent_magnet return a torrent_id on successful add
2009-07-05 00:09:49 +00:00
054ab20402 Use deluge.configmanager.get_config_dir() to find the state folder location since the 'state_location' key in the config may be wrong if the config folder has changed 2009-07-04 23:59:38 +00:00
8c23baa4e2 Modify add_torrent_url to return a deferred that returns the torrent_id as a result if successful 2009-07-04 23:06:14 +00:00
7815f22a73 Stop some LoopingCalls when stopping components 2009-07-04 22:53:10 +00:00
061cd96096 Have add_torrent_file return a torrent_id on successful add 2009-07-04 22:52:41 +00:00
191d83c4be Added check to see if blocklist should be downloaded when load on start is enabled.
Updated function names in gtkui.
2009-07-04 17:05:50 +00:00
5b4d138baf Fix renaming files with / in them 2009-07-04 16:49:18 +00:00
016e99b728 Add a dep to the apt-get list 2009-07-02 18:51:26 +00:00
34def2524f Fix typo 2009-07-02 18:13:37 +00:00
a8b83281ab If a exported method returns a deferred, the rpcserver will now wait for it to fire before sending either the RPC_RESPONSE or RPC_ERROR message back to the client 2009-07-02 18:10:13 +00:00
85c32f0403 Use stored last_update for conditional get. 2009-07-02 15:40:13 +00:00
8e69a82881 Begin rewrite of blocklist (core) using twisted. 2009-07-02 15:29:57 +00:00
d317d5c857 update the sudo apt-get install line 2009-07-02 08:23:24 +00:00
0c0cfaf597 Clean-up the tests and add some new ones 2009-07-02 04:16:37 +00:00
883e61909f Fix deregister_handler 2009-07-02 04:10:20 +00:00
b9a2bf786c Write out the new auth file right away and do not re-read the file if doing so 2009-07-02 03:48:03 +00:00
bbb087c04a suppress only deprecation warnings 2009-07-01 13:56:36 +00:00
74627f682a use only "twisted" in the module arg as that suppresses all warnings from twisted 2009-07-01 13:51:56 +00:00
958c6334b0 suppress depreciation warnings generated by twisted 2009-07-01 13:49:39 +00:00
65697faca5 remove unnecessary import 2009-07-01 13:45:56 +00:00
d3d991d8aa Added support for sending headers when using download_file.
Allows HTTP conditional GET for servers which support it.
2009-07-01 10:02:45 +00:00
d592c0370c HTTPDownloader now "raises" a PageRedirect error when it encounters a temporary redirect or permanent move.
This allows the callee to download the file from the new location.
2009-07-01 08:45:09 +00:00
a66910e50b Move reparent_iter to common
Add support for 'spliting' folders in the add torrent dialog
2009-06-28 00:56:36 +00:00
2ccebaca3b Move 'add_peer_dialog' to peers_tab.py where it should belong.. 2009-06-27 22:49:01 +00:00
23944abc4c Optimize walk_tree() by only getting the base_path once for all siblings 2009-06-27 22:30:01 +00:00
2d379b3c67 Make the cache refresh button actually work 2009-06-27 22:13:50 +00:00
cdf2f79c66 fix some indentation issues 2009-06-27 11:36:34 +00:00
3194f0f994 Add ability to rename files prior to adding them in the gtkui 2009-06-27 02:24:21 +00:00
0a9a6b4816 Add ability to rename files prior to adding with the option "mapped_files" which is a dictionary of {index: filename, ...} 2009-06-26 23:31:47 +00:00
6fb180ed23 add checkboxes to folders and change all the child checkboxes on a change 2009-06-26 18:43:38 +00:00
1edafe2b6c sort out some whitespace 2009-06-26 18:40:48 +00:00
790a10e317 Fix #535 fix saving column widths 2009-06-26 05:29:48 +00:00
abf6de8462 Add a Cache preferences page to adjust cache settings and examine cache status 2009-06-25 23:58:54 +00:00
88e494c197 Fixed stats url encoding. 2009-06-24 05:41:30 +00:00
182845ce3e Fixed #916.
Removed unused code.
2009-06-24 03:22:06 +00:00
a7c2e596d9 Use a more efficient sort to put the torrent state list in queue order 2009-06-24 02:54:39 +00:00
139519d7d1 Fix error when sending stats (quote_plus expects string not list). 2009-06-24 02:35:24 +00:00
33ac5beba5 update the stored option in the onFieldChange event handler 2009-06-23 23:20:11 +00:00
2debe69e34 proxy the check event from the child radio boxes to the radiogroup 2009-06-23 23:18:25 +00:00
c5a21e2be9 add in a radiogroup to facilitate in hiding compact/full allocation as one field and extend Ext.form.RadioGroup so it provides the setValue and getValue methods 2009-06-23 23:10:13 +00:00
e94129135b add the options form layout to the options tab of the add window 2009-06-23 18:46:25 +00:00
b75e17069f change the command options help string a little 2009-06-23 18:22:11 +00:00
b13efa08ff add ssl support to the webui webserver 2009-06-23 18:21:25 +00:00
148afede5b Check to see if the files_list for the torrent_id is available when receiving file_renamed or
folder_renamed events
2009-06-23 17:36:01 +00:00
a29904fefd fix bug in get_hosts if host[x:y] is not a list 2009-06-23 10:02:22 +00:00
76d3c2567e fix the files tree for when there is only 1 file in the torrent and also fix the file size in the add torrent window 2009-06-23 09:37:28 +00:00
2e0bd1bd3c fix an error in the doc string for add_torrents 2009-06-23 09:36:30 +00:00
46163b992f split out getting host status from getting the host list to greatly improve performance of the connection manager 2009-06-22 18:28:51 +00:00
4b934a07ba dummy function now accepts arbitrary number of variables.
metafile uses hashlib instead of sha library.
2009-06-22 14:11:02 +00:00
206718de08 fix adding hosts to the connection manager 2009-06-22 07:58:59 +00:00
7bdc595dd0 fix the error callbacks in the client 2009-06-22 07:56:45 +00:00
f6b90c0097 improve the docstring for the add_torrents method 2009-06-18 08:25:14 +00:00
9a55987ecb fix removing connections from the connection manager 2009-06-17 19:07:30 +00:00
dd85ca3c3e add another escaping slash 2009-06-17 14:51:07 +00:00
12757ef7e8 fix the gettext generation script so that resulting apostrophes from a translation are escaped 2009-06-17 13:57:11 +00:00
9370911ee1 use changeId in the clear method of the options tab 2009-06-17 06:42:37 +00:00
7bc81fbaf9 add a changeId method to the OptionManager 2009-06-17 06:36:55 +00:00
7dfce33065 rebuild the docs 2009-06-16 18:15:28 +00:00
d5f92b506a change the arg from doc to docs 2009-06-16 18:15:09 +00:00
4edb79bcd7 add in support to the optionsmanager for binding form fields 2009-06-16 18:14:23 +00:00
3458b238d8 Add option in Preferences to change the listen interface 2009-06-12 16:12:00 +00:00
ca7f33db1f Get the Stats plugin working again.. sort of.. It still needs a lot of work. 2009-06-11 01:06:08 +00:00
520be10e4d Fix turning off Classic mode dialog
Fix showing the connection manager icon on the toolbar depending on classic mode setting
2009-06-10 22:50:57 +00:00
e36ca0e5ba Fix calling set functions 2009-06-10 22:43:43 +00:00
9495fffeac Show a progress window when downloading torrents from URL
Add ErrorDialogs when trying to add bad torrents and when downloading of torrent fails
2009-06-10 22:35:47 +00:00
e7158c499f Fix dialogs so that they do not run another gtk main loop, but rather run within the current
twisted mainloop
2009-06-10 22:23:49 +00:00
a82a5277a5 Add a httpdownloader module to download files using twisted 2009-06-10 20:18:22 +00:00
4c43980d66 Fix #518 remove header in add torrent dialog to save vertical space 2009-06-10 18:39:14 +00:00
c274da9245 Move the 'Find More Plugins' button down to reduce horizontal usage 2009-06-10 18:34:27 +00:00
7ddb5db6ed Fix the set functions so that you are able to register more than one per config key
Likewise for the config change callbacks
2009-06-10 18:15:52 +00:00
853138e4ee If a 'localclient' entry is not in the auth file, then have the daemon add one. 2009-06-10 18:11:14 +00:00
aa4c783601 tweak the setup script so the web plugin has the correct entry point
implement the webui server side plugin
add a page to the preferences window in the javascript
2009-06-10 16:37:21 +00:00
227e464b63 Fixed typo in seeking. 2009-06-10 14:28:37 +00:00
06b19538fd provide 2 helper methods for adding and removing scripts from the webserver 2009-06-10 13:27:55 +00:00
110af0c2fc fix indentation 2009-06-10 13:27:22 +00:00
29f72a244f Remove statusbar icon when disconnected from daemon 2009-06-10 05:38:59 +00:00
5cdb5f41e4 Make the default schedule all Green 2009-06-10 05:37:28 +00:00
f2002f9077 Fix division by 0 2009-06-10 05:34:06 +00:00
79746c5bc6 Fix svn:externals 2009-06-10 04:44:51 +00:00
267c7408d7 Get the blocklist plugin kind of working.. Still needs some lovin'. 2009-06-10 03:42:33 +00:00
581dcb8202 Force str when calling session.load_country_db() 2009-06-10 03:08:41 +00:00
72d3b0a549 Fix exception when tracker column is not enabled 2009-06-09 21:44:24 +00:00
b430899862 Only move a torrent due to 'move on complete' when some data has been downloaded 2009-06-09 00:35:43 +00:00
ff25a7e969 Torrent creation fixes in regards to web seeds
Fix adding torrent to session after creation by setting the proper download location
2009-06-08 21:57:02 +00:00
95cd5e4932 Remove some more externals 2009-06-08 20:07:47 +00:00
edd3b5d847 fix a bug in the spinner to force the decimal precision to be displayed 2009-06-05 07:39:45 +00:00
db36e9dbfa disable the move storage menu item, this won't be active until the remote file browser has been added
add decimal precision to the spinner strategy (although it doesn't seem to be working?)
2009-06-05 07:19:47 +00:00
ef3b22691b Apply the global bandwidth settings on plugin disable to prevent slow limits from staying in effect. 2009-06-05 02:10:41 +00:00
d4c7134746 Only require 2.12 in preferences dialog 2009-06-04 17:46:15 +00:00
0eee49891a Update Changelog and README 2009-06-04 17:42:57 +00:00
86fca4b43b Remove GeoIP.dat from tree
Add configuration option to set the GeoIP db location, default is /usr/share/GeoIP/GeoIP.dat
2009-06-04 17:25:06 +00:00
a24c07a9bd Fix some issues with creating torrent files, was putting the announce list in the wrong key
Add support for using a system installed GeoIP db file.  It will look for /usr/share/GeoIP/GeoIP.dat first and try to load that
2009-06-04 16:57:53 +00:00
49e27a33bf Update the GeoIP db 2009-06-04 16:20:28 +00:00
b28f75d92d Add support for lt 0.15 2009-06-04 02:26:56 +00:00
b8ab51dc0f Revert trunk to use lt RC_0_14 branch.. 2009-06-03 21:34:14 +00:00
77adcc4b37 Change the svn:externals to point to libtorrent trunk 2009-06-03 21:15:41 +00:00
5c75d3664c remove no longer needed alert 2009-06-02 22:34:02 +00:00
1b9e3c00c8 rebuild docs
improve the options manager, adding events
sort disabling of fields in the options tab
2009-06-02 22:13:16 +00:00
616561ca6d disable all tabs on startup
tweak the options tab layout
2009-06-02 16:51:26 +00:00
b56bb9e2be stop an error in the peers tab if no data is returned
add the code to enforce the sidebar_show_zero option
2009-06-02 12:34:54 +00:00
b54c73d466 Fix the disabling and clearing of the torrent details tabs 2009-06-02 12:19:22 +00:00
f26870ad19 Update ChangeLog 2009-06-02 04:01:46 +00:00
54af19f249 Add Scheduler plugin 2009-06-02 00:57:52 +00:00
c4782e91f0 Update create_plugin script a bit 2009-06-02 00:57:04 +00:00
1091054b38 Add ability to run individual set functions 2009-06-02 00:56:05 +00:00
502fa6983e fix setting prioritize first/last from the options tab 2009-06-01 23:46:35 +00:00
bf3b0bf5c6 remove the # from the copyright comments 2009-06-01 22:51:36 +00:00
ed36526a24 fix the progress bar in the files tab 2009-06-01 22:23:47 +00:00
ff262acbdf change the progress bar to auto width again 2009-06-01 21:36:12 +00:00
3f525293ca tweak the widths so the ui can be used more easily on a resolution of 1024x768 2009-06-01 21:27:23 +00:00
c9ba8b1583 fix the class name for time_added 2009-06-01 21:26:17 +00:00
87355e0490 use inline if/else to set the value of auto managed and also run through gettext 2009-06-01 20:13:05 +00:00
e71c562612 Fix #950 renaming a parent folder into multiple folders 2009-06-01 19:29:15 +00:00
30efe143fe Catch exception when trying to open config file 2009-05-30 01:32:25 +00:00
019c78db47 Add some command line options to the daemon to set the listen
interfaces, -i and -u
2009-05-30 00:22:14 +00:00
d29934a534 Add a "Find More Plugins" button the Plugins pref page that links the user to the Plugins page on the wiki 2009-05-29 00:31:59 +00:00
ea829d0826 Show libtorrent performance warnings in the debug log 2009-05-28 23:55:34 +00:00
63f1874ae8 Modify the Config class to version the config files now.
Add ability to register converter functions for config files to convert them to newer versions.
2009-05-28 23:43:45 +00:00
d1c47982a8 Optimize get_tracker_host by storing the tracker_host value 2009-05-28 19:16:58 +00:00
fa728510dd This should have been in the last commit.. 2009-05-28 19:16:28 +00:00
4dc2f7d9d0 Fix up docstrings in AlertManager and do some minor optimizations 2009-05-28 19:15:32 +00:00
8c587f7330 Add support to profile the daemon using the --profile option 2009-05-28 18:28:33 +00:00
bf2f4ee860 remove debug alert 2009-05-28 10:37:09 +00:00
aa866d5187 improve the optionsmanager
implement setting torrent options via the options tab
rebuild the docs and js file
2009-05-28 10:36:06 +00:00
c8de0b897d Show hosts as Offline when they are initially added to the listview
Select the first host in the list on show
2009-05-28 01:15:38 +00:00
bbdcf7534c Make chardet a non-optional dependency in 1.2.x 2009-05-27 19:18:13 +00:00
629b239739 add a couple of extra methods to the option manager
updateOptions in onRequestComplete in the options tab
2009-05-27 16:31:36 +00:00
ea2a79a903 improve some of the docs in Deluge.UI 2009-05-27 15:51:24 +00:00
9b860c9b3c add a build_docs method to build.sh and rebuild the docs 2009-05-27 15:24:37 +00:00
5b6ecc2b4e rebuild the deluge js 2009-05-27 11:50:50 +00:00
91a471e781 fix setting the download priority for files in the files tab 2009-05-27 11:49:27 +00:00
668683f369 add a new class for managing a options throughout the ui 2009-05-27 11:35:52 +00:00
b5e0222689 Make the global move torrent on completed option a template for newly added torrents to allow
turning off the movement - patch from Plisk
2009-05-27 02:59:44 +00:00
6c023c111f Fix the extracting command call
Touch up the gtkui config a bit
2009-05-27 02:32:00 +00:00
b883ffc474 Fix exception when trackers are disabled from the sidebar 2009-05-25 22:55:42 +00:00
9324134d8f Prevent some uncaught exceptions when systemtray is not enabled 2009-05-25 06:07:26 +00:00
360790876b Fix not using the encoding used in the torrent file to decode some strings 2009-05-25 02:27:33 +00:00
fa9d39c5fb Fix typo 2009-05-21 19:33:12 +00:00
d45e2de1c9 Add InformationDialog
Use InformationDialog instead of ErrorDialog in AddTorrentDialog
Make dialog in GtkUI translatable
2009-05-21 00:18:53 +00:00
2374d44c70 Add error dialog popup when trying to de-select files in the add torrent
dialog while using compact allocation
2009-05-20 23:46:27 +00:00
d2b5e69a5e Add an ErrorDialog 2009-05-20 23:42:03 +00:00
b4a329474a Fix #943 exception when options is None 2009-05-20 21:39:02 +00:00
f78cf72544 Create a BaseDialog class 2009-05-20 21:09:50 +00:00
1d006e1368 Handle shutdown() better 2009-05-20 20:11:57 +00:00
447620f89f Add some extra include dirs for when building on OS X using Fink 2009-05-20 18:51:37 +00:00
2741623e91 Add some more information to the error message when trying to run
multiple daemons
2009-05-20 16:53:32 +00:00
5f8a1ed971 Fix up daemon start-up code a bit.. 2009-05-20 16:11:54 +00:00
0a33931c6b Detect when a daemon is already running in the same config folder.
When the gtkui is run in classic mode with an already running daemon 
process, prompt the user to turn off classic mode or exit.
2009-05-20 01:07:58 +00:00
5afeabd56d attempt to set the icon via the icon theme before falling back to the logo (as in the statusbar) 2009-05-19 23:49:31 +00:00
11351e1544 remove the disable in the options tab
disable all tabs when there is no torrent selected and enable them when there is
2009-05-19 22:47:51 +00:00
323d8133b0 set the mime-type propety on all the html files 2009-05-19 22:33:45 +00:00
1b0ffe748c update the options tab and set the torrent values
improve the docstrings in a few of the javascript modules, and include the
generated documentation.
2009-05-19 22:30:59 +00:00
038c92376a build up the layout for the options tab in initComponent, allowing for easy storage of the fields. 2009-05-18 22:51:06 +00:00
716c0ee564 Update man page to refer to console instead of null 2009-05-18 22:07:51 +00:00
d67477f6e2 Add OpenSSL exception to all GPL headers 2009-05-18 21:51:49 +00:00
c4a247018b Fix up the console ui so that command-line options work again.. Also,
use the new UI class for the 'deluge-console' script.
2009-05-18 21:35:16 +00:00
56735452a8 Clean-up CoreConfig a bit 2009-05-18 21:34:24 +00:00
df21107e3f Improvements to the new UI class and improve how ConfigManager handles
setting the config directory
2009-05-18 21:34:03 +00:00
62bc9d1844 make use of the DeferredList rather than chaining one request after another 2009-05-18 17:43:29 +00:00
1a3e38b1f5 Set some sane defaults for peers/file tabs column widths 2009-05-18 16:26:26 +00:00
bb12f74ae6 Remove unnecessary file 2009-05-17 17:05:28 +00:00
100227f4e1 Added filemode support to setupLogger.
This allows log files to be appended to if desired.
2009-05-17 12:28:03 +00:00
ac418d5935 Potential patch for libtorrent @ 3507 2009-05-17 12:19:14 +00:00
982aaff2a1 Remove icon_size property from toolbar to prevent gtk warnings 2009-05-16 05:47:35 +00:00
8da20c042f Fix some config file locations when using a non-default config directory 2009-05-15 18:09:59 +00:00
be5e12e1e4 Have authmanager return ints instead of strings for the auth level 2009-05-15 17:48:03 +00:00
a7e70509b0 Remove needless del 2009-05-14 23:14:09 +00:00
78d0439d6f Move countries.py to ui/ since it's only used by the UIs 2009-05-14 18:16:16 +00:00
19e21606cd Fix exception when timing out trying to send notification email 2009-05-13 20:52:51 +00:00
5606925aa0 Fix #934 use 'name.utf-8' if available and decode the file path before
joining it with the prefix
2009-05-12 20:22:21 +00:00
397434f7ca Update deluge.pot and a couple i18n tweaks 2009-05-12 18:10:52 +00:00
090e1a035e Implement #259 show tooltip with country name in the peers tab 2009-05-12 17:52:01 +00:00
90e05827dd Remove 5 minute config save timer as it's not really needed and it's
preventing gtkui from starting
2009-05-12 17:48:47 +00:00
65583cfe12 Add some more stuff to the new ui class 2009-05-12 17:07:17 +00:00
c754fc7c74 Remove dep on gobject and replace with twisted.reactor.callLater 2009-05-12 16:57:35 +00:00
54bfbb888b Update deps to include pyxdg 2009-05-12 16:27:41 +00:00
0ab8fa4871 Remove gobject timer and replace with a twisted LoopingCall 2009-05-12 16:15:06 +00:00
901038b3c2 improvements to the doc strings 2009-05-11 19:31:29 +00:00
2b4ca765fa move the config_directory attribute to a property that gets lazily set 2009-05-11 10:28:59 +00:00
7aea3a290e Fix up error message when not specifying a directory with the --config option and add this to 1.1.x 2009-05-11 04:10:05 +00:00
128b40641f Apply #932 minor ti_name optimization 2009-05-10 19:28:23 +00:00
2d2f8f7700 Remove some useless code 2009-05-10 19:11:06 +00:00
384eee2744 Fix showing non-utf8 encoded torrents in add torrent dialog -- this adds an additional dependency on chardet. 2009-05-09 17:46:13 +00:00
96c399f7f5 Optimize ti_name a touch 2009-05-09 03:42:39 +00:00
f12f02fff8 Fix #921 detect if user has json-py installed and add dumps and loads attributes to it 2009-05-09 03:18:54 +00:00
5b3528c9d1 Torrent name is now changed when the root folder or file is renamed 2009-05-09 03:05:43 +00:00
876a01ff84 Fix some debug output when not using utf8 2009-05-09 03:02:11 +00:00
f7bb2f330b Fix #927 add support for more boost versions 2009-05-09 02:59:42 +00:00
00ca3e158b Prevent page headers from moving when adjusting window size 2009-05-08 00:10:03 +00:00
3276de91c3 document the methods 2009-05-07 19:14:02 +00:00
7e291268bb improve the password convertion methods 2009-05-07 18:02:08 +00:00
aeb5e8311b don't delete the salt 2009-05-07 17:51:01 +00:00
107daa57b5 commit the record after updating it 2009-05-07 17:50:16 +00:00
af4c73a594 big change to the webui auth system
added converting of old 1.1 config files
added converting of old md5 passwords to sha1
2009-05-07 16:27:22 +00:00
2766c103e2 change the config class to return true or false on a save to show whether or not it was successful 2009-05-07 15:32:21 +00:00
c59857b802 add config_file as a property to the Config class 2009-05-07 15:09:13 +00:00
007c9bd2a2 finish implementing the edit trackers window 2009-05-05 22:59:34 +00:00
da81704b74 remove pointless if 2009-05-05 22:35:25 +00:00
1480459019 fix tier whilst adding trackers 2009-05-05 22:33:17 +00:00
84b30aa11a add the layouts for the add and edit windows 2009-05-05 21:50:30 +00:00
763a422a15 increase window side and add stubs for the add/edit windows 2009-05-05 20:23:10 +00:00
83ff72490c load the trackers into the grid 2009-05-05 19:29:04 +00:00
712bfcfef1 add edit trackers to the debug list 2009-05-05 19:14:12 +00:00
caafffb484 remove another space 2009-05-05 19:07:05 +00:00
b254385666 remove space in the description 2009-05-05 19:04:53 +00:00
554181a590 add basic edit trackers window 2009-05-05 18:00:32 +00:00
0b1b6d65de update the header 2009-05-05 17:59:38 +00:00
9b25b63664 Add Extractor plugin 2009-05-02 02:13:23 +00:00
9a94b3719d Some changes to the create_plugin script to work properly with 1.2 2009-05-02 02:11:36 +00:00
5b87af0e46 Fix per-torrent move on completed stuff - patch from Plisk 2009-05-02 02:07:11 +00:00
32fc0db2e5 Remove duplicate code 2009-05-01 20:21:25 +00:00
62b0d0b094 Prevent exception when clicking on the Connect button when no host is selected 2009-05-01 17:28:57 +00:00
12dded627e change so INCLUDEDIR not existing in the env won't throw an error 2009-04-30 16:17:50 +00:00
afeb7cf8b1 Use directories listed in INCLUDEDIRS 2009-04-30 16:15:09 +00:00
4c03fad512 change how pages are attached to the preferences window, using the title of the passed in object rather
than having to pass in one
2009-04-30 07:13:23 +00:00
d09cd4908e tidy up the code attaching the script 2009-04-30 07:12:35 +00:00
6669dbb4a0 fix the layout of the options tab 2009-04-29 20:45:07 +00:00
d011c61971 use list comprehension over lambda 2009-04-29 20:15:56 +00:00
e856e65db5 Add path tab-complete to the add command 2009-04-29 02:41:10 +00:00
96b38188fc add a doc string 2009-04-28 15:59:56 +00:00
b4e56e923b don't fire the connect event until the client has finished reloading
it's methods
2009-04-28 09:09:08 +00:00
a579c3b2c7 fix "Expand All" from the context menu 2009-04-28 08:56:03 +00:00
68f5afa89c remove comma causing breakage in IE 2009-04-28 08:54:56 +00:00
d4d7f054f3 remove torrents that are no longer in the update from the grid 2009-04-28 08:39:04 +00:00
78b5c06776 improve the torrents grid, updating existing entries rather than just
reloading the whole grid
2009-04-28 08:35:27 +00:00
7b72d79d32 Made TrackerIcons a component to prevent trying to get an icon multiple
times
Fixed showing the wrong tracker icon in the TorrentView when the icon 
could not be retrieved from the tracker
2009-04-28 02:35:08 +00:00
925dcd43b8 Fix up tab-completion to use the commands 'complete' method 2009-04-28 01:15:12 +00:00
d4cfebadbc fix adding torrents on windows 2009-04-27 22:19:18 +00:00
9ed37e070c Return if bad torrent_info 2009-04-27 22:14:49 +00:00
f2364b8531 add some test web plugin code 2009-04-27 22:02:26 +00:00
16d695f077 enable and disable plugins at start/stop
convert the directories to a list in the lookupresource
2009-04-27 22:01:34 +00:00
137d0f8ebf fix the order of the stylesheets 2009-04-27 21:33:50 +00:00
154e671ecc rebuild 2009-04-27 21:16:15 +00:00
f811fcc549 fix the comment 2009-04-27 21:15:59 +00:00
a7a13636e6 add a loading css style for when the torrent doesn't have its info yet 2009-04-27 21:14:43 +00:00
200e348f7d fix removing torrents from the grid 2009-04-27 20:50:54 +00:00
b88542f105 rebuild the compressed script 2009-04-27 20:49:50 +00:00
858291517e add torrents to be added to the grid before their info has been
retrieved with a url or filename in place of the torrent name
2009-04-27 20:48:39 +00:00
2ac545dec6 Clean-up signal handling since twisted.reactor handles it now 2009-04-27 18:50:41 +00:00
725198fc4d fix handling close on windows 2009-04-27 18:46:30 +00:00
9f2b98bf4b fix showing the add torrent window 2009-04-27 18:14:07 +00:00
6b4f36cbf3 add placeholder file for the infohash window 2009-04-27 18:12:49 +00:00
993c654917 split out Deluge.Add into seperate smaller files
add back adding torrents via file
2009-04-27 18:09:37 +00:00
cb14a2dd22 Remove mapping.py 2009-04-27 18:04:20 +00:00
d856f8501e fix the add window so torrents can be added via url again 2009-04-27 17:43:42 +00:00
370b4ae805 pass the requestOptions to the success and failure callbacks 2009-04-27 17:21:35 +00:00
c267c36b7b Add scrolling with page_up and page_down 2009-04-27 17:17:44 +00:00
204f055c7e clear the cookie rather than setting it to false 2009-04-27 13:56:53 +00:00
e837493757 add basic session support 2009-04-27 13:01:20 +00:00
c4cdd70a4e change the "ready" event to "connected" and fix the failure event
handler
2009-04-27 12:55:42 +00:00
a9392f9002 fix the onLogout handler if the window hasn't been rendered yet 2009-04-27 12:53:58 +00:00
253d08d2f9 fix emptying the panels hash 2009-04-27 11:30:30 +00:00
e6244920e6 Fix typo 2009-04-27 00:30:21 +00:00
5a71e82875 Fix #902 cannot remove torrents 2009-04-26 18:27:46 +00:00
322495cfd5 Fix 'debug' command and update some copyright headers 2009-04-25 22:42:46 +00:00
641ac7356c Clean-up eventlog a bit 2009-04-25 21:11:44 +00:00
a1038203c1 Add support for setting config values 2009-04-25 21:09:07 +00:00
b852051bb7 Add 'is_finished' torrent status key 2009-04-25 07:29:08 +00:00
753b93089f Change color tags to '{! !}'
Add support for viewing config values
2009-04-25 00:31:07 +00:00
6d33ff9902 Add '__getattr__' to CoreConfig to access the dictionary directly 2009-04-25 00:30:11 +00:00
4878743d68 Clean up 2009-04-24 22:53:02 +00:00
c02a647427 Show proper units 2009-04-24 22:52:45 +00:00
64b4255b94 Fix adding torrent to list on TorrentAddedEvent 2009-04-24 22:52:19 +00:00
b2626ea6aa Fix calling 'set_event_interest' when registering a handler after connecting 2009-04-24 22:50:44 +00:00
42242efe66 Fix up formatting of peers list 2009-04-24 21:35:37 +00:00
c846d584a0 improve the new style ui class to start the logging 2009-04-24 19:07:00 +00:00
972393d9ea Fix up info command 2009-04-24 18:50:54 +00:00
4939b8c72e use keys() rather than getKeys() 2009-04-24 18:32:03 +00:00
3b744ae978 set values to blank rather than the initial bogus values first used 2009-04-24 18:31:17 +00:00
1d5bc7669f Fix cursor position when moving through the history 2009-04-24 18:21:31 +00:00
714cd0ed80 Fix missing text if it's before a color tag 2009-04-24 18:19:04 +00:00
9a43ec8258 add a config resource that outputs the uis current configuration
update this in Deluge.js
2009-04-24 18:14:59 +00:00
0523ec1837 assign the cookieprovider to Deluge.UI.cookies 2009-04-24 18:09:58 +00:00
c718c2bf30 Change titlebar update interval to 2 seconds 2009-04-24 17:58:11 +00:00
18950cc1ef add yui compressed version of ext-extensions-debug.css 2009-04-24 14:41:55 +00:00
0a80098576 move ext-extensions to ext-extensions-debug 2009-04-24 14:41:28 +00:00
dbf685f178 Fix uncaught exception when the remove torrent button is pressed when no torrents are selected 2009-04-23 22:55:52 +00:00
45a6ea5a19 Fix deprecation warning 2009-04-23 20:30:09 +00:00
3c47c7ef77 Fix creating torrents in Windows
Fix displaying improper progress when creating torrent
2009-04-23 20:21:01 +00:00
37b3c07025 remove trying to stop the reactor, we can just call reactor.stop() and
shutdown will be called
2009-04-23 12:36:59 +00:00
fac65e9bb0 fix shutdown not being called when killed 2009-04-23 12:33:51 +00:00
465d98eeed add 2 debug log statements 2009-04-23 11:54:42 +00:00
6cd5a7de30 rename Spinner.cs to ext-extensions.css and add in the fileupload and
columntree css
2009-04-23 07:44:19 +00:00
d18a88c46a remove mooui stylesheet 2009-04-23 07:41:20 +00:00
c73966bdd1 fix starting the web via deluge -u web
allow the theme to be specified in the config file
2009-04-23 07:26:14 +00:00
b43e0f6eaa add the layout to the options panel 2009-04-22 07:12:15 +00:00
cadfb5632f fix updating on tab change 2009-04-22 00:12:12 +00:00
6d4eae15a5 add basic options panel 2009-04-22 00:07:55 +00:00
a63e5c594c add the peers tab 2009-04-22 00:04:16 +00:00
d916d36603 remove call to getFields as it's no longer required 2009-04-21 23:46:04 +00:00
8bac2b4597 Add the files tab back 2009-04-21 23:43:46 +00:00
1df462cf0b comment out the debug alert 2009-04-21 23:41:22 +00:00
5db7a5a21b remove the old mootools rpc client 2009-04-21 22:18:11 +00:00
431271d453 update the build script to match the new script names and rebuild the
compressed script
2009-04-21 22:03:40 +00:00
db00f4690d fix changing the limits on via the statusbar menus 2009-04-21 21:59:15 +00:00
9df1ec2193 remove pointless privatising 2009-04-21 21:46:20 +00:00
ee5cfc8cff updated __debug scripts list and some css 2009-04-21 21:45:56 +00:00
1157fc1eeb commit all new-style code so it can be versioned, NB: this is in a
broken state currently.
2009-04-21 21:41:18 +00:00
e1e45753de add a reloadMethods function to use instead of simply creating a new
client
2009-04-21 21:36:32 +00:00
b62a5d7329 fix calling the success/failure callbacks 2009-04-21 20:34:41 +00:00
1f212b8a38 extend Ext.util.Observable rather than reinventing 2009-04-21 20:27:25 +00:00
1be29dc319 ext based Deluge.Events 2009-04-21 20:15:49 +00:00
fb85e76a1f fix missing torrent_id in on_alert_state_changed 2009-04-21 18:32:34 +00:00
cf0d155e99 rewrite the rpcclient using ext 2009-04-21 17:27:55 +00:00
be1a1fc0be Fix loading improperly created torrents with mismatched encodings 2009-04-21 17:16:19 +00:00
4fde1b4a2f Fix typo 2009-04-21 16:32:53 +00:00
0e10f608b9 check to see if .build_data exists in check_file before running the grep
don't remove the concatenated files if the compression fails
2009-04-21 09:27:59 +00:00
10b11f36c7 remove the mootools dependence and also rebuild gettext.js anyway 2009-04-21 09:08:05 +00:00
a60bf912fb fix displaying the host-list 2009-04-21 07:26:20 +00:00
9d583b8c51 completely rework deluge-torrent.js into a self-contained ext class
add .build_data to svn:ignore on js
add in the first build of deluge-yc.js
2009-04-21 07:17:49 +00:00
b72ec252af fix building deluge-yc.js, was including $ALL_FILES rather than
$DELUGE_FILES in the cat
2009-04-21 07:15:32 +00:00
c17af41940 Fix up some commands 2009-04-21 02:43:20 +00:00
9da95552f3 move the progressbar renderer helper method to deluge.js 2009-04-20 22:32:42 +00:00
d795a66ae9 Add missing files 2009-04-20 22:01:52 +00:00
111b64d38b fix checking the free diskspace on windows 7 2009-04-20 21:05:05 +00:00
f82c67f36c fix importing the ui start method 2009-04-20 20:40:44 +00:00
503169ce76 fix serving binary files on windows 2009-04-20 20:26:03 +00:00
2f44899521 add back in the old WebUI class and rename the import in ui.py so
compatibility isn't broken
2009-04-20 20:11:31 +00:00
cd050bf8e7 rename from web to webui 2009-04-20 19:56:35 +00:00
e3dea5ee8a Fix some typos 2009-04-20 19:20:33 +00:00
b605048d23 Force 16x16 pixbufs in tracker column 2009-04-20 18:11:22 +00:00
7bdf8bffd8 Fix the quit command 2009-04-20 03:51:15 +00:00
b3ee54fcdc Clean-up some of the code in the torrentmanager alert handlers to
prevent uncaught exceptions during shutdown
2009-04-20 02:28:06 +00:00
22c9fffad8 Fix issue where cannot resume torrent after doing a 'Pause All' 2009-04-20 00:02:36 +00:00
e08c51e10c Update to asio 1.4.1 2009-04-19 21:40:09 +00:00
73e58c20c8 Add event logging 2009-04-19 19:57:06 +00:00
28bc5c839e Fix displaying lines that are longer than the number of columns 2009-04-19 19:55:40 +00:00
e0f8369e91 Only emit a TorrentStateChangedEvent when the state has actually changed 2009-04-19 19:51:11 +00:00
6c9dd4d5c9 Show a Paused state when a Checking torrent is paused 2009-04-19 19:50:39 +00:00
2589baf0e2 Fix event handler de/registering 2009-04-19 19:50:12 +00:00
b60dc2d4ca start new ui class 2009-04-19 13:46:11 +00:00
0905695910 Add tab completion support 2009-04-18 22:27:54 +00:00
df00d28af4 Remove unused variable 2009-04-18 18:53:16 +00:00
e1c5c0b3ff Re-add input string during refresh
Do not fsize config values
2009-04-18 18:46:01 +00:00
3ac0cace6b Fix starting the console ui 2009-04-18 18:28:35 +00:00
56a1c50bc6 Add a defer property to use to check when the CoreConfig is ready 2009-04-18 18:27:35 +00:00
00d078a5ea Fix some uncaught exceptions if the session is not authorized 2009-04-18 18:19:47 +00:00
99e981dbf8 Add some missing files 2009-04-18 18:14:57 +00:00
2542745c16 Add tracker icon to Tracker column 2009-04-18 17:46:14 +00:00
08b3ce97b3 change it so instead of modifying the list at render it uses a completely seperate list when being run in debug mode 2009-04-18 16:30:14 +00:00
491f4a4438 move the classes in deluge-ext to ext-extensions and remove deluge-ext 2009-04-18 16:20:07 +00:00
843deae4cd move the contents of the spinner files into ext-extensions-debug.js 2009-04-18 16:14:56 +00:00
2ead8be0d4 script to combine and compress the deluge javascript 2009-04-18 16:11:18 +00:00
e5459eda49 move mootools-bridge.js to mootools-bridge-debug.js and create the
yuicompressed mootools-bridge.js
2009-04-18 14:52:13 +00:00
70b7fa908f remove the gettext calls from the dictionary, and add hinting for the
generation script above instead
2009-04-18 13:00:18 +00:00
286619f4e3 add FILE_PRIORITY_CSS and run FILE_PRIORITY through gettext 2009-04-18 12:50:34 +00:00
9cf9d74f5c change Deluge.ProgressBar xtype to deluge-progressbar 2009-04-18 12:49:46 +00:00
067f0c3713 Start work on new Console UI .. Don't expect anything to work, cause most of it doesn't. 2009-04-18 05:35:03 +00:00
a513f9c12a Fix typo 2009-04-17 21:24:49 +00:00
b6f40a8115 Move CoreConfig component out of GtkUI since it's UI independent 2009-04-17 21:09:14 +00:00
8fef414054 begin messing about with the plugin manager 2009-04-16 22:03:50 +00:00
74ac41e686 remove Roar 2009-04-16 20:00:27 +00:00
9be54918fb generate the <script> and <link> tags dynamically 2009-04-16 19:59:34 +00:00
134bed774c fix semi-colon in the login window
change themes back to a static.File resource
2009-04-16 19:38:54 +00:00
427cc63803 create a LookupResource and use this instead of the static file resource
to serve images, javascript, css etc. as it allows plugins to add lookup 
directories.
2009-04-16 19:36:30 +00:00
9d8a104264 give focus back to the password field after the messagebox is closed 2009-04-16 18:17:33 +00:00
23ec87724e add the bandwidth page 2009-04-14 21:50:58 +00:00
9daf288da1 Fix starting the daemon in OS X 2009-04-14 20:40:29 +00:00
7fb5e546e8 partially working preferences window (ui wise) 2009-04-14 20:36:13 +00:00
2e4762a586 tidy up the login window code, extend Ext.Window instead.
focus the password field upon the login window being displayed
2009-04-14 20:09:48 +00:00
b71ac41ff1 Fix displaying IPv6 peers in the Peers tab 2009-04-13 18:02:49 +00:00
3c09d38504 Move some prints to log.info 2009-04-12 20:07:41 +00:00
ad2b771e5d Fix starting the webui with a logfile option 2009-04-12 19:59:54 +00:00
386ca2fa68 Fix #883 segfault if locale is not using UTF-8 encoding 2009-04-09 16:40:52 +00:00
67ee535d09 fix text colour when viewed in epiphany 2009-04-09 09:23:14 +00:00
85ad5314fe Make the autoadd update interval 5 seconds as intended 2009-04-09 00:10:05 +00:00
c28574502c fix page switching 2009-04-08 21:25:46 +00:00
8a51a5e978 make the close button close the window 2009-04-08 20:35:35 +00:00
62375c7109 implement page switching 2009-04-08 20:28:39 +00:00
e3171671f0 remove margins as this is a borderlayout config option 2009-04-08 20:24:50 +00:00
0c0d81e2c3 regenerate gettext.js
add a number of translation fixes
2009-04-08 09:02:26 +00:00
02d7fbd3ba add "Date Added" field 2009-04-08 09:01:37 +00:00
8c93241ef6 fix the line number 2009-04-08 09:01:09 +00:00
908760d3a9 add back the _ alias to the lambda unicode gettext function 2009-04-08 08:52:40 +00:00
c57900d4f6 fix rendering of templates when translations bring in utf-8 characters 2009-04-08 08:39:17 +00:00
030c5b51d4 update the "serving on" string 2009-04-08 08:37:41 +00:00
855385227a set gettext.js's charset to utf-8 in the content-type header
don't use NamedTemporaryFile for the Upload resource as the delete kw 
arg was only added in py2.6
2009-04-08 08:22:02 +00:00
891b1120a3 select first row in the onShow event 2009-04-07 22:07:27 +00:00
c93a3b4680 add the ability to load the ext-all-debug.js by specifying ?debug=true
in the url
2009-04-07 21:26:32 +00:00
4e0a4fabfb begin the preferences window 2009-04-07 20:25:49 +00:00
1c8ebc198a add an alias to Deluge.Formatters.plain 2009-04-07 19:54:40 +00:00
2631f09315 fix the sidebars margins whilst collapsed 2009-04-07 19:54:06 +00:00
b71c31cc46 add script to scan the javascript files for gettext calls and
autogenerate gettext.js
2009-04-07 17:54:57 +00:00
6fb66382cc remove all unused html files
render templates as unicode by default
2009-04-07 15:18:02 +00:00
f7b5b20c63 Show an error message if --config option is not a directory 2009-04-06 23:20:32 +00:00
5541164661 load the options panel form defaults 2009-04-06 21:47:55 +00:00
a9f26e0827 Update LICENSE in trunk too.. 2009-04-06 21:17:26 +00:00
434c69492a remove the border from the form 2009-04-06 20:31:46 +00:00
4ddc92f55d stop the scrollbar being displayed when "compact" is selected 2009-04-06 20:29:45 +00:00
5caeff733e tweak the dimensions to eliminate white space 2009-04-06 20:11:40 +00:00
485a1f3487 add buttons to the form 2009-04-06 20:04:54 +00:00
9885e530cb finalise the layout of the options tab in the add window 2009-04-06 19:46:30 +00:00
5c54aff46e reduce the height of the login window 2009-04-06 18:59:28 +00:00
0501537045 add a tracker renderer 2009-04-06 18:17:04 +00:00
1719ece036 fix the icons path 2009-04-06 18:03:43 +00:00
248eb7341c use the setup.cfg file to tag the build as -dev 2009-04-06 14:54:20 +00:00
5b8f9f29b8 Fix loading torrent files in Windows when the path is non-ascii 2009-04-05 23:10:41 +00:00
3c4b511e6b Fix displaying torrents with non-utf8 encodings in add torrent dialog 2009-04-05 18:31:43 +00:00
322dffa105 begin implementing the options panel logic 2009-04-04 13:02:26 +00:00
5acd9f3f21 actually commit ui.common this time 2009-04-04 11:32:34 +00:00
ca316750e8 tidy up imports 2009-04-04 11:31:07 +00:00
895f16b883 tweak the options form layout 2009-04-02 23:11:01 +00:00
4b8a267c57 fix the l.getSize error caused by the options tab 2009-04-02 22:55:47 +00:00
8ebb9af5fc add more to the options form 2009-04-02 21:50:34 +00:00
d6e9c2141e need to store the filename in the info dict that gets returned by the server 2009-04-02 20:59:15 +00:00
1f63e3de1a remove get_torrent_info from ui.common
add an "as_dict" method to TorrentInfo
utilise the TorrentInfo class rather than get_torrent_info
2009-04-02 20:55:46 +00:00
5162d5d7e2 begin to add the options form and also fix the binds on the got_torrent_info calls 2009-04-02 20:40:24 +00:00
00bfd1a442 disable add by info hash and create torrent buttons 2009-04-02 20:10:59 +00:00
3ce6f6bb88 fix displaying the "Browse..." button next to the file upload field 2009-04-02 20:03:10 +00:00
031ec92799 handle an invalid torrent file and show an error message box 2009-04-02 19:43:08 +00:00
b1c992da61 rename Deluge.Ui to Deluge.UI 2009-04-02 19:40:41 +00:00
b07715862f clear the files tree on add/cancel 2009-04-02 19:28:27 +00:00
a7ad189bd0 add adding a torrent via file upload 2009-04-02 19:26:32 +00:00
df6a905226 handle no file being uploaded cleanly 2009-04-02 18:57:41 +00:00
061c06a164 fix the file upload resource 2009-04-02 18:50:45 +00:00
793e120957 change it so the tracker error filter doesn't have an icon 2009-04-02 18:22:08 +00:00
03dac27147 tweak the options form layout, settings fixed column widths 2009-04-02 18:13:29 +00:00
221d1875ff fix the spacer image trying to be retrieved from extjs.com 2009-04-02 18:09:34 +00:00
7fb8fc40d7 fix the progressbar renderers and move the theme specific code from deluge.css to xtheme-slate.css 2009-04-02 15:02:33 +00:00
c99b4ddfea fix button text color in the gray theme 2009-04-02 15:01:40 +00:00
0cb662cde8 give some default values and limits to the spinners on the options tab 2009-04-02 11:01:10 +00:00
672a4debae fix the options tab form layout 2009-04-02 10:56:49 +00:00
c6deb9ec8b fix rendering the form on the options tab (this fix is a little hacky, might be worth looking at the ext or mootools adapter for a better fix 2009-04-02 10:24:55 +00:00
6897cd8b6b improve removing of torrents by adding a "torrentRemoved" event 2009-04-02 09:54:06 +00:00
71ef3f3ddc change the fileuploadbutton back to just a button, we'll open a new window, it'll be a cleaner solution 2009-04-02 09:37:21 +00:00
d3c6bfe91f fix clearing the tree in IE 2009-04-02 09:33:21 +00:00
29a9253108 fix the options tab layout in IE 2009-04-02 09:29:37 +00:00
929aa64b8c a few IE fixes 2009-04-02 09:10:30 +00:00
fdaf3d0810 remove vista theme as it was for ext 1.x and doesn't work with ext 2
add a stylesheet for the default theme that fixes the button text color when viewed in a browser with a dark theme
2009-04-02 08:20:38 +00:00
100f4c2e9f set the column values on a successful request instead of being lazy and just triggering an update 2009-04-02 07:15:16 +00:00
828a1d339a run some strings through gettext 2009-04-02 07:14:03 +00:00
1cd9f74305 fix favicon 2009-04-01 22:33:26 +00:00
54993784da change the seeders/peers in the status tab to match the torrent grid 2009-04-01 22:04:36 +00:00
b2ff696348 remove some debug alerts i left in 2009-04-01 22:00:40 +00:00
141d254f35 tweak the seeds and peers renderers to match the gtk ones 2009-04-01 21:53:41 +00:00
583d76ca18 change it so multiple files can be changed at a time 2009-04-01 21:51:04 +00:00
4087dd38cb implement setting the file priority via the context menu 2009-04-01 21:31:36 +00:00
8b76cd8a2a add a context menu for the files tree 2009-04-01 20:03:21 +00:00
63427a18cc extend the treenode to provide a method to allow for updating colum values 2009-04-01 19:36:27 +00:00
7462a5e1d8 increase the filename column wdith 2009-04-01 18:46:48 +00:00
0d5c30b5f9 add in the file priorities to the file tree on the details tab
add some icons for the priorities
2009-04-01 18:42:04 +00:00
baf3d283e0 add sorting of the files by filenames, and folders display at the top 2009-04-01 16:33:31 +00:00
de733b0fae begin the layout of the options tab form 2009-04-01 16:31:51 +00:00
9b107359a4 replace the "File" button with a fileuploadbutton 2009-03-31 01:16:17 +00:00
44188cf276 add removing a torrent from the dialog 2009-03-31 00:51:43 +00:00
e608db8ce2 add clearing the tree when the selection is changed 2009-03-31 00:41:05 +00:00
3bd13595be clear the url field after the torrent has been added 2009-03-31 00:33:56 +00:00
0e0bc735eb change the class so the correct icon is displayed 2009-03-31 00:32:03 +00:00
fe5fa703b3 increase the height of the files progress bar 2009-03-31 00:30:07 +00:00
7166cc01b5 add some doc strings and improve the __str__ method of the FileTree class 2009-03-31 00:28:33 +00:00
d0a083b1b1 remove the x-deluge-filters class from a filters panel since we can just use #sidebar 2009-03-31 00:20:16 +00:00
608826ce32 remove commented out class 2009-03-31 00:18:59 +00:00
e0cba5bca3 add a progress bar to the files 2009-03-31 00:17:32 +00:00
e903e14188 remove redundant folder 2009-03-31 00:06:36 +00:00
3d8085310e move all the icons
update the paths in the css/code
begin to use more iconCls rather than icon
2009-03-31 00:04:38 +00:00
a2640a8a32 fix it so the file icon is set using css rather than hard coded 2009-03-30 23:35:11 +00:00
a32b43b414 fix the file icon on files
fix clearing the tree when a different torrent is selected
2009-03-30 23:25:27 +00:00
0b9b261038 remove old classes 2009-03-30 23:24:51 +00:00
0bcb847a00 move the columntree stuff into deluge-ext 2009-03-30 23:24:08 +00:00
49e54e1789 remove obselete stylesheet 2009-03-30 23:19:02 +00:00
f9d24ea6e2 add another class 2009-03-30 22:50:00 +00:00
0c3d0befcd display the torrents files in the files tab 2009-03-30 22:25:16 +00:00
5e4ee41db2 Add the files_tree property to TorrentInfo 2009-03-30 22:15:13 +00:00
cab504c90e fix a typo in a doc string 2009-03-30 22:07:47 +00:00
38acdf7017 reduce to only what is required to achieve the selection 2009-03-30 21:58:21 +00:00
ac911d3ed7 add #sidebar to ensure it only occurs in the sidebar 2009-03-30 21:51:42 +00:00
3342394a37 make the selected item in the sidebar have bold text and rename the messagebox icon styles 2009-03-30 21:48:23 +00:00
63c67b6925 use the "checked" config option to add the checkbox to the tree
disable animation
remove the enabled column
2009-03-30 21:45:40 +00:00
cea7d5bc5b add an icon for files in a file tree 2009-03-30 21:39:40 +00:00
f0a25a3486 add support for displaying a checkbox in the tree 2009-03-30 21:38:39 +00:00
5c7d1e6576 use consts/vars rather than merely numbers 2009-03-30 21:37:16 +00:00
5c35712800 Check for invalid handle on tracker errors/warnings 2009-03-28 22:38:19 +00:00
0204ba426a Fix typo 2009-03-28 04:03:17 +00:00
42dce915df Add PreTorrentRemovedEvent event 2009-03-26 21:23:56 +00:00
8373377c10 Add daemon autoconnecting on startup 2009-03-25 18:01:16 +00:00
7c1d16a51c add a method to return a torrents files as a tree 2009-03-25 09:12:48 +00:00
96e8de6db5 render the checkbox correctly 2009-03-23 23:17:04 +00:00
5dc2809732 raise the exception since if we haven't been able to read the file there's not point in continuing 2009-03-23 23:16:12 +00:00
fe83a95041 correctly render the columns in the tree 2009-03-23 22:49:31 +00:00
2e1cc51f70 display the torrent files in the tree 2009-03-23 22:32:48 +00:00
9808302214 add a FileTree class for generating a file tree 2009-03-23 22:18:01 +00:00
3a558433b9 Fix plugin __init__'s and update create_plugin script 2009-03-23 21:03:43 +00:00
5c5bc9a713 fix __init__ to stop gtk being imported in the core 2009-03-23 20:58:21 +00:00
0ed166647d do a lazy import of gtk to stop the core trying to import it 2009-03-23 19:20:45 +00:00
bb4935ae02 add a notify method to Deluge.Ui 2009-03-23 01:10:57 +00:00
2193905fa6 implement disconnecting from a connected daemon 2009-03-22 23:52:34 +00:00
a0e9fafb8f begin an execute command upon event plugin 2009-03-22 23:37:21 +00:00
3f0a1eb896 use super instead 2009-03-22 23:36:45 +00:00
23bb565259 change width to auto so the details tab displays correctly 2009-03-22 21:03:24 +00:00
96ead0d996 Fix #855 force a resume on a torrent if a 'Force Recheck' is initiated 2009-03-21 18:45:47 +00:00
850807ca43 Fix udp trackers being classified as DHT source 2009-03-21 18:07:19 +00:00
c5cc5c283b add time_added and tracker_host to the torrent grid 2009-03-21 15:25:09 +00:00
b2f01c177f implement basic adding of torrents via url 2009-03-21 12:28:48 +00:00
856cd63421 move the clearing to the selectionchange event of the grid so it happens immediately 2009-03-21 12:02:18 +00:00
c143891c93 clear the details pane when there are no selected torrents in the grid 2009-03-21 11:53:05 +00:00
6adb10b62a increase status column size 2009-03-21 11:50:57 +00:00
6b7302ed4b fix clearing the sidebar so filters can be re-added after a reconnect 2009-03-21 11:49:43 +00:00
3f8ef6c66e fix adding hosts and clearing the form after changing password to _password 2009-03-21 11:21:05 +00:00
0e94c31ca2 turn the port field into a spinner 2009-03-21 11:15:17 +00:00
4179336c63 remove the psds from the ext themes 2009-03-21 10:57:38 +00:00
8464ae9152 tidy up the images folder 2009-03-21 10:34:19 +00:00
f9f2a55d93 implement a basic add connection window
implement remove connection
2009-03-20 22:36:58 +00:00
504f2470ba fix clearing panels on a log out 2009-03-20 20:46:36 +00:00
d5b7616f98 if the client on the server is already connected skip the connection manager 2009-03-20 19:20:07 +00:00
0f44b06197 rename the messagebox classes as they are clashing with the state ones 2009-03-20 19:08:40 +00:00
a97fbbc1ef fix status when a host is connected 2009-03-20 19:00:11 +00:00
2b96aa990e Fix showing connected status in connection manager 2009-03-20 18:55:54 +00:00
9ca7634ec9 make the stop daemon button actually stop the daemon 2009-03-20 18:26:47 +00:00
73d0023ef5 add styles for messagebox icons
fix the style for the login box
2009-03-20 18:25:23 +00:00
bccb7ca66e select a row if there is no row selected when contextmenu is clicked 2009-03-20 17:26:24 +00:00
4852188ce9 change "Sidebar" to "Filters" for the panel title 2009-03-20 17:22:43 +00:00
4c83745295 change the cursor to a pointer when over the filters
add in generating the filters dict and applying it to the update_ui call
2009-03-20 17:15:46 +00:00
89e7198e21 add a logging statement to update_ui 2009-03-20 17:14:28 +00:00
a08a4a4e69 implement updating the filters 2009-03-20 09:22:57 +00:00
846d8a0c8f use the universal classes for states 2009-03-20 08:57:36 +00:00
575efe1495 make the tracker host error filter have an icon 2009-03-20 08:03:54 +00:00
c46c56e784 improve the sidebar to ensure that the icons display correctly 2009-03-20 07:59:39 +00:00
cb1beab159 add a proper renderer for the filters 2009-03-20 00:11:14 +00:00
7fb9af5c3d add a basic implementation of the sidebar 2009-03-19 23:00:07 +00:00
f3fd90253e add a favicon 2009-03-19 22:40:26 +00:00
1229e9a46c add color to input boxes so text is visible whilst using a dark browser theme 2009-03-19 22:29:24 +00:00
f909c2409f begin implementation of the SideBar 2009-03-17 10:33:51 +00:00
5512606f8a remove the now redundant calls 2009-03-17 09:16:35 +00:00
fc68ec2929 add the improvements to the export deco 2009-03-17 01:09:23 +00:00
11e42db767 partially implement adding torrents via url 2009-03-17 01:03:38 +00:00
233ed89318 fix get_torrent_info 2009-03-17 01:03:09 +00:00
306961ed75 fix download_torrent_from_url 2009-03-17 00:45:43 +00:00
7b1fc47f99 tweak the size of the details pane 2009-03-17 00:07:34 +00:00
b00b942fee add the comment field to the Details tab 2009-03-17 00:03:15 +00:00
da318ba450 add more events 2009-03-16 23:57:08 +00:00
bbb9ab69b3 tie up some of the torrent menu events 2009-03-16 23:42:28 +00:00
95ac4397a3 display the torrents menu on the rowcontextmenu event 2009-03-16 22:23:56 +00:00
61d028a8ce add the classes for the menu and 2 more icons 2009-03-16 22:13:25 +00:00
d9d5d2b308 remove all remaining oxygen icons
add the additional required icons from fugue
add the torrents context menu
2009-03-16 17:07:13 +00:00
399f8b3f6f change ajax to web 2009-03-16 15:54:48 +00:00
467afb5d63 slight tweak to the get_hosts method 2009-03-16 15:51:51 +00:00
87b789e3a1 make the gettext javascript render in unicode 2009-03-16 15:34:43 +00:00
db853c7c56 improve the export decorator slightly to allow for it to be used without
being called.
2009-03-16 13:30:55 +00:00
c0f11fbae4 Fix #842 some exceptions when disconnecting/reconnecting to daemon 2009-03-16 00:46:51 +00:00
b0e368c9ab Fix issue where core_config would become {} when adding multiple
torrents externally at once
2009-03-16 00:29:49 +00:00
930c479718 Remove the plugin hooks from the Core.. These are replaced by Events 2009-03-15 20:29:51 +00:00
7533c4bb88 Fix #841 maximum upload slots tooltip 2009-03-15 18:38:08 +00:00
f746b79c99 Remove toolbar's update_buttons method 2009-03-15 18:03:55 +00:00
a0db11f0b8 Add preferences option "Add torrent in paused state" 2009-03-15 17:59:27 +00:00
9814cad0b9 Fix tracker error filtering 2009-03-15 02:09:32 +00:00
f5db9d3534 Add 'Comments' field to the Details tab 2009-03-15 01:35:20 +00:00
f787e013ee Add an Error filter to the Trackers filter list 2009-03-15 00:59:29 +00:00
1c2b06a4f7 Update deps to include xdg-utils 2009-03-15 00:38:08 +00:00
c9bd55b819 Don't always log to file in Windows 2009-03-14 23:34:49 +00:00
86d52ba2e1 Use binary mode on all config files for Windows compat 2009-03-12 21:43:17 +00:00
d63c187dcf Fix loading config files on Windows 2009-03-12 21:33:43 +00:00
01350e0060 add a custom sorter for the address column 2009-03-12 19:04:04 +00:00
0ac64da5c6 move the json resource into its own module
split the json-rpc methods and the rpc server into seperate classes
make the json-rpc server a component to allow for extension
2009-03-12 18:57:35 +00:00
344446a626 Do not return when unable to make a backup of the config file 2009-03-09 16:43:28 +00:00
27298ba8d8 Update About dialog 2009-03-08 21:06:17 +00:00
3cab036b70 Make sure config files, resume data and state are fsync'd when saved. This should help prevent data
losses on crashes/improper shutdowns.
2009-03-08 20:27:58 +00:00
8f4583bc23 Fix #790 tracker hosts not correct for some .uk trackers 2009-03-08 20:19:19 +00:00
849b579316 Label: Fix setting 'Move on completed' folder when connected to a remote daemon 2009-03-08 20:14:42 +00:00
3072fc48da Make sure resume files are fsync'd 2009-03-08 02:35:58 +00:00
9a4bbb771e Make a backup of config files before overwriting and make sure the file is fsync'd without error 2009-03-08 02:33:12 +00:00
e12faf5641 improve the error reporting when a ui fails to load 2009-03-07 17:27:04 +00:00
eaf8183397 Fix up error message when unable to import a UI 2009-03-07 16:55:45 +00:00
8fda4d1fde rework the DelugeWeb class so it's completely self contained 2009-03-07 12:42:09 +00:00
8e62f5b3a8 change default hosts to a list as we'll probably be using it in the connection manager which needs to extend it 2009-03-06 21:30:20 +00:00
3ac9085a73 remove test html file 2009-03-06 20:39:44 +00:00
f524d8e63d edit the web package_data stuff 2009-03-06 20:26:17 +00:00
fe002092bf apply Ghents patch to allow for specifying your deluge config dir whilst
creating a plugin
2009-03-06 17:18:48 +00:00
52b2f334dd update webui entry in the changelog 2009-03-06 15:22:12 +00:00
71ac5884dc attach to signals, make DelugeWeb and JSON components
make the server print out its pid and url like paster does
2009-03-06 15:15:53 +00:00
fe6f045be1 remove old webui 2009-03-06 15:01:05 +00:00
d4bc535027 Remove ssl exception from license header when creating plugins from the
script
2009-03-05 23:57:48 +00:00
204f6ee89e Fix IPCInterface on Windows 2009-03-04 02:08:52 +00:00
80fdc3356c allow the client to figure out the auth for a local connection 2009-03-03 19:05:23 +00:00
8d863f2e3c Fix showing Preferences dialog in Windows 2009-03-02 01:46:22 +00:00
237e44d73f Update ChangeLogs 2009-02-28 22:22:49 +00:00
eb05a47d6a Only emit the TorrentFinished event when the torrent hasn't been previously finished.. e.g. after a force recheck 2009-02-28 22:07:49 +00:00
1375d4f545 Fix torrentmanagers update interval to 5 seconds 2009-02-28 21:59:49 +00:00
b6fe5166a8 Catch exception when removing a checking torrent 2009-02-28 21:05:49 +00:00
60a78c52e2 Do not attempt to pause/remove a checking torrent due to stop at share ratio rules 2009-02-28 21:01:28 +00:00
f6c26d6690 Remove timer in pluginmanager since update calls will be handled by
component now
2009-02-28 17:20:49 +00:00
4eb175ae9c Force str for proxy settings 2009-02-28 17:17:40 +00:00
7a6be9df1e Fix #817 email notifications fail to substitute format strings 2009-02-28 02:18:12 +00:00
e287e3ec33 Fix #655 issue where default torrent options wouldn't be set for new
torrents added to the addtorrentdialog
2009-02-28 01:48:41 +00:00
51ddc35140 Fix displaying file errors when the torrent isn't paused 2009-02-27 21:38:30 +00:00
3f03cb967a Get Label plugin working in the GtkUI 2009-02-27 17:12:53 +00:00
faef89870b Fix preferences window from not closing properly on OK 2009-02-26 20:52:08 +00:00
addaefaf7b Force SSL3 connection 2009-02-26 15:16:36 +00:00
d9f2daa778 Fix classic mode 2009-02-26 05:24:36 +00:00
cb78682415 Fix showing the preferences dialog when not connected to a daemon 2009-02-26 03:42:14 +00:00
f61e86d7b3 Add EventManager to the Core 2009-02-26 03:10:11 +00:00
7d1392ffe5 Clean up some debug statements.
Fix adding torrents from arguments on initial load.
2009-02-26 01:50:30 +00:00
7b682f4f60 Implement new IPC system. There is no longer a dependency on DBUS and this system should work on
all platforms.
2009-02-26 01:47:40 +00:00
72ce4eede7 add the deluge icon to the main title bar 2009-02-25 17:34:59 +00:00
34c91448cd add the columntreeview to the files tab 2009-02-25 17:07:41 +00:00
3de1da44a0 add seperate icons for adding by file, url and magnet
change the add/remove icons to simple plus/minus
remove all 32x32 icons
2009-02-25 16:51:38 +00:00
7459210753 add a fuller layout to the add torrent window 2009-02-25 16:41:13 +00:00
bb4a5f4404 remove unnecessary css class 2009-02-25 15:52:16 +00:00
2fa4c4187a fix the speed renderers so they closer match the gtk grid 2009-02-25 15:16:05 +00:00
0d1fe3370a modify speed modifiers to be the same as the ones in common.py 2009-02-25 15:13:38 +00:00
1566091dd9 add an icon to the connection manager window 2009-02-24 21:06:16 +00:00
22e3b34221 improve the progress bars a little and add a stub for the torrent add window 2009-02-24 20:20:49 +00:00
9b05ec8b5f Get blocklist plugin working 2009-02-24 01:03:02 +00:00
fa77f8403a Fix get_resource 2009-02-24 01:02:28 +00:00
4a6ecde07b Update create_plugin.py script 2009-02-24 00:00:35 +00:00
703e9def05 Change some plugin stuff and add an example plugin 2009-02-23 23:54:06 +00:00
8025889598 Fix building plugins when python isn't in the PATH 2009-02-23 11:25:07 +00:00
9ed0a80679 Catch exceptions while loading the geoip db 2009-02-23 10:22:55 +00:00
7e7944a085 Fix "quit and shutdown daemon" option 2009-02-21 14:03:28 +00:00
0e47cfd49e add a toolbar to the bottom of the connections grid 2009-02-21 13:20:30 +00:00
604ddc092e fix exception if no country is specified 2009-02-21 10:44:20 +00:00
dadb74477e Fix the allocate mode not being preserved when selecting different
torrents in addtorrentdialog
2009-02-21 10:42:59 +00:00
9ec3c9ec91 remove redundant templates folder 2009-02-21 10:40:57 +00:00
5cf1fa9d00 move extended ext classes into their own file 2009-02-21 10:39:47 +00:00
c05def0cf9 Add new installer bmps 2009-02-21 10:11:04 +00:00
ee028f2a52 attach to the "logout" event in the connectionmanager in onRender instead of onShow
fix clearing the torrent grid on logout
2009-02-21 04:35:11 +00:00
0f0c0cef9b report in the peers table whether the peer is a peer or a seed 2009-02-21 04:29:04 +00:00
8280d029aa add progressbar to peers tab and fix adding data to the store 2009-02-21 04:16:08 +00:00
28bbd0cc62 clear all the tabs (that have data) when the client disconnects 2009-02-21 04:04:05 +00:00
4eb70ec484 editing wrong class 2009-02-21 03:46:05 +00:00
72690f5328 remove pointless regex stuff 2009-02-21 03:43:58 +00:00
ce2e089d63 add a progress bar to the torrent grid 2009-02-21 03:42:40 +00:00
8c0ba82e0a add stub for a FilesTreeLoader 2009-02-21 02:57:22 +00:00
1f6ea321b7 make the countries column sortable and tweak the store 2009-02-21 02:41:22 +00:00
4659cf2438 fix speed renderer
alias fspeed, fsize and ftime to the corresponding formatters
improve the peers grid (flags, fixed renders etc.)
2009-02-21 02:31:56 +00:00
26addfd63c add a resource for the country flags 2009-02-21 02:30:58 +00:00
c212bc35e9 add stubs for the files and peers tab 2009-02-21 02:06:46 +00:00
66495f4b06 fix displaying the hash in the details tab 2009-02-21 01:25:26 +00:00
8f0766bfe5 update stats on the details tab and add updating when the tab is changed 2009-02-21 01:23:17 +00:00
372d138a77 add copyright headers after remembering andars death threat 2009-02-21 00:15:48 +00:00
4e5e98d90b add a helper methods to torrents
trigger an update immediately when the torrent is changed in the grid
2009-02-20 23:58:18 +00:00
a9fb98c23a substantially improve the fire method of events, allowing unlimited event args to be passed in now. 2009-02-20 22:59:56 +00:00
7279755f24 add a subclass of Ext.ProgressBar that allows for a percentage value to be used 2009-02-20 22:19:59 +00:00
13343a6b4b don't have any text in the statusbar on creation 2009-02-20 21:58:38 +00:00
3cfeb8a2ef rename tab_statistics to tab_status
update status when a torrent is selected in the grid
tweak status css
2009-02-20 21:57:31 +00:00
4f9e627131 rename getSelection to getSelections 2009-02-20 21:55:51 +00:00
cf2842b623 fix to work with new deluge-torrents layout 2009-02-20 21:55:34 +00:00
8d1a49f11c improve the layout of the deluge-torrents module
delegate updating stats to the individual tabs in the details panel
2009-02-20 20:09:29 +00:00
7c3c1fb767 return if there is no connection selected 2009-02-20 20:04:12 +00:00
d542666f20 Fix some deprecation warnings and imports 2009-02-20 14:32:28 +00:00
2399850e4e Wikified (trunk) changelog 2009-02-20 11:35:17 +00:00
566c6adf3a remove a bunch of the oxygen icons
add a titlebar icon to the login window
2009-02-19 21:50:30 +00:00
376b0daa11 tidy up toolbar event handlers
add a client connection check and act accordingly when its disconnected
2009-02-19 21:36:35 +00:00
eae92d78eb move updating the statusbar into the deluge-bars module
show/hide the additional statusbar info when connected/disconnected
2009-02-19 21:07:14 +00:00
fda01f59a7 fix Deluge.Events.fire 2009-02-19 20:46:08 +00:00
faae99d3d8 improve the statusbar, default to "Not Connected" with an icon 2009-02-19 20:38:06 +00:00
b9d84be341 clear the torrent grid when stopping the ui 2009-02-19 20:12:13 +00:00
815d8aa39f handle the logout button being pressed 2009-02-19 20:10:57 +00:00
2669ade501 add login event and enable the logout button once logged in 2009-02-19 19:22:51 +00:00
5153ad6f78 move over to central event holder 2009-02-19 18:59:14 +00:00
b4cc833044 add help and logout buttons to the toolbar
improve the enabled/disabling of buttons on connect/disconnect
2009-02-19 18:42:19 +00:00
0e78b9c3b1 add help icon 2009-02-19 18:32:03 +00:00
238c9d722d add logout icon 2009-02-19 18:30:15 +00:00
b3d4fd6620 Fix external property for src/ 2009-02-19 11:30:51 +00:00
45b4bc8e28 tidy up including python bindings 2009-02-19 11:23:37 +00:00
17e7ddf66f fix svn:externals properties 2009-02-19 11:17:20 +00:00
b397f99b21 tidy up libtorrent linking to only what we require and also include asio again 2009-02-19 11:03:45 +00:00
8899a683ab set svn:externals property on trunk to grab LT from their svn 2009-02-19 10:07:23 +00:00
7ca5ad1b93 remove LT from trunk 2009-02-19 10:04:27 +00:00
70a810b531 do safe simplejson import in common and use this imported copy in the 2
other places where its used.
2009-02-19 09:39:18 +00:00
8c2b735a8b Fix saving file priorities when switching torrents in the
addtorrentdialog
2009-02-19 06:03:11 +00:00
8ca8c5de05 move torrentAction to onTorrentAction 2009-02-19 02:21:13 +00:00
ea4f734863 move over to a more event driven style 2009-02-19 02:14:35 +00:00
9e19ae79c8 prepare for allowing parts of the ui to subscribe to connect/disconnect events 2009-02-19 01:22:32 +00:00
7344d0b1a3 remove not needed initialize call 2009-02-19 01:21:15 +00:00
6adada01e4 rearrange the details module to make it more managable 2009-02-19 01:12:58 +00:00
4b711883cb Do not set sys.stdout,err and stdin to None if logfile is used 2009-02-19 00:52:04 +00:00
7fb09d922a don't return the username and password for the daemon 2009-02-18 23:40:24 +00:00
d9e67bcebe lt sync 3273 2009-02-18 06:15:15 +00:00
cc272d8dc0 enable the disabled toolbar buttons once the ui connects 2009-02-17 00:04:46 +00:00
1ff29a134c more improvements to the connection manager, ui actually starts running after a connect now. 2009-02-16 23:27:12 +00:00
b6dee74dd5 update to allow for passing in a methods list when initialising 2009-02-16 23:22:36 +00:00
911d95815f Fix hiding bottom pane when no tabs are enabled upon restart 2009-02-16 02:40:50 +00:00
9907909b58 make the connection manager poll 2009-02-16 01:06:08 +00:00
e99dd03dcc more progress on the connection manager 2009-02-16 00:46:16 +00:00
5bd5db4f16 Blocklist now displays a tick when up to date 2009-02-14 03:26:33 +00:00
b73e26344c lt sync 3259 2009-02-13 17:41:09 +00:00
847ad95fd3 begin connection manager 2009-02-13 08:25:55 +00:00
356af2ba0a changed incorrect password window title to "Login Failed" 2009-02-13 07:44:07 +00:00
c7d3275561 forgot to put that it was CC3 2009-02-12 18:58:39 +00:00
49e705af14 remove last remaining silk icon
update license
2009-02-12 18:58:11 +00:00
d6d926d94f replace some of the silk icons with icons from the fugue set 2009-02-12 18:47:17 +00:00
18f7736a22 default most toolbar buttons to being disabled 2009-02-12 00:20:13 +00:00
345b28935f make enter check the password 2009-02-12 00:14:59 +00:00
d0020344f1 improve failed attempt reporting 2009-02-12 00:01:59 +00:00
0b3a04dc6c add a basic login system 2009-02-11 23:55:59 +00:00
7842ad5d3d lt sync 3253 - fix ssl trackers 2009-02-11 15:27:19 +00:00
f521795552 Update README to include current deps 2009-02-11 00:55:30 +00:00
6c00dc5db1 use config manager and add a login method 2009-02-11 00:48:14 +00:00
1d61bb3e94 Revert last change. Hiding the exception isn't a good idea and the error shouldn't be OS-specific. 2009-02-11 00:40:22 +00:00
ee05e18a9a show easy to understand error message on twisted importerror for the not so bright #796 2009-02-11 00:26:25 +00:00
06bb660a10 make the new twisted webui runnable via deluge -u web 2009-02-11 00:17:31 +00:00
ef5790fefe rename webui to server 2009-02-10 22:59:32 +00:00
c720417cb4 change config file format from pickle to json 2009-02-10 22:43:35 +00:00
17ea87be2e conf downgrade script 2009-02-10 22:30:45 +00:00
032b0fa934 remove pointless divs in the html 2009-02-10 12:56:48 +00:00
74d2657750 add doctype and xmlns 2009-02-10 12:52:00 +00:00
b8a8a37571 Append a new line when initially creating auth file 2009-02-10 09:10:14 +00:00
be68515fdc Have the client module automatically try to get the localhost creds in connect() 2009-02-10 08:40:05 +00:00
9175ac16fd Fix issue when a client connection is lost that has been authenticated 2009-02-10 08:35:41 +00:00
8bcc7ea232 lt sync 3243 2009-02-09 23:23:26 +00:00
db23f6a723 Fix missing import 2009-02-09 02:59:24 +00:00
8df39bbcef lt sync 3240 + patch 2009-02-09 00:46:23 +00:00
1394c52a80 Print out the data when a bad message is received 2009-02-09 00:43:11 +00:00
8ee7bf9983 Rename RPC_SIGNAL to RPC_EVENT and fix receiving multiple events 2009-02-08 23:25:57 +00:00
e96b4c4f58 switch over to using twisted-web 2009-02-08 16:56:56 +00:00
ea734931d7 lt sync 3236 2009-02-08 00:08:15 +00:00
44d2fd1f1f lt sync 3232 and patch segfault on start 2009-02-07 00:59:56 +00:00
89b5ca1cfe Fix #790 tracker hosts not correct for some 3rd-level domain names 2009-02-06 09:01:11 +00:00
7cfc54728f Fix queue manipulation 2009-02-06 09:00:20 +00:00
ea5bb29ab5 Fix displaying errors when a torrent is Checking 2009-02-06 07:13:56 +00:00
e2f707f0d7 update setuptools info and up version to one that actually works 2009-02-06 00:25:56 +00:00
85f34614dc fix the queue cell renderer 2009-02-05 22:30:00 +00:00
76f35aee85 A better fix for the preferences dialog 2009-02-05 09:06:48 +00:00
f942d4ee43 Fix preferences window 2009-02-05 08:36:59 +00:00
1003374bb4 Update license on metafile.py to GPL3 2009-02-05 04:46:38 +00:00
d7caea5c31 Change system tray tooltip on disconnect from daemon 2009-02-05 00:01:42 +00:00
cd493c0f08 add the new twisted/ext webui to svn 2009-02-04 18:20:46 +00:00
e861e660a5 Fix queue order changing 2009-02-04 14:55:51 +00:00
b18d9cfed4 Fix issue that could happen when the deferreds created in the connection
manager fire after the dialog has been closed
2009-02-04 06:41:19 +00:00
5ad7c60b65 Remove signalmanager 2009-02-04 06:27:40 +00:00
75efde8439 Fix filtering on trackers 2009-02-04 06:17:09 +00:00
9b0306d5b5 Clean up some stuff when clients disconnect 2009-02-04 03:00:55 +00:00
5fc4948ad2 Fix some issues with event handling on the client side and how arguments are handled in
DelugeEvents
2009-02-04 02:48:50 +00:00
3b6bee1508 Fix up config module to use twisted loop instead of gobject 2009-02-04 02:47:02 +00:00
523d494991 lt sync 3228 2009-02-03 21:58:29 +00:00
e0735cf5ca Only attempt stopping PluginManagers looping call if it's running. 2009-02-03 06:39:33 +00:00
a24738a9ff Implement Events (formerly Signals) which are emitted from the daemon to interested clients. 2009-02-03 04:13:41 +00:00
aa89c653f9 Remove xmlrpc related files 2009-02-02 10:39:33 +00:00
c374e99cdd Fix logging exceptions in the daemon 2009-02-02 02:08:59 +00:00
fe98e1c11e Fix typo 2009-02-02 01:52:15 +00:00
1462795480 Update and fix-up the man pages 2009-02-02 00:20:25 +00:00
ab4fec5573 Fix issue when initializing gettext that would prevent deluge from starting 2009-02-01 22:18:39 +00:00
c399f7c9b3 Move the list_methods rpc to the daemon object and rename it to 'get_method_list' 2009-02-01 20:39:07 +00:00
27cf34f85b trunk lang sync 2009-01-31 21:16:38 +00:00
27937e21dd import stat as it's used in generating ssl keys 2009-01-30 19:26:43 +00:00
c6439e5a22 add a list_methods method so a javascript json-client can be built for
the webui
2009-01-30 14:09:22 +00:00
b3b856bcca Fix double-clicking on host entry to connect 2009-01-30 03:07:22 +00:00
d6fd69eba8 Fix adding torrents 2009-01-29 01:42:48 +00:00
887ef8d7ca Fix component depend on CorePluginManager 2009-01-29 01:19:26 +00:00
6a0594b47d Rename the daemons PluginManager component to CorePluginManager to not
conflict with the gtkui in Classic mode.
2009-01-28 23:10:44 +00:00
e9f8c7b0e8 Get Classic mode working somewhat. There are still some issues to
resolve with it.
2009-01-28 17:59:27 +00:00
9f369388e6 lt sync 3225 2009-01-28 16:19:36 +00:00
44ffcd4499 Automatically get localclient credentials if attempting to connect to a
localhost
2009-01-28 02:31:51 +00:00
464073e596 Update the list 2 seconds after starting the daemon 2009-01-28 01:36:46 +00:00
01fbda7c9e minor connectionmanager fixes on adding hsot 2009-01-28 01:14:29 +00:00
4d2c6881f8 Fix saving hostlist on host remove 2009-01-28 00:57:45 +00:00
6cd05fbbc9 Remove default user/pass from hostlist 2009-01-28 00:52:18 +00:00
089f0afa32 Fix license headers
Remove ui/webui/ssl from package_data since it doesn't exist
2009-01-28 00:36:33 +00:00
865921a677 Fix issue when using 'Active' state 2009-01-28 00:03:14 +00:00
47bb52f72a Remove pythonize module since it's no longer used 2009-01-27 23:44:26 +00:00
eda19c3d60 Update copyright years in aboutdialog 2009-01-27 23:34:03 +00:00
8f12919013 Fix saving files/peers tab state when no column is sorted 2009-01-27 21:45:44 +00:00
b681ca8909 Fix typo 2009-01-27 21:41:48 +00:00
08ea99c233 Fix #761 use proper theme colours in sidebar 2009-01-27 21:21:15 +00:00
3632409b29 Fix import 2009-01-27 20:48:29 +00:00
45669ca703 lt sync 3219 2009-01-27 19:24:07 +00:00
bf4dae61d2 lt sync 3218 2009-01-27 17:27:23 +00:00
42588656fd Implement new DelugeRPC method to replace XMLRPC.
This commit breaks _a lot_ of things including the web and console UIs, please do not expect 
anything to work.
2009-01-27 08:03:39 +00:00
ce1b7b491d Fix up some copyright headers 2009-01-27 00:21:53 +00:00
657ec0756a Remove 'state_upgrade.py' script since this functionality is included in Deluge now. 2009-01-27 00:17:43 +00:00
d727a515b7 Updated for new year 2009-01-26 05:06:08 +00:00
20751de699 ltsync 3211 2009-01-25 02:51:01 +00:00
24e526ce93 Revert unintended change 2009-01-25 02:17:15 +00:00
5697376caa lt sync 3209 2009-01-25 02:10:39 +00:00
082dea9b80 Update python bindings from libtorrent svn 2009-01-24 05:31:45 +00:00
d9ab0ec0ca Fix setting outgoing ports 2009-01-24 05:25:37 +00:00
9df4c84295 lt sync 3205 2009-01-24 04:12:32 +00:00
05141c6f2c Fix when sorting # column, downloads should be on top 2009-01-23 05:25:31 +00:00
7167c0ecca Fix setting file priorities when adding a torrent 2009-01-22 08:22:50 +00:00
71aebaffdf Fix being able to select/deselect files in the add torrent dialog 2009-01-22 06:01:34 +00:00
85b1a86669 Fix setting Peer TOS byte 2009-01-21 14:03:26 +00:00
72601aebf4 Fixed blocklist web ui 2009-01-21 03:56:38 +00:00
3b9b47011c Fixed regression where blocklist no longer checked for update on startup 2009-01-20 13:46:13 +00:00
2403d13ceb Fix torrents not displaying properly after disconnecting and
reconnecting to the daemon
2009-01-20 11:45:43 +00:00
2368a82b13 Fixed regression where blocklist would import empty list 2009-01-20 07:14:25 +00:00
2ea8ca1000 No longer checks for newer blocklist on startup 2009-01-19 10:46:24 +00:00
7c6319b1db Fixed bug where blocklist was reset when not imported
Date is now of remote blocklist (makes checking more precise)
Fixed web ui from crashing (still doesn't work though)
2009-01-19 10:14:33 +00:00
a6de74c858 Blocklist is no longer imported if up to date 2009-01-19 08:12:31 +00:00
1ec3751f91 need_new_blocklist is no longer blocking
removed download arg from import_list
updated gtkui and webui
2009-01-19 07:56:49 +00:00
813063bd12 need_new_blocklist now checks if remote blockist is newer/bigger 2009-01-19 06:02:58 +00:00
58361f4af2 Default to ERROR logging level if the supplied logging level is invalid 2009-01-18 06:24:49 +00:00
40ba6ea2ba lt sync 3187 2009-01-17 22:03:36 +00:00
7c349b1fa9 Fix translating speed units in status tab when a per-torrent limit is
set
2009-01-17 22:02:38 +00:00
a69efdfc56 Fix crashing in AddTorrentDialog when removing torrents from the list
Do not allow duplicate torrents in the AddTorrentDialog
2009-01-17 21:58:02 +00:00
32be4ed4ad Fix being able to connect to a local daemon from another user account 2009-01-16 20:11:05 +00:00
0fa9b491c5 add tooltip to popup about windows 2009-01-16 04:47:44 +00:00
a76550be68 make popup insensitive on windows 2009-01-16 03:41:13 +00:00
8f68fc9e07 Add support for more tracker icons 2009-01-16 03:31:21 +00:00
ebc24e35dd Fix #729 tracker icons not being saved in the correct location 2009-01-16 03:18:43 +00:00
8e5473a91d Fix saving Files tab and Peers tab state 2009-01-16 03:13:37 +00:00
5cef7fe9fc Fix remembering sorted column in the torrent list 2009-01-16 03:01:41 +00:00
2acd470626 Fix opening links from Help menu and others 2009-01-16 02:45:36 +00:00
f16ff06083 Fix the -l, --logfile option 2009-01-16 00:35:07 +00:00
f990fd1a9a Fix [4491] which broke the oldstateupgrade 2009-01-14 02:45:11 +00:00
e42910dbf8 Fix bdecoding some torrent files 2009-01-14 01:15:00 +00:00
c94a13ae17 windows updates to switch to boost 1.37 and python 2.6 2009-01-12 23:30:33 +00:00
855315dfb1 Update bencode.py from BitTorrent-5.2.2. This changes the license to
Python Software Foundation License Version 2.3.
2009-01-12 22:44:27 +00:00
8a6461bef8 Append a new line to the localclient entry 2009-01-12 19:55:57 +00:00
e681c9183e fix get_torrent_status to use filter dictionary 2009-01-11 00:05:50 +00:00
ea3b79bdd5 lt sync 3143 2009-01-10 21:25:43 +00:00
1cd3998350 lang sync 2009-01-10 18:50:44 +00:00
9cbe63c299 update credits for 1.x 2009-01-10 07:37:53 +00:00
9f7018bdfb added copyright info 2009-01-09 23:44:42 +00:00
9ee7562268 fix debian bug #510948 missing dep 2009-01-09 20:00:17 +00:00
ff42ebe0b2 Set 'max_half_open_connections' default to 50 on non-Windows systems 2009-01-09 04:21:26 +00:00
3e92ff026a Tell the user which UI was tried when unable to start 2009-01-08 22:25:46 +00:00
43be3e3e64 Added '-s', '--set-default-ui' option to deluge 2009-01-08 20:27:24 +00:00
b9ae2cb2b9 Update credits and author list 2009-01-08 03:35:22 +00:00
0bd50f9b08 Fix installing 2009-01-08 02:31:01 +00:00
366b5e1f95 add mime icons to the white theme
couple of stubs in the add window
2009-01-07 21:12:05 +00:00
c406ab4eaf add mime images to setup.py 2009-01-07 21:01:38 +00:00
bb8acea3df add mime icons to trunk 2009-01-07 20:51:41 +00:00
c59d0e348e improve the files table in the add torrent window
add some mimetype support in

improve the merge_changes.py script
2009-01-07 20:42:57 +00:00
52485af4f7 Allow torrents to be removed from the add torrent window 2009-01-07 19:06:28 +00:00
c48707a654 more improvements to the options tab 2009-01-07 18:13:05 +00:00
ed03ea52db template update 2009-01-07 03:55:21 +00:00
ad2fc421dc fix gtk-cancel translation setting in remove dialog 2009-01-07 03:41:52 +00:00
69e5fe1d3d add stub for filepicker to trunk
start implementing the options dialog
add another not implemented alert to edit trackers
update changelog
2009-01-07 01:28:19 +00:00
08855ef9d7 merge in change 2009-01-07 01:01:10 +00:00
b10416b8f8 merge webui fixes 2009-01-07 00:48:38 +00:00
2af3869143 Fix issue in get_tracker_host when the torrent has no tracker 2009-01-06 12:50:49 +00:00
3584fa9e41 fix crash on trying to convert *very* old 0.5 config files 2009-01-06 02:42:08 +00:00
cf40455d1c fix notification bug on startup for already finished torrents 2009-01-06 02:27:27 +00:00
89800dd6c1 sort for managibility 2009-01-06 01:43:41 +00:00
373dd2c695 Fix the display of the tracker host when it's an IP address and not a
hostname
2009-01-05 10:14:12 +00:00
7f1a7ea863 Show the Trackers sidebar filter by default 2009-01-04 08:53:06 +00:00
d850b71561 lt sync 3129 2009-01-04 08:48:46 +00:00
5c839a6b20 Fix seeding torrents from moving around when sorting the '#' column 2009-01-04 08:47:26 +00:00
dc17647590 Fix applying proxy settings 2009-01-02 21:25:26 +00:00
76a17a4028 Label: Fix move on completed 2009-01-02 03:25:39 +00:00
83ecface7a Fix folder renaming to display the change properly 2009-01-02 00:56:44 +00:00
388b21d6eb fix depreciation warning in py2.6 2009-01-01 18:28:33 +00:00
f97273e094 Change how the alert name is found to use the class's __name__ property 2008-12-31 02:47:17 +00:00
4471d70d6c Hide the initial test port image 2008-12-30 23:32:39 +00:00
98f0b875ba Fix exception in test open port 2008-12-30 23:28:30 +00:00
c61a6eb34b Add PeerGuardian Text (Gzip) reader 2008-12-30 03:52:18 +00:00
48f445d9a0 Apply blocklist prefs when the buttons are pressed. 2008-12-30 03:51:13 +00:00
a1a82c96a5 Do not continue to show 'Importing 0' progress bar if blocklist fails to
import.
2008-12-30 02:57:21 +00:00
bb4e7e38ae Fix gtkwarning regarding column width 2008-12-29 17:10:11 +00:00
e415829a68 lt sync 3106 2008-12-29 16:58:56 +00:00
daa045a425 going back to vs71 2008-12-29 03:43:50 +00:00
e315d40ddf Change default blocklist url to nipfilter instead of pipfilter 2008-12-28 23:15:01 +00:00
368f94157f Fix issue that prevented torrents from being added 2008-12-28 15:38:28 +00:00
2fb3f4b534 Fix #673 do proper test to determine if remote method requires callback 2008-12-28 04:39:08 +00:00
d00366204e Fix exception in metafile 2008-12-28 04:29:54 +00:00
6359c5d4af Do not use the stored config_location value because it should only be used if the --config option is
set.
2008-12-27 21:24:50 +00:00
e1c5f69d54 Fix exception in label plugin when saving preferences 2008-12-27 21:06:53 +00:00
00e74c9491 Make new release checking much more robust 2008-12-27 00:13:59 +00:00
15802aa432 Remove 'torrent_alert' handler 2008-12-27 00:02:11 +00:00
45e3f12a49 lt sync 3090 2008-12-26 22:47:24 +00:00
f5a6736617 Fix never-ending import in Blocklist on Windows 2008-12-26 22:45:43 +00:00
5cdd1146d1 Fix tooltip for 'Show session speed in titlebar' option 2008-12-26 08:21:13 +00:00
8ae6477a2d Remove revision file from trunk too 2008-12-26 08:05:10 +00:00
7ac25da4bd Fix new version check 2008-12-26 08:04:31 +00:00
7338a5daea change from vs71 to vs90 2008-12-26 04:55:20 +00:00
bb28b70887 vs2008sp1 fix - hydri 2008-12-26 04:52:44 +00:00
0574c5a125 lt sync 3081 2008-12-24 06:01:18 +00:00
d207429f02 Fix #661 show proper tracker host when ending in .co.uk, .com.au, etc.. 2008-12-22 10:07:39 +00:00
db3a05bda4 update translator credits 2008-12-22 02:44:57 +00:00
aed14960a9 Yet another typo fix 2008-12-20 23:19:24 +00:00
a23d877a99 Fix more issues with TorrentOptions 2008-12-20 23:14:06 +00:00
6756c69580 Fix some typos 2008-12-20 23:06:53 +00:00
6083c1655f Clean up has_key method in TorrentOptions 2008-12-20 06:28:44 +00:00
3481d26821 Fix up to __getitem__ in TorrentOptions 2008-12-20 05:49:03 +00:00
4313d84ed8 Fix some typos 2008-12-20 05:20:21 +00:00
04fdd521ea Use the 'allow_remote' config option instead of always using False 2008-12-20 05:00:55 +00:00
97d2f371b3 Import sys in rpcserver 2008-12-20 04:48:01 +00:00
b6822f446a Fix saving dht state 2008-12-20 04:33:47 +00:00
04d14df8c7 Re-org Core and start using RPCServer 2008-12-20 04:27:59 +00:00
8ed2d25ce5 Ignore _* when doing new version check 2008-12-18 07:06:06 +00:00
eb4f1fdb04 Do not fork in osx 2008-12-18 06:14:49 +00:00
2c4f322f61 lang sync 2008-12-18 04:05:21 +00:00
15dc400231 update pots 2008-12-18 03:46:55 +00:00
c3697f95e9 Branch 1.1.0, trunk is now 1.2.0-dev 2008-12-18 02:52:24 +00:00
2107 changed files with 425681 additions and 339710 deletions

25
.gitattributes vendored Normal file
View File

@ -0,0 +1,25 @@
/libtorrent/ export-ignore
/win32/ export-ignore
/osx/ export-ignore
docs/build/ export-ignore
docs/source/ export-ignore
/tests/ export-ignore
deluge/scripts/ export-ignore
setup.cfg export-ignore
check_glade.sh export-ignore
createicons.sh export-ignore
create_potfiles_in.py export-ignore
gettextize.sh export-ignore
deluge/i18n/deluge.pot export-ignore
deluge/ui/web/css/*-debug.css export-ignore
deluge/ui/web/js/*-debug.js export-ignore
deluge/ui/web/js/deluge-all/ export-ignore
deluge/ui/web/js/ext-extensions/ export-ignore
deluge/ui/web/gen_gettext.py export-ignore
deluge/ui/web/build export-ignore
deluge/ui/web/docs/ export-ignore
.gitattributes export-ignore
.gitmodules export-ignore
.gitignore export-ignore
*.py diff=python

13
.gitignore vendored Normal file
View File

@ -0,0 +1,13 @@
*~
build
dist
*egg-info
*.egg
*.log
*.pyc
*.tar.*
_trial_temp
deluge/i18n/*/
*.desktop
.build_data*
osx/app

797
AUTHORS Normal file
View File

@ -0,0 +1,797 @@
Authors:
* Andrew Resch ('andar') <andrewresch@gmail.com>
* Damien Churchill ('damoxc') <damoxc@gmail.com>
Main Developers:
* Andrew Resch
* Damien Churchill
* John Garland ('johnnyg') <johnnybg+deluge@gmail.com>
* Calum Lind ('cas') <calumlind+deluge@gmail.com>
libtorrent (http://www.libtorrent.org):
* Arvid Norberg
Contributors (and Past Developers):
* Zach Tibbitts <zach@collegegeek.org>
* Alon Zakai ('Kripken') <kripkensteiner@gmail.com>
* Marcos Pinto ('markybob') <markybob@gmail.com>
* Alex Dedul
* Sadrul Habib Chowdhury
* Ido Abramovich <ido.deluge@gmail.com>
* Martijn Voncken <mvoncken@gmail.com>
* Mark Stahler ('kramed') <markstahler@gmail.com>
* Pedro Algarvio ('s0undt3ch') <ufs@ufsoft.org>
* Cristian Greco ('cgreco') <cristian@regolo.cc>
* Chase Sterling ('gazpachoKing') <chase.sterling@gmail.com>
Plugin Developers:
* Autoadd : Chase Sterling
* Blocklist : John Garland
* Execute : Damien Churchill
* Extractor : Andrew Resch
* Label : Martijn Voncken
* Notifications : Pedro Algarvio
* Scheduler : Andrew Resch
* Webui : Damien Churchill
Images Authors:
* files: deluge/data/pixmaps/*.svg, *.png
deluge/ui/web/icons/active.png, alert.png, all.png, checking.png, dht.png,
downloading.png, inactive.png, queued.png, seeding.png, traffic.png
exceptions: deluge/data/pixmaps/deluge.svg and derivatives
copyright: Andrew Resch
license: GPLv3
* files: deluge/data/pixmaps/deluge.svg and derivatives
deluge/ui/web/icons/apple-pre-*.png, deluge*.png
deluge/ui/web/images/deluge*.png
copyright: Andrew Wedderburn
license: GPLv3
* files: deluge/plugins/blocklist/blocklist/data/*.png
deluge/data/pixmaps/tracker_warning16.png, tracker_all16.png, lock48.png
copyright: Gnome Icon Theme
license: GPLv2
url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-icon-theme
* files: deluge/data/pixmaps/magnet.png
copyright: Woothemes
license: Freeware
icon pack: WP Woothemes Ultimate
url: http://www.woothemes.com/
* files: deluge/data/pixmaps/flags/*.png
copyright: Mark James <mjames@gmail.com>
license: Public Domain
url: http://famfamfam.com/lab/icons/flags/
* files: deluge/ui/web/icons/*.png
exceptions: apple-pre-*.png, active.png, alert.png, all.png, deluge.png, dht.png,
downloading.png, inactive.png, queued.png, seeding.png, traffic.png
copyright: Yusuke Kamiyamane <p@yusukekamiyamane.com>
license: Creative Commons Attribution 3.0 License
url: http://p.yusukekamiyamane.com/
* files: deluge/ui/web/images/spinner.gif, spinner-split.gif
copyright: Steven Chim
license: BSD license
url: http://members.upc.nl/j.chim/ext/spinner2/ext-spinner.html
Translation Contributors:
* files: deluge/i18n/*.po
Aaron Wang Shi
abbigss
ABCdatos
Abcx
Actam
Adam
adaminikisi
adi_oporanu
Adrian Goll
afby
Ahmades
Ahmad Farghal
Ahmad Gharbeia أحمد غربية
akira
Aki Sivula
Alan Pepelko
Alberto
Alberto Ferrer
alcatr4z
AlckO
Aleksej Korgenkov
Alessio Treglia
Alexander Ilyashov
Alexander Matveev
Alexander Saltykov
Alexander Taubenkorb
Alexander Telenga
Alexander Yurtsev
Alexandre Martani
Alexandre Rosenfeld
Alexandre Sapata Carbonell
Alexey Osipov
Alin Claudiu Radut
allah
AlSim
Alvaro Carrillanca P.
A.Matveev
Andras Hipsag
András Kárász
Andrea Ratto
Andreas Johansson
Andreas Str
André F. Oliveira
AndreiF
andrewh
Angel Guzman Maeso
Aníbal Deboni Neto
animarval
Antonio Cono
antoniojreyes
Anton Shestakov
Anton Yakutovich
antou
Arkadiusz Kalinowski
Artin
artir
Astur
Athanasios Lefteris
Athmane MOKRAOUI (ButterflyOfFire)
Augusta Carla Klug
Avoledo Marco
axaard
AxelRafn
Axezium
Ayont
b3rx
Bae Taegil
Bajusz Tamás
Balaam's Miracle
Ballestein
Bent Ole Fosse
berto89
bigx
Bjorn Inge Berg
blackbird
Blackeyed
blackmx
BlueSky
Blutheo
bmhm
bob00work
boenki
Bogdan Bădic-Spătariu
bonpu
Boone
boss01
Branislav Jovanović
bronze
brownie
Brus46
bumper
butely
BXCracer
c0nfidencal
Can Kaya
Carlos Alexandro Becker
cassianoleal
Cédric.h
César Rubén
chaoswizard
Chen Tao
chicha
Chien Cheng Wei
Christian Kopac
Christian Widell
Christoffer Brodd-Reijer
christooss
CityAceE
Clopy
Clusty
cnu
Commandant
Constantinos Koniaris
Coolmax
cosmix
Costin Chirvasuta
CoVaLiDiTy
cow_2001
Crispin Kirchner
crom
Cruster
Cybolic
Dan Bishop
Danek
Dani
Daniel Demarco
Daniel Ferreira
Daniel Frank
Daniel Holm
Daniel Høyer Iversen
Daniel Marynicz
Daniel Nylander
Daniel Patriche
Daniel Schildt
Daniil Sorokin
Dante Díaz
Daria Michalska
DarkenCZ
Darren
Daspah
David Eurenius
davidhjelm
David Machakhelidze
Dawid Dziurdzia
Daya Adianto
dcruz
Deady
Dereck Wonnacott
Devgru
Devid Antonio FiloniDevilDogTG
di0rz`
Dialecti Valsamou
Diego Medeiros
Dkzoffy
Dmitrij D. Czarkoff
Dmitriy Geels
Dmitry Olyenyov
Dominik Kozaczko
Dominik Lübben
doomster
Dorota Król
Doyen Philippe
Dread Knight
DreamSonic
duan
Duong Thanh An
DvoglavaZver
dwori
dylansmrjones
Ebuntor
Edgar Alejandro Jarquin Flores
Eetu
ekerazha
Elias Julkunen
elparia
Emberke
Emiliano Goday Caneda
EndelWar
eng.essam
enubuntu
ercangun
Erdal Ronahi
ergin üresin
Eric
Éric Lassauge
Erlend Finvåg
Errdil
ethan shalev
Evgeni Spasov
ezekielnin
Fabian Ordelmans
Fabio Mazanatti
Fábio Nogueira
FaCuZ
Felipe Lerena
Fernando Pereira
fjetland
Florian Schäfer
FoBoS
Folke
Force
fosk
fragarray
freddeg
Frédéric Perrin
Fredrik Kilegran
FreeAtMind
Fulvio Ciucci
Gabor Kelemen
Galatsanos Panagiotis
Gaussian
gdevitis
Georg Brzyk
George Dumitrescu
Georgi Arabadjiev
Georg Sieber
Gerd Radecke
Germán Heusdens
Gianni Vialetto
Gigih Aji Ibrahim
Giorgio Wicklein
Giovanni Rapagnani
Giuseppe
gl
glen
granjerox
Green Fish
greentea
Greyhound
G. U.
Guillaume BENOIT
Guillaume Pelletier
Gustavo Henrique Klug
gutocarvalho
Guybrush88
Hans Rødtang
HardDisk
Hargas Gábor
Heitor Thury Barreiros Barbosa
helios91940
helix84
Helton Rodrigues
Hendrik Luup
Henrique Ferreiro
Henry Goury-Laffont
Hezy Amiel
hidro
hoball
hokten
Holmsss
hristo.num
Hubert Życiński
Hyo
Iarwain
ibe
ibear
Id2ndR
Igor Zubarev
IKON (Ion)
imen
Ionuț Jula
Isabelle STEVANT
István Nyitrai
Ivan Petrovic
Ivan Prignano
IvaSerge
jackmc
Jacks0nxD
Jack Shen
Jacky Yeung
Jacques Stadler
Janek Thomaschewski
Jan Kaláb
Jan Niklas Hasse
Jasper Groenewegen
Javi Rodríguez
Jayasimha (ಜಯಸಿಂಹ)
jeannich
Jeff Bailes
Jesse Zilstorff
Joan Duran
João Santos
Joar Bagge
Joe Anderson
Joel Calado
Johan Linde
John Garland
Jojan
jollyr0ger
Jonas Bo Grimsgaard
Jonas Granqvist
Jonas Slivka
Jonathan Zeppettini
Jørgen
Jørgen Tellnes
josé
José Geraldo Gouvêa
José Iván León Islas
José Lou C.
Jose Sun
Jr.
Jukka Kauppinen
Julián Alarcón
julietgolf
Jusic
Justzupi
Kaarel
Kai Thomsen
Kalman Tarnay
Kamil Páral
Kane_F
kaotiks@gmail.com
Kateikyoushii
kaxhinaz
Kazuhiro NISHIYAMA
Kerberos
Keresztes Ákos
kevintyk
kiersie
Kimbo^
Kim Lübbe
kitzOgen
Kjetil Rydland
kluon
kmikz
Knedlyk
koleoptero
Kőrösi Krisztián
Kouta
Krakatos
Krešo Kunjas
kripken
Kristaps
Kristian Øllegaard
Kristoffer Egil Bonarjee
Krzysztof Janowski
Krzysztof Zawada
Larry Wei Liu
laughterwym
Laur Mõtus
lazka
leandrud
lê bình
Le Coz Florent
Leo
liorda
LKRaider
LoLo_SaG
Long Tran
Lorenz
Low Kian Seong
Luca Andrea Rossi
Luca Ferretti
Lucky LIX
Luis Gomes
Luis Reis
Łukasz Wyszyński
luojie-dune
maaark
Maciej Chojnacki
Maciej Meller
Mads Peter Rommedahl
Major Kong
Malaki
malde
Malte Lenz
Mantas Kriaučiūnas
Mara Sorella
Marcin
Marcin Falkiewicz
marcobra
Marco da Silva
Marco de Moulin
Marco Rodrigues
Marcos
Marcos Escalier
Marcos Pinto
Marcus Ekstrom
Marek Dębowski
Mário Buči
Mario Munda
Marius Andersen
Marius Hudea
Marius Mihai
Mariusz Cielecki
Mark Krapivner
marko-markovic
Markus Brummer
Markus Sutter
Martin
Martin Dybdal
Martin Iglesias
Martin Lettner
Martin Pihl
Masoud Kalali
mat02
Matej Urbančič
Mathias-K
Mathieu Arès
Mathieu D. (MatToufoutu)
Mathijs
Matrik
Matteo Renzulli
Matteo Settenvini
Matthew Gadd
Matthias Benkard
Matthias Mailänder
Mattias Ohlsson
Mauro de Carvalho
Max Molchanov
Me
MercuryCC
Mert Bozkurt
Mert Dirik
MFX
mhietar
mibtha
Michael Budde
Michael Kaliszka
Michalis Makaronides
Michał Tokarczyk
Miguel Pires da Rosa
Mihai Capotă
Miika Metsälä
Mikael Fernblad
Mike Sierra
mikhalek
Milan Prvulović
Milo Casagrande
Mindaugas
Miroslav Matejaš
misel
mithras
Mitja Pagon
M.Kitchen
Mohamed Magdy
moonkey
MrBlonde
muczy
Münir Ekinci
Mustafa Temizel
mvoncken
Mytonn
NagyMarton
neaion
Neil Lin
Nemo
Nerijus Arlauskas
Nicklas Larsson
Nicolaj Wyke
Nicola Piovesan
Nicolas Sabatier
Nicolas Velin
Nightfall
NiKoB
Nikolai M. Riabov
Niko_Thien
niska
Nithir
noisemonkey
nomemohes
nosense
null
Nuno Estêvão
Nuno Santos
nxxs
nyo
obo
Ojan
Olav Andreas Lindekleiv
oldbeggar
Olivier FAURAX
orphe
osantana
Osman Tosun
OssiR
otypoks
ounn
Oz123
Özgür BASKIN
Pablo Carmona A.
Pablo Ledesma
Pablo Navarro Castillo
Paco Molinero
Pål-Eivind Johnsen
pano
Paolo Naldini
Paracelsus
Patryk13_03
Patryk Skorupa
PattogoTehen
Paul Lange
Pavcio
Paweł Wysocki
Pedro Brites Moita
Pedro Clemente Pereira Neto
Pekka "PEXI" Niemistö
Penegal
Penzo
perdido
Peter Kotrcka
Peter Skov
Peter Van den Bosch
Petter Eklund
Petter Viklund
phatsphere
Phenomen
Philipi
Philippides Homer
phoenix
pidi
Pierre Quillery
Pierre Rudloff
Pierre Slamich
Pietrao
Piotr Strębski
Piotr Wicijowski
Pittmann Tamás
Playmolas
Prescott
Prescott_SK
pronull
Przemysław Kulczycki
Pumy
pushpika
PY
qubicllj
r21vo
Rafał Barański
rainofchaos
Rajbir
ras0ir
Rat
rd1381
Renato
Rene Hennig
Rene Pärts
Ricardo Duarte
Richard
Robert Hrovat
Roberth Sjonøy
Robert Lundmark
Robin Jakobsson
Robin Kåveland
Rodrigo Donado
Roel Groeneveld
rohmaru
Rolf Christensen
Rolf Leggewie
Roni Kantis
Ronmi
Rostislav Raykov
royto
RuiAmaro
Rui Araújo
Rui Moura
Rune Svendsen
Rusna
Rytis
Sabirov Mikhail
salseeg
Sami Koskinen
Samir van de Sand
Samuel Arroyo Acuña
Samuel R. C. Vale
Sanel
Santi
Santi Martínez Cantelli
Sardan
Sargate Kanogan
Sarmad Jari
Saša Bodiroža
sat0shi
Saulius Pranckevičius
Savvas Radevic
Sebastian Krauß
Sebastián Porta
Sedir
Sefa Denizoğlu
sekolands
Selim Suerkan
semsomi
Sergii Golovatiuk
setarcos
Sheki
Shironeko
Shlomil
silfiriel
Simone Tolotti
Simone Vendemia
sirkubador
Sławomir Więch
slip
slyon
smoke
Sonja
spectral
spin_555
spitf1r3
Spiziuz
Spyros Theodoritsis
SqUe
Squigly
srtck
Stefan Horning
Stefano Maggiolo
Stefano Roberto Soleti
steinberger
Stéphane Travostino
Stephan Klein
Steven De Winter
Stevie
Stian24
stylius
Sukarn Maini
Sunjae Park
Susana Pereira
szymon siglowy
takercena
TAS
Taygeto
temy4
texxxxxx
thamood
Thanos Chatziathanassiou
Tharawut Paripaiboon
Theodoor
Théophane Anestis
Thor Marius K. Høgås
Tiago Silva
Tiago Sousa
Tikkel
tim__b
Tim Bordemann
Tim Fuchs
Tim Kornhammar
Timo
Timo Jyrinki
Timothy Babych
TitkosRejtozo
Tom
Tomas Gustavsson
Tomas Valentukevičius
Tomasz Dominikowski
Tomislav Plavčić
Tom Mannerhagen
Tommy Mikkelsen
Tom Verdaat
Tony Manco
Tor Erling H. Opsahl
Toudi
tqm_z
Trapanator
Tribaal
Triton
TuniX12
Tuomo Sipola
turbojugend_gr
Turtle.net
twilight
tymmej
Ulrik
Umarzuki Mochlis
unikob
Vadim Gusev
Vagi
Valentin Bora
Valmantas Palikša
VASKITTU
Vassilis Skoullis
vetal17
vicedo
viki
villads hamann
Vincent Garibal
Vincent Ortalda
vinchi007
Vinícius de Figueiredo Silva
Vinzenz Vietzke
virtoo
virtual_spirit
Vitor Caike
Vitor Lamas Gatti
Vladimir Lazic
Vladimir Sharshov
Wanderlust
Wander Nauta
Ward De Ridder
WebCrusader
webdr
Wentao Tang
wilana
Wilfredo Ernesto Guerrero Campos
Wim Champagne
World Sucks
Xabi Ezpeleta
Xavi de Moner
XavierToo
XChesser
Xiaodong Xu
xyb
Yaron
Yasen Pramatarov
YesPoX
Yuren Ju
Yves MATHIEU
zekopeko
zhuqin
Zissan
Γιάννης Κατσαμπίρης
Артём Попов
Миша
Шаймарданов Максим
蔡查理

517
ChangeLog
View File

@ -1,60 +1,469 @@
Deluge 1.1.0 - "" (In Development)
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.
* Implement #368 add torrents by infohash/magnet uri (trackerless torrents)
* Remove remaining gtk functions in common
* Tracker icons.
* Add ETA for torrents with stop at seed ratio set
* 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
=== Deluge 1.3.6 (25 Feburary 2013) ===
==== Core ====
* Catch & log KeyError when removing a torrent from the queued torrents set
* Fix moving/renaming torrents issues when using libtorrent 0.16
* Make sure queue order is preserved when restarting
* #2160: Disable use of python bindings for libtorrent extensions and replace with session flag
* #2163: Fix unable add torrent file with empty (0:) encoding tag
* #2201: Fix error in authmanager if auth file has extra newlines
* #2109: Fix the Proxy settings not being cleared by setting None
* #2110: Fix accepting magnet uris with xt param anywhere within them
* #2204: Fix daemon shutdown hang with large numbers of torrents
* Fix prioritize first/last pieces option for magnet links
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)
* Implement #428 the ability to rename files and directories
* Implement #229 add date added column
* Implement #596 show speeds in title
* Fix #636 not setting the daemon's config directory when using --config= with the UI in classic mode.
* Fix #624 do not allow changing file priorities when using compact allocation
* Fix #602 re-did files/peers tab state saving/loading
* Fix gtk warnings
* Add protocol traffic statusbar item
* Rework the Remove Torrent Dialog to only have 2 options, remove data and remove from session.
* Add "Install Plugin" and "Rescan Plugins" buttons to the Plugins preferences
* Make active port test use internal graphic instead of launching browser
==== Client ====
* Fix keyerrors after removing torrents from UIs
WebUi:
* Lots of smaller tweaks.
* All details tabs have the same features as in gtk-ui 1.0.x
* Persistent sessions #486
* Plugin improvements for easy use of templates and images in eggs. #497
* Classic template takes over some style elements from white template.
* https (for users that know how to create certificates)
* Easier apache mod_proxy use.
* Redesigned sidebar
==== GtkUI ====
* Add move completed option to add torrent dialog
* Prevent jitter in torrent view
* Fix torrent creation with non-ascii characters
* Fix #2100 : Add option not to bring main window to front when adding torrents through ipcinterface
* Add Quit Dialog when toggling classic mode in preferences and only show connection manager when not in classic mode.
* #2169: Fix 'Download Location' in the Add Torrent Dialog not set correctly when folder typed into Other->Location field
* #2171: Fix the Add Peer dialog not responding if empty or invalid values entered
* #2104: Fix no title set for the appindicator
* #2086: Fix submenus and icons for appindicator
* #2146: Fix missing translations in View|Tabs submenu
* Fix torrent names on libtorrent 0.16 on windows
* #2147: Fix missing translations for plugin preferences page
* #1474: Fix the on_show_prefs hook not being executed immediatly after enabling a plugin
* #1946: Fix ReactorNotRestartable error when set as startup application
* #2130: Fix same name can be given to different files in Add Torrent dialog
* #2129: Fix empty filename able to be set in AddTorrent dialog
* #2228: Fix Apply-To-All in AddTorrent Dialog copying file renames to other torrents
* #2260: Fix the Add Torrent dialog also bringing the main window to active workspace
* Fix showing exception error to user in Classic Mode with no libtorrent installed
AjaxUI:
* Hosted in a webui template.
==== Console ====
* LP#1004793: Enable use of connect command in non-interactive mode
* Ensure console commands are executed in order
* #2065: Fix crash with missing closing quote
* #1397: Add support for -s STATE in info command
ConsoleUI:
* New ConsoleUI written by Idoa01
* Callable from command-line for scripts.
==== WebUI ====
* Add move completed option to add torrent dialog
* #2112: Fix world readable tmp directory in json_api
* #2069: Fix login window layout problem when using larger than default font size
* #1890: Fix columns in files and peers view could use some spacing
* #2103: Fix sorting by name is case-sensitive [sedulous]
* #2120: Fix manually entered values not being saved in spinners
* #2212: Fix unable to scroll in proxy preferences page
* Fix autoconnecting to the default host
* #2046: Fix plugins not enabling properly until after refreshing page
* #2125: Fix plugin methods not being available when enabled until restart
* #2085: Fix not showing torrents in sidebar for categories other than 'All' in classic mode
* #2232: Fix flag icon path in Peers Tab missing deluge.config.base
* Fix submenus closing upon mouse click
* Add failed login log message, including IP address, to enable use with fail2ban
* #2261: Fix Proxy settings not being saved in preferences
Plugins:
* Stats plugin for graphs.
* Label plugin for grouping torrents and per torrent settings.
==== Windows OS ====
* Hide the cmd windows when running deluged.exe or deluge-web.exe
* Add deluged-debug.exe and deluge-web-debug.exe that still show the cmd window
* Add gtk locale files to fix untranslated text
* Fix the Open Folder option not working with non-ascii paths
* Fix the daemon starting with config dir containing spaces
* Fix Windows tray submenu items requiring right-click instead of left-click
* Fix issue with adding some torrents with illegal characters via url in gtk client
* #2240: Fix freespace issue with large capacity drives
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".
==== OS X ====
* Fix Open File/Folder option
* Add OS X Menu for GTK Quartz
==== Execute ====
* Fix execute plugin not working with unicode torrent names
=== Deluge 1.3.5 (09 April 2012) ===
==== Core ====
* Fix not properly detecting when torrent is at end of queue
* #2049: Preserve order when moving multiple torrents in the queue
==== GtkUI ====
* Modified fix for #1957, keyerror with non-acsii columns
* Fix translation of items in Sidebar and Torrent Menu
* #2052: Fix translation of Progress bar text
* #2071: Fix KeyError in gtkui when file priority set to value '3'
* #2064: Fix files treeview height in Create Dialog
* Fix missing semi-colon in deluge.desktop
* Disable setting file priorities for seeding torrents
* Bring MainWindow to front when opening another instance
==== WebUI ====
* #2050: Fix 'Up Speed' column not sorting
* Hide unused Infohash button in WebUI
==== Label ====
* Disable unusable items for 'All' in sidebar menu
* Fix items for translation
==== Console ====
* Fix prefixed space for tab completing commands
* Fix missing trailing space for command options with tab complete
==== Blocklist ====
* Use (documented) formatdate over format_date_time
=== Deluge 1.3.4 (03 March 2012) ===
==== Core ====
* #1921: Free disk space reporting incorrectly in FreeBSD
* #1964: Fix unhandled UnpicklingErrors
* #1967: Fix unhandled IndexError when trying to open a non-json conf file
* Fix setting daemon listen interface from command line
* #2021: Fix share ratio limit not obeyed for seeded torrents added to session
* Add optparse custom version to prevent unnecessary loading of libtorrent
* #1554: Fix seeding on share ratio failing for partially selected torrents
* Add proper process title naming in ps, top etc. (Depends: setproctitle)
==== GtkUI ====
* #1918: Fix Drag'n'Drop not working in Windows
* #1941: Increase maximum Cache Size to 999999 (15GiB)
* #1940: File & folder renaming issue when using Add Torrent dialog in Windows
* LP#821577: Fix UnpicklingError when external selection dragged onto Files Tab
* #1934: Fix Unicode error in AddTorrent Dialog
* #1957: Fix keyerror when adding columns for non-latin languages
* #1969: Fix menu item 'Quit & Shutdown' still available when not connected to daemon
* #1895: Fix Files Tab showing wrong files due to torrent_info race condition
* #2010: Move speed text in titlebar to the beginning
* #2032: Wait for client to shutdown/disconnect before stopping reactor
* Fix compatibility with Python 2.5
* Fix collapsed treeview in Create Torrent dialog
* Ignore unmaximise event when window isn't visible
* #1976: Fixed text entry with trailing newline characters causing issues for Move Storage
==== WebUI ====
* Fix Webui files-tab menu setting wrong priority
* Update to ExtJS 3.4.0
* #1960: Fix statustab showing total_payload_download for upload as well
* Remove uneeded Titlebar to save space
* Fix clipped Browse button in WebUI
* #1915: Fix being unable to stop the status bar from autohiding
* Fix password box focus issue in Firefox
* Fix plugin uploads from behind a reverse proxy
* #2010: Move speed text in titlebar to the beginning
* #1936: Fix Referenced before assignment error in json_api
* Changes are now applied when clicking OK in Preferences
* Added Download,Uploaded,Down Limit, Up Limit & Seeder/Peeds columns
* Add magnet uri support to Add Url
* Add keymaps for torrents - Ctrl-A (select all) and Delete
* #2037: Fix 'Add Torrents' torrents list not scrolling
* #2038: Fix Chrome 17 disconnecting from webui
==== Console ====
* #1953: Fix flickering on every update
* #1954: Fix 'invalid literal for float' when setting listen interface
* #1945: Fix UnicodeDecodeError when using non-ascii chars in info
==== Label ====
* #1961: Add missing 'All' filter option
* #2035: Fix label options dialog in webui
* #2036: Fix newly added labels not being sorted in torrent right click menu
==== Notification ====
* #1905: Fix no email sent to second email address
* #1898: Fix email notifications not including date/time they were sent
==== Scheduler ====
* Add plugin page for WebUi
==== Execute ====
* Commands now run scripts asynchronous to prevent Deluge from hanging
==== AutoAdd ====
* Added watch folder support for '.magnet' text file containing single or multiple magnet uris
* Fix glade object issue when re-enabling plugin in same session
* Fix plugin not showing as enabled in webui
=== Deluge 1.3.3 (22 July 2011) ===
==== Core ====
* Properly show the 'Checking Resume Data' state instead of just 7
* #1788: Added ability to use XDG_DOWNLOAD_DIR as default download folder
* Fix path error with torrent files prefixed with 'file://' from Firefox
* #1869: Fix setting the disk io read/write to bypass OS cache in Windows
* #1504: Fix win32 running deluged as not logged in user via runas or service
* #890: If added torrent already exists, append extra trackers to it
* #1338: Fix Seeds and Peers totals not updating
* #1239: Fix translated Tracker Error text not counted in sidebar Error status
* Fix httpdownloader error with existing filename
* #1505: Add libtorrent info to version output
* #1637 Fix UnicodeDecodeError from 'deluge-* --help' with non-english languages
* #1714 Fix handling of backslashes when renaming files/folders
==== GtkUI ====
* Show the checking icon for torrents in the 'Checking Resume Data' state
* #1195: Fix right-click selecting issue when switching between folders and files
* Add F2 key shortcut for renaming filenames in the Files Tab
* Increase max piece size to 16 MiB in create torrent dialog
* #1475: Fix save and restore Preferences dialog size from config
* Add search as you type to the torrent view
* #1456: Fix no ETA showing with multiple files
* #1560: Fix FilesTab Progress value sorting by int instead of float
* #1263: Fix not remembering column widths
* #948: New Release Dialog now shows the server version
* Fix peers in PeersTab showing non-zero download rate when seeding
==== AutoAdd ====
* #1861: Fix AutoAdd Warning (column number is a boolean)
==== Label ====
* #1246: Fix losing Labels upon restart
==== Execute ====
* #1477: Fix ignore Added events from state file on startup
==== ConsoleUI ====
* #1258: Add support for urls and magnet uris in add command
* #1801: Fix unhandled defered error and missing error message upon failed connect
=== Deluge 1.3.2 (24 May 2011) ===
==== Core ====
* #1527: Fix Converting unicode to unicode error in move_storage
* #1373: Fix creating and moving non-ascii folder names in MS Windows
* #1507: Fix temporary file race condition in core/core.py:add_torrent_url
* Fix a bug that can occur when upgrading 1.1 config files
* #1517: Fix isohunt urls not loading
* Handle redirection when adding a torrent by url
* #1614: Fix autoadd matching a directory called "torrent"
* #1742: Fix failure in Event handler prevents further emissions
==== GtkUI ====
* #1514: Added Indicator Applet
* #1494: Add torrent columns Downloaded and Uploaded
* #1308: Add torrent column Seeds/Peers ratio
* #1646: Add torrent columns for per torrent upload and download speed limits
* Add missing icons for Trackers filter
* Fix inconsistancies in the text for translation
* #1510: Fix cannot create a torrent with only non-zero tier trackers
* #1513: Fix unhandled Twisted Error in test_listen_port
* #690: Fix renaming folders does not remove old empty folders
* #1336: Fix uneeded horizontal scrollbar showing in Files & Peers Tab
* #1508: Fix TypeError in cell_data_queue() could not convert argument to correct param type
* #1498: Fix double slashes appearing when renaming
* #1283: Fix consistent icons for Files tab
* #1282: Text for AutoManaged changed to 'On/Off' and localized
* Fix Up/Down buttons in Edit Trackers Dialog
* Add Key Shortcuts for main menu functions
==== WebUI ====
* #1194: Fix infinite login prompt in web ui through reverse proxy
* #1355: Fix slow changing states in webUI
* #1536: Fix Edit Trackers window not scrolling and not being resizable
* #1799: Fix Missing textbox for "Move completed" in torrent options
* #1562: Fix Javascript error in Web UI when re-opening preferences
* #1567: Fix js from plugins does not work with different 'base' setting
* #1268: Fix torrent errors not displayed in webui
* #1323: Fix filter panels not scrollable
* Fix file uploads from behind a reverse proxy.
* #1333: Fix peer list doesn't update automatically
* #1537: Fix editing trackers list, trackers have to be reselected
==== ConsoleUI ====
* #755: Fix can't set listen_ports through console UI
* #1500: Fix Console crashes on command longer than terminal width
* #1248: Fix deluge-console unicode support on redirected stdout
* Fix for deluge-console not adding torrent files on MS Windows
* #1450: Fix trailing white space in paths
* Misc: Updated help text for deluge-console on MS Windows
* #1484: Fix trying to access the screen object when not using interactive mode
* #1548: Fix cli argument processing
* #1856: Add --sort option to info command
* #1857: Add seeding_time, active_time and tracker_status to info command
==== Scheduler ====
* #1506: Fix max speed not restored on a yellow->green transition
=== Deluge 1.3.1 (31 October 2010) ===
==== Core ====
* #1369: Fix non-ascii config folders not working in windows
==== GtkUI ====
* #1365: Fix sidebar not updating show/hide trackers
* #1247: Fix hang on quit
==== WebUI ====
* #1364: Fix preferences not saving when the web ui plugin is enabled in classic mode
* #1377: Fix bug when enabling plugins
* #1370: Fix issues with preferences
* #1312: Fix deluge-web using 100% CPU
=== Deluge 1.3.0 (18 September 2010) ===
==== Core ====
* Fix issue where the save_timer is cancelled when it's not active
* Fix unhandled exception when adding a torrent to the session
* Moved xdg import so it is not called on Windows, where it is unused. fixes #1343
* Fix key error after enabling a plugin that introduces a new status key
* Ignore global stop ratio related settings in logic, so per torrent ones are used.
* Ensure preferencesmanager only changes intended libtorrent session settings.
* Fix issue when adding torrents without a 'session'. This can happen when a plugin adds a torrent, like how the AutoAdd plugin works. The user that adds this torrent will be an empty string.
* Add TorrentFileCompleted event
==== GtkUI ====
* Increase max piece size to 8 MiB in create torrent dialog (closes #1358)
==== Scheduler ====
* Add max active downloading and seeding options to scheduler.
* Fix scheduler so that it keeps current state, even after global settings change.
==== AutoAdd ====
* AutoAdd plugin can now recover when one of the watchfolders has an unhandled exception.
* Fix bug in AutoAdd plugin where watchdirs would not display in gtkui when first enabled.
* Fix bugs with unicode torrents in AutoAdd plugin.
=== Deluge 1.3.0-rc2 (20 August 2010) ===
==== Core ====
* Fix tracker_icons failing on windows
* Fix #1302 an uncaught exception in an state_changed event handler in SessionProxy was preventing the TorrentManager's stop method from properly saving all the resume data
* Fix issue with SessionProxy not updating the torrent status correctly when get_torrent_status calls take place within the cache_expiry time
==== ConsoleUI ====
* #1307: Fix not being able to add torrents
* #1293: Fix not being able to add paths that contain backslashes
==== GtkUI ====
* Fix uncaught exception when closing deluge in classic mode
==== Execute ====
* #1306: Fix always executing last event
==== Label ====
* Fix being able to remove labels in web ui
==== WebUI ====
* #1319: Fix shift selecting in file trees
=== Deluge 1.3.0-rc1 (08 May 2010) ===
==== Core ====
* Implement #1063 option to delete torrent file copy on torrent removal - patch from Ghent
* Implement #457 progress bars for folders
* Implement #1012 httpdownloader supports gzip decoding
* #496: Remove deprecated functions in favour of get_session_status()
* #1112: Fix renaming files in add torrent dialog
* #1247: Fix deluge-gtk from hanging on shutdown
* #995: Rewrote tracker_icons
* Add AutoAdd plugin
* Add Notifications plugin
==== GtkUI ====
* Use new SessionProxy class for caching torrent status client-side
* Use torrent status diffs to reduce RPC traffic
==== Blocklist ====
* Implement local blocklist support
* #861: Pause transfers until blocklist is imported
* Fix redirection not working with relative paths
==== Execute ====
* Fix running commands with the TorrentAdded event
* Fix the web interface
==== Label ====
* Fix the web interface (#733)
==== Web ====
* Migrate to ExtJS 3.1
* Add gzip compression of HTTP data to the server
* Improve the efficiency of the TorrentGrid with lots of torrents (#1026)
* Add a base parameter to allow reverse proxying (#1076)
* Fix showing all the peers in the details tab (#1054)
* Fix uploading torrent files in Opera or IE (#1087)
* Complete IE support
=== Deluge 1.2.0 - "Bursting like an infected kidney" (10 January 2010) ===
==== Core ====
* Implement new RPC protocol DelugeRPC replacing XMLRPC
* Move to a twisted framework
* Add an 'Error' filter for Trackers to show trackers that currently have a tracker error
* Use system GeoIP database if available, this is now an optional dependency
==== GtkUI ====
* Remove SignalReceiver
* Implemented a cross-platform IPC method thus removing the DBUS dependency
* Implement a "True" Classic Mode where there is no longer a separate daemon process
* Add preferences option "Add torrent in paused state"
* Add tracker icons to the Tracker column
* Implement #259 show tooltip with country name in the peers tab
* Add an error category to the tracker sidebar list
* Add Find More Plugins button to Plugins preference page
* Fix #518 remove header in add torrent dialog to save vertical space
* Add a Cache preferences page to adjust cache settings and examine cache status
* Add ability to rename files prior to adding them
* Fix shutdown handler with GNOME session manager
* Allow 4 MiB piece sizes when creating a torrent
==== ConsoleUI ====
* Changed to use curses for a more interactive client
==== WebUI ====
* Move over to using Twisted-Web for the webserver.
* Move to only AJAX interface built upon Ext-JS.
==== Plugins ====
* Add Scheduler plugin
* Add Extractor plugin
==== Misc ====
* PyGTK dependency bumped to => 2.12 to use new tooltip system
* Add new scripts for invoking UIs: deluge-gtk, deluge-web, deluge-console
* Remove GeoIP database from the source tree
=== Deluge 1.1.0 - "Time gas!" (10 January 2009) ===
==== 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
* 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.
* Add ETA for torrents with stop at seed ratio set
* 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
==== 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 Filter Manager)
* Implement #428 the ability to rename files and directories
* Implement #229 add date added column
* Implement #596 show speeds in title
* Fix #636 not setting the daemon's config directory when using --config= with the UI in classic mode.
* Fix #624 do not allow changing file priorities when using compact allocation
* Fix #602 re-did files/peers tab state saving/loading
* Fix gtk warnings
* Add protocol traffic statusbar item
* Rework the Remove Torrent Dialog to only have 2 options, remove data and remove from session.
* Add "Install Plugin" and "Rescan Plugins" buttons to the Plugins preferences
* Make active port test use internal graphic instead of launching browser
==== WebUI ====
* Lots of smaller tweaks.
* All details tabs have the same features as in gtk-ui 1.0.x
* Persistent sessions #486
* Plugin improvements for easy use of templates and images in eggs. #497
* Classic template takes over some style elements from white template.
* https (for users that know how to create certificates)
* Easier apache mod_proxy use.
* Redesigned sidebar
==== AjaxUI ====
* Hosted in a webui template.
==== ConsoleUI ====
* New ConsoleUI written by Idoa01
* Callable from command-line for scripts.
==== Plugins ====
* Stats plugin for graphs.
* Label plugin for grouping torrents and per torrent settings.
==== 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".

30
DEPENDS Normal file
View File

@ -0,0 +1,30 @@
=== Core ===
* python >= 2.5
* twisted >= 8.1
* twisted-web >= 8.1
* pyopenssl
* simplejson (if python < 2.6)
* setuptools
* gettext
* intltool
* pyxdg
* chardet
* geoip-database (optional)
* setproctitle (optional)
* libtorrent >= 0.14, or build the included version
* If building included libtorrent::
* boost >= 1.34.1
* openssl
* zlib
=== Gtk ===
* python-notify (libnotify python wrapper)
* pygame
* pygtk >= 2.12
* librsvg
* xdg-utils
=== Web ===
* mako

13
LICENSE
View File

@ -1,3 +1,16 @@
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

12
MANIFEST.in Normal file
View File

@ -0,0 +1,12 @@
recursive-include docs/man *
recursive-include deluge *
recursive-include win32 *
recursive-exclude deluge *.egg-link
exclude deluge/ui/web/gen_gettext.py
exclude deluge/ui/web/css/*-debug.css
exclude deluge/ui/web/js/build.sh
exclude deluge/ui/web/js/Deluge*.js
exclude deluge/ui/web/js/*-debug.js
prune deluge/ui/web/docs
prune deluge/scripts

82
README
View File

@ -2,92 +2,56 @@
Deluge BitTorrent Client
==========================
Authors:
Andrew Resch
Marcos Pinto
Martijn Voncken
Sadrul Habib Chowdhury
Homepage: http://deluge-torrent.org
Authors:
Andrew Resch
Damien Churchill
==========================
License
==========================
Deluge is under the GNU GPLv3 license.
Icon data/pixmaps/deluge.svg and derivatives in data/icons are copyright
Andrew Wedderburn and are under the GNU GPLv3.
All other icons in data/pixmaps are copyright Andrew Resch and are under
the GNU GPLv3.
==========================
Contact/Support:
==========================
We have two options available for support:
Our Forum, at http://forum.deluge-torrent.org
or
Our IRC Channel, at #deluge on Freenode
For contributors and past developers see:
AUTHORS
==========================
Installation Instructions:
==========================
First, make sure you have the proper build dependencies installed. On a normal
Debian or Ubuntu system:
For detailed instructions see: http://dev.deluge-torrent.org/wiki/Installing/Source
sudo apt-get install g++ make python-all-dev python-all python-dbus \
python-gtk2 python-notify librsvg2-common python-xdg python-support \
subversion libboost-dev libboost-python-dev libboost-iostreams-dev \
libboost-thread-dev libboost-date-time-dev libboost-filesystem-dev \
libboost-serialization-dev libssl-dev zlib1g-dev python-setuptools
Ensure build dependencies are installed, see DEPENDS for a full listing.
The names of the packages may vary depending on your OS / distro.
Build and install by running:
Once you have the needed libraries installed, build and install by running:
$ python setup.py build
$ sudo python setup.py install
$ python setup.py build
$ sudo python setup.py install
==========================
Contact/Support:
==========================
Forum: http://forum.deluge-torrent.org
IRC Channel: #deluge on irc.freenode.net
==========================
FAQ
==========================
For the full FAQ see: http://dev.deluge-torrent.org/wiki/Faq
How to start the various user-interfaces
Gtk:
deluge --ui gtk
deluge or deluge-gtk
Console:
deluge --ui null
deluge-console
Web:
deluge --ui web
deluge-web
Go to http://localhost:8112/ default-password = "deluge"
I started "deluge" but i don't see the gtk-ui
The deluge command remembers the last interface it started. Be explicit and type one of the full "deluge -u <interface>" commands listed above.
Why is deluge still listed in my system tray even after I close it ?
You closed the gtk user-interface but you did not close the daemon. Choose "Quit & Shutdown Daemon" to close both Daemon and gtk-ui.
How do I start the daemon ?
How do I start the daemon?
deluged
How do I start the daemon with logging to console ?
deluged -d
I can't connect to the daemon from another machine
* Configure the daemon to allow remote connections
* Restart the daemon.
See: http://dev.deluge-torrent.org/wiki/UserGuide/ThinClient
Note: do not do this on a public ip , use the webui for unsecure networks.
I upgraded from 0.5 and plugin x is missing
1.0 is a rewrite, all old 0.5 plugins have to be rewritten.

21
check_glade.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# Fixes glade files which may have set gtk stock labels set to translatable
for x in `find . -name '*.glade' |grep -v '.git\|build'` ; do \
for y in gtk-add gtk-apply gtk-bold gtk-cancel gtk-cdrom gtk-clear \
gtk-close gtk-color-picker gtk-connect gtk-convert gtk-copy gtk-cut \
gtk-delete gtk-dialog-error gtk-dialog-info gtk-dialog-question \
gtk-dialog-warning gtk-dnd gtk-dnd-multiple gtk-edit gtk-execute gtk-find \
gtk-find-and-replace gtk-floppy gtk-goto-bottom gtk-goto-first \
gtk-goto-last gtk-goto-top gtk-go-back gtk-go-down gtk-go-forward \
gtk-go-up gtk-help gtk-home gtk-index gtk-italic gtk-jump-to \
gtk-justify-center gtk-justify-fill gtk-justify-left gtk-missing-image \
gtk-new gtk-no gtk-ok gtk-open gtk-paste gtk-preferences gtk-print \
gtk-print-preview gtk-properties gtk-quit gtk-redo gtk-refresh \
gtk-remove gtk-revert-to-saved gtk-save gtk-save-as gtk-select-color \
gtk-select-font gtk-sort-descending gtk-spell-check gtk-stop \
gtk-strikethrough gtk-undelete gtk-underline gtk-undo gtk-yes \
gtk-zoom-100 gtk-zoom-fit gtk-zoom-in gtk-zoom-out; do \
sed -i "s/<property\ name\=\"label\"\ translatable\=\"yes\">$y<\/property>/<property\ name\=\"label\"\ translatable\=\"no\">$y<\/property>/g" $x; \
done;\
done

32
create_potfiles_in.py Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env python
import os
import re
import sys
# Paths to exclude
EXCLUSIONS = [
"deluge/scripts",
"deluge/i18n",
]
POTFILE_IN = "deluge/i18n/POTFILES.in"
pattern = "deluge\/plugins\/.*\/build"
compiled = re.compile(pattern)
sys.stdout.write("Creating " + POTFILE_IN + " ... ")
sys.stdout.flush()
to_translate = []
for (dirpath, dirnames, filenames) in os.walk("deluge"):
for filename in filenames:
if os.path.splitext(filename)[1] in (".py", ".glade", ".in") \
and dirpath not in EXCLUSIONS \
and not compiled.match(dirpath):
to_translate.append(os.path.join(dirpath, filename))
f = open(POTFILE_IN, "wb")
for line in to_translate:
f.write(line + "\n")
f.close()
print "Done"

5
debian/changelog vendored
View File

@ -1,5 +0,0 @@
deluge-torrent (0.9.08-1) unstable; urgency=low
* R8 release
-- Andrew Resch (andar) <andrewresch@gmail.com> Tue, 26 Aug 2008 16:31:14 -0800

View File

@ -1,5 +0,0 @@
deluge-torrent (0.6.0-svn3235-1) lenny; urgency=low
* Daily Build
-- Andrew Resch (andar) <andrewresch@gmail.com> Tue, 17 Jun 2008 16:31:14 -0800

View File

@ -1,5 +0,0 @@
deluge-torrent (0.6.0-svn3235-1) unstable; urgency=low
* Daily Build
-- Andrew Resch (andar) <andrewresch@gmail.com> Tue, 17 Jun 2008 16:31:14 -0800

View File

@ -1,5 +0,0 @@
deluge-torrent (0.6.0-svn3235-1) gutsy; urgency=low
* Daily Build
-- Andrew Resch (andar) <andrewresch@gmail.com> Tue, 17 Jun 2008 16:31:14 -0800

View File

@ -1,5 +0,0 @@
deluge-torrent (0.6.0-svn3235-1) hardy; urgency=low
* Daily Build
-- Andrew Resch (andar) <andrewresch@gmail.com> Tue, 17 Jun 2008 16:31:14 -0800

1
debian/compat vendored
View File

@ -1 +0,0 @@
5

21
debian/control vendored
View File

@ -1,21 +0,0 @@
Source: deluge-torrent
Section: net
Priority: optional
Maintainer: Andrew Resch (andar) <andrewresch@gmail.com>
Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.3.5-11), python-all, python-support (>= 0.5.3), libboost-dev (>= 1.34.1), libboost-thread-dev (>= 1.34.1), libboost-date-time-dev (>= 1.34.1), libboost-filesystem-dev (>= 1.34.1), libboost-python-dev (>= 1.34.1), libboost-iostreams-dev (>= 1.34.1), zlib1g-dev, libssl-dev, dpatch, python-setuptools
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
Conflicts: deluge-torrent-common
Replaces: deluge-torrent-common
Description: A Bittorrent client written in Python/PyGTK
Deluge is a Bittorrent client, created using Python and GTK+.
.
Deluge is intended to bring a native, full-featured client to Linux GTK
desktop environments such as Gnome and XFCE.
.
It uses Rasterbar's version of libtorrent.
.
Homepage: http://www.deluge-torrent.org/

View File

@ -1,19 +0,0 @@
Source: deluge-torrent
Section: net
Priority: optional
Maintainer: Andrew Resch (andar) <andrewresch@gmail.com>
Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.3.5-11), python-all, python-support (>= 0.5.3), libboost-dev (>= 1.33.1), libboost-thread-dev (>= 1.33.1), libboost-date-time-dev (>= 1.33.1), libboost-filesystem-dev (>= 1.33.1), libboost-serialization-dev (>= 1.33.1), libboost-program-options-dev (>= 1.33.1), libboost-regex-dev (>= 1.33.1), libboost-python-dev (>= 1.33.1), zlib1g-dev, libssl-dev, dpatch, python-setuptools
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
Description: A Bittorrent client written in Python/PyGTK
Deluge is a Bittorrent client, created using Python and GTK+.
.
Deluge is intended to bring a native, full-featured client to Linux GTK
desktop environments such as Gnome and XFCE.
.
It uses Rasterbar's version of libtorrent.
.
Homepage: http://www.deluge-torrent.org/

View File

@ -1,19 +0,0 @@
Source: deluge-torrent
Section: net
Priority: optional
Maintainer: Andrew Resch (andar) <andrewresch@gmail.com>
Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.3.5-11), python-all, python-support (>= 0.5.3), libboost1.36-dev (>= 1.36), libboost-thread1.36-dev (>= 1.36), libboost-date-time1.36-dev (>= 1.36), libboost-filesystem1.36-dev (>= 1.36), libboost-serialization1.36-dev (>= 1.36), libboost-program-options1.36-dev (>= 1.36), libboost-regex1.36-dev (>= 1.36), libboost-python1.36-dev (>= 1.36), zlib1g-dev, libssl-dev, dpatch, python-setuptools
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
Description: A Bittorrent client written in Python/PyGTK
Deluge is a Bittorrent client, created using Python and GTK+.
.
Deluge is intended to bring a native, full-featured client to Linux GTK
desktop environments such as Gnome and XFCE.
.
It uses Rasterbar's version of libtorrent.
.
Homepage: http://www.deluge-torrent.org/

99
debian/copyright vendored
View File

@ -1,99 +0,0 @@
This package was debianized by Marcos Pinto (markybob) <markybob@gmail.com> on
Fri, 31 Jul 2008 22:03:13 +0100.
It was downloaded from http://www.deluge-torrent.org/
Upstream Authors & Copyright:
Andrew Resch
Marcos Pinto
Sadrul Habib Chowdhury
Martijn Voncken
License:
This package 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 package 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 package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, 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.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
libtorrent is (C) 2003-2008 Arvid Norberg arvid@cs.umu.se and its
python bindings were initially written by Daniel Wallin in 2006.
It is distributed unders terms of the BSD License below:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"libtorrent/include/libtorrent/asio*" are (C) 2003-2008 Christopher
M. Kohlhoff <chris@kohlhoff.com> and distributed under terms of the Boost
Software License, Version 1.0 :
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"deluge/i18n/*" are (C) 2006 Rosetta Contributors and Canonical Ltd 2006 and distributed
under the same license as the deluge software.
The Debian packaging is (C) 2006-2008, Marcos Pinto (markybob)
<markybob@gmail.com> and is licensed under GPL3, see above.

2
debian/manpages vendored
View File

@ -1,2 +0,0 @@
deluge/docs/man/deluge.1
deluge/docs/man/deluged.1

3
debian/menu vendored
View File

@ -1,3 +0,0 @@
?package(deluge-torrent): needs="X11" section="Applications/Network/File Transfer" \
title="Deluge BitTorrent Client" longtitle="Bittorrent client written in Python/PyGTK" \
command="/usr/bin/deluge" icon="/usr/share/pixmaps/deluge.png"

View File

1
debian/pyversions vendored
View File

@ -1 +0,0 @@
2.5

View File

@ -1 +0,0 @@
2.5

View File

@ -1 +0,0 @@
2.5

75
debian/rules vendored
View File

@ -1,75 +0,0 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Dpatch targets
include /usr/share/dpatch/dpatch.make
# Available python (using debian/pyversions) and destdir
PYVERS = 2.5
DESTDIR = $(CURDIR)/debian/deluge-torrent
# We need to known the target arch to enable/disable amd64 hack
ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
ARCH64 = ia64 amd64 alpha kfreebsd-amd64 ppc64
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# python-libtorrent need to define AMD64 to work fine on a 64 bits system
ifneq (,$(findstring $(ARCH),$(ARCH64)))
CFLAGS += -DAMD64
endif
build: patch-stamp $(PYVERS:%=build-stamp%)
build-stamp%: patch-stamp
dh_testdir
CFLAGS="$(CFLAGS)" python$* setup.py build
touch $@
clean: unpatch
dh_testdir
dh_testroot
rm -rf build/
find . -name \*.pyc | xargs rm -f
rm -rf build-stamp*
dh_clean
install: build install-prereq $(PYVERS:%=install-%) install-finish
install-prereq:
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
install-%:
python$* setup.py install --root=$(DESTDIR) --prefix=/usr --no-compile
install-finish:
# Desktop menu
rm -rf $(DESTDIR)/usr/share/applications
install -D -m644 $(CURDIR)/deluge/data/share/applications/deluge.desktop $(DESTDIR)/usr/share/applications/deluge.desktop
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installmenu
dh_strip
dh_compress
dh_fixperms
dh_pysupport
dh_desktop
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

View File

@ -1,595 +0,0 @@
"""Simple XML-RPC Server.
This module can be used to create simple XML-RPC servers
by creating a server and either installing functions, a
class instance, or by extending the SimpleXMLRPCServer
class.
It can also be used to handle XML-RPC requests in a CGI
environment using CGIXMLRPCRequestHandler.
A list of possible usage patterns follows:
1. Install functions:
server = SimpleXMLRPCServer(("localhost", 8000))
server.register_function(pow)
server.register_function(lambda x,y: x+y, 'add')
server.serve_forever()
2. Install an instance:
class MyFuncs:
def __init__(self):
# make all of the string functions available through
# string.func_name
import string
self.string = string
def _listMethods(self):
# implement this method so that system.listMethods
# knows to advertise the strings methods
return list_public_methods(self) + \
['string.' + method for method in list_public_methods(self.string)]
def pow(self, x, y): return pow(x, y)
def add(self, x, y) : return x + y
server = SimpleXMLRPCServer(("localhost", 8000))
server.register_introspection_functions()
server.register_instance(MyFuncs())
server.serve_forever()
3. Install an instance with custom dispatch method:
class Math:
def _listMethods(self):
# this method must be present for system.listMethods
# to work
return ['add', 'pow']
def _methodHelp(self, method):
# this method must be present for system.methodHelp
# to work
if method == 'add':
return "add(2,3) => 5"
elif method == 'pow':
return "pow(x, y[, z]) => number"
else:
# By convention, return empty
# string if no help is available
return ""
def _dispatch(self, method, params):
if method == 'pow':
return pow(*params)
elif method == 'add':
return params[0] + params[1]
else:
raise 'bad method'
server = SimpleXMLRPCServer(("localhost", 8000))
server.register_introspection_functions()
server.register_instance(Math())
server.serve_forever()
4. Subclass SimpleXMLRPCServer:
class MathServer(SimpleXMLRPCServer):
def _dispatch(self, method, params):
try:
# We are forcing the 'export_' prefix on methods that are
# callable through XML-RPC to prevent potential security
# problems
func = getattr(self, 'export_' + method)
except AttributeError:
raise Exception('method "%s" is not supported' % method)
else:
return func(*params)
def export_add(self, x, y):
return x + y
server = MathServer(("localhost", 8000))
server.serve_forever()
5. CGI script:
server = CGIXMLRPCRequestHandler()
server.register_function(pow)
server.handle_request()
"""
# Written by Brian Quinlan (brian@sweetapp.com).
# Based on code written by Fredrik Lundh.
import xmlrpclib
from xmlrpclib import Fault
import SocketServer
import BaseHTTPServer
import sys
import os
try:
import fcntl
except ImportError:
fcntl = None
def resolve_dotted_attribute(obj, attr, allow_dotted_names=True):
"""resolve_dotted_attribute(a, 'b.c.d') => a.b.c.d
Resolves a dotted attribute name to an object. Raises
an AttributeError if any attribute in the chain starts with a '_'.
If the optional allow_dotted_names argument is false, dots are not
supported and this function operates similar to getattr(obj, attr).
"""
if allow_dotted_names:
attrs = attr.split('.')
else:
attrs = [attr]
for i in attrs:
if i.startswith('_'):
raise AttributeError(
'attempt to access private attribute "%s"' % i
)
else:
obj = getattr(obj,i)
return obj
def list_public_methods(obj):
"""Returns a list of attribute strings, found in the specified
object, which represent callable attributes"""
return [member for member in dir(obj)
if not member.startswith('_') and
callable(getattr(obj, member))]
def remove_duplicates(lst):
"""remove_duplicates([2,2,2,1,3,3]) => [3,1,2]
Returns a copy of a list without duplicates. Every list
item must be hashable and the order of the items in the
resulting list is not defined.
"""
u = {}
for x in lst:
u[x] = 1
return u.keys()
class SimpleXMLRPCDispatcher:
"""Mix-in class that dispatches XML-RPC requests.
This class is used to register XML-RPC method handlers
and then to dispatch them. There should never be any
reason to instantiate this class directly.
"""
def __init__(self, allow_none, encoding):
self.funcs = {}
self.instance = None
self.allow_none = allow_none
self.encoding = encoding
def register_instance(self, instance, allow_dotted_names=False):
"""Registers an instance to respond to XML-RPC requests.
Only one instance can be installed at a time.
If the registered instance has a _dispatch method then that
method will be called with the name of the XML-RPC method and
its parameters as a tuple
e.g. instance._dispatch('add',(2,3))
If the registered instance does not have a _dispatch method
then the instance will be searched to find a matching method
and, if found, will be called. Methods beginning with an '_'
are considered private and will not be called by
SimpleXMLRPCServer.
If a registered function matches a XML-RPC request, then it
will be called instead of the registered instance.
If the optional allow_dotted_names argument is true and the
instance does not have a _dispatch method, method names
containing dots are supported and resolved, as long as none of
the name segments start with an '_'.
*** SECURITY WARNING: ***
Enabling the allow_dotted_names options allows intruders
to access your module's global variables and may allow
intruders to execute arbitrary code on your machine. Only
use this option on a secure, closed network.
"""
self.instance = instance
self.allow_dotted_names = allow_dotted_names
def register_function(self, function, name = None):
"""Registers a function to respond to XML-RPC requests.
The optional name argument can be used to set a Unicode name
for the function.
"""
if name is None:
name = function.__name__
self.funcs[name] = function
def register_introspection_functions(self):
"""Registers the XML-RPC introspection methods in the system
namespace.
see http://xmlrpc.usefulinc.com/doc/reserved.html
"""
self.funcs.update({'system.listMethods' : self.system_listMethods,
'system.methodSignature' : self.system_methodSignature,
'system.methodHelp' : self.system_methodHelp})
def register_multicall_functions(self):
"""Registers the XML-RPC multicall method in the system
namespace.
see http://www.xmlrpc.com/discuss/msgReader$1208"""
self.funcs.update({'system.multicall' : self.system_multicall})
def _marshaled_dispatch(self, data, dispatch_method = None):
"""Dispatches an XML-RPC method from marshalled (XML) data.
XML-RPC methods are dispatched from the marshalled (XML) data
using the _dispatch method and the result is returned as
marshalled data. For backwards compatibility, a dispatch
function can be provided as an argument (see comment in
SimpleXMLRPCRequestHandler.do_POST) but overriding the
existing method through subclassing is the prefered means
of changing method dispatch behavior.
"""
try:
params, method = xmlrpclib.loads(data)
# generate response
if dispatch_method is not None:
response = dispatch_method(method, params)
else:
response = self._dispatch(method, params)
# wrap response in a singleton tuple
response = (response,)
response = xmlrpclib.dumps(response, methodresponse=1,
allow_none=self.allow_none, encoding=self.encoding)
except Fault, fault:
response = xmlrpclib.dumps(fault, allow_none=self.allow_none,
encoding=self.encoding)
except:
# report exception back to server
response = xmlrpclib.dumps(
xmlrpclib.Fault(1, "%s:%s" % (sys.exc_type, sys.exc_value)),
encoding=self.encoding, allow_none=self.allow_none,
)
return response
def system_listMethods(self):
"""system.listMethods() => ['add', 'subtract', 'multiple']
Returns a list of the methods supported by the server."""
methods = self.funcs.keys()
if self.instance is not None:
# Instance can implement _listMethod to return a list of
# methods
if hasattr(self.instance, '_listMethods'):
methods = remove_duplicates(
methods + self.instance._listMethods()
)
# if the instance has a _dispatch method then we
# don't have enough information to provide a list
# of methods
elif not hasattr(self.instance, '_dispatch'):
methods = remove_duplicates(
methods + list_public_methods(self.instance)
)
methods.sort()
return methods
def system_methodSignature(self, method_name):
"""system.methodSignature('add') => [double, int, int]
Returns a list describing the signature of the method. In the
above example, the add method takes two integers as arguments
and returns a double result.
This server does NOT support system.methodSignature."""
# See http://xmlrpc.usefulinc.com/doc/sysmethodsig.html
return 'signatures not supported'
def system_methodHelp(self, method_name):
"""system.methodHelp('add') => "Adds two integers together"
Returns a string containing documentation for the specified method."""
method = None
if self.funcs.has_key(method_name):
method = self.funcs[method_name]
elif self.instance is not None:
# Instance can implement _methodHelp to return help for a method
if hasattr(self.instance, '_methodHelp'):
return self.instance._methodHelp(method_name)
# if the instance has a _dispatch method then we
# don't have enough information to provide help
elif not hasattr(self.instance, '_dispatch'):
try:
method = resolve_dotted_attribute(
self.instance,
method_name,
self.allow_dotted_names
)
except AttributeError:
pass
# Note that we aren't checking that the method actually
# be a callable object of some kind
if method is None:
return ""
else:
import pydoc
return pydoc.getdoc(method)
def system_multicall(self, call_list):
"""system.multicall([{'methodName': 'add', 'params': [2, 2]}, ...]) => \
[[4], ...]
Allows the caller to package multiple XML-RPC calls into a single
request.
See http://www.xmlrpc.com/discuss/msgReader$1208
"""
results = []
for call in call_list:
method_name = call['methodName']
params = call['params']
try:
# XXX A marshalling error in any response will fail the entire
# multicall. If someone cares they should fix this.
results.append([self._dispatch(method_name, params)])
except Fault, fault:
results.append(
{'faultCode' : fault.faultCode,
'faultString' : fault.faultString}
)
except:
results.append(
{'faultCode' : 1,
'faultString' : "%s:%s" % (sys.exc_type, sys.exc_value)}
)
return results
def _dispatch(self, method, params):
"""Dispatches the XML-RPC method.
XML-RPC calls are forwarded to a registered function that
matches the called XML-RPC method name. If no such function
exists then the call is forwarded to the registered instance,
if available.
If the registered instance has a _dispatch method then that
method will be called with the name of the XML-RPC method and
its parameters as a tuple
e.g. instance._dispatch('add',(2,3))
If the registered instance does not have a _dispatch method
then the instance will be searched to find a matching method
and, if found, will be called.
Methods beginning with an '_' are considered private and will
not be called.
"""
func = None
try:
# check to see if a matching function has been registered
func = self.funcs[method]
except KeyError:
if self.instance is not None:
# check for a _dispatch method
if hasattr(self.instance, '_dispatch'):
return self.instance._dispatch(method, params)
else:
# call instance method directly
try:
func = resolve_dotted_attribute(
self.instance,
method,
self.allow_dotted_names
)
except AttributeError:
pass
if func is not None:
return func(*params)
else:
raise Exception('method "%s" is not supported' % method)
class SimpleXMLRPCRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Simple XML-RPC request handler class.
Handles all HTTP POST requests and attempts to decode them as
XML-RPC requests.
"""
# Class attribute listing the accessible path components;
# paths not on this list will result in a 404 error.
rpc_paths = ('/', '/RPC2')
def is_rpc_path_valid(self):
if self.rpc_paths:
return self.path in self.rpc_paths
else:
# If .rpc_paths is empty, just assume all paths are legal
return True
def do_POST(self):
"""Handles the HTTP POST request.
Attempts to interpret all HTTP POST requests as XML-RPC calls,
which are forwarded to the server's _dispatch method for handling.
"""
# Check that the path is legal
if not self.is_rpc_path_valid():
self.report_404()
return
try:
# Get arguments by reading body of request.
# We read this in chunks to avoid straining
# socket.read(); around the 10 or 15Mb mark, some platforms
# begin to have problems (bug #792570).
max_chunk_size = 10*1024*1024
size_remaining = int(self.headers["content-length"])
L = []
while size_remaining:
chunk_size = min(size_remaining, max_chunk_size)
L.append(self.rfile.read(chunk_size))
size_remaining -= len(L[-1])
data = ''.join(L)
# In previous versions of SimpleXMLRPCServer, _dispatch
# could be overridden in this class, instead of in
# SimpleXMLRPCDispatcher. To maintain backwards compatibility,
# check to see if a subclass implements _dispatch and dispatch
# using that method if present.
response = self.server._marshaled_dispatch(
data, getattr(self, '_dispatch', None)
)
except: # This should only happen if the module is buggy
# internal error, report as HTTP server error
self.send_response(500)
self.end_headers()
else:
# got a valid XML RPC response
self.send_response(200)
self.send_header("Content-type", "text/xml")
self.send_header("Content-length", str(len(response)))
self.end_headers()
self.wfile.write(response)
# shut down the connection
self.wfile.flush()
self.connection.shutdown(1)
def report_404 (self):
# Report a 404 error
self.send_response(404)
response = 'No such page'
self.send_header("Content-type", "text/plain")
self.send_header("Content-length", str(len(response)))
self.end_headers()
self.wfile.write(response)
# shut down the connection
self.wfile.flush()
self.connection.shutdown(1)
def log_request(self, code='-', size='-'):
"""Selectively log an accepted request."""
if self.server.logRequests:
BaseHTTPServer.BaseHTTPRequestHandler.log_request(self, code, size)
class SimpleXMLRPCServer(SocketServer.TCPServer,
SimpleXMLRPCDispatcher):
"""Simple XML-RPC server.
Simple XML-RPC server that allows functions and a single instance
to be installed to handle requests. The default implementation
attempts to dispatch XML-RPC calls to the functions or instance
installed in the server. Override the _dispatch method inhereted
from SimpleXMLRPCDispatcher to change this behavior.
"""
allow_reuse_address = True
def __init__(self, addr, requestHandler=SimpleXMLRPCRequestHandler,
logRequests=True, allow_none=False, encoding=None):
self.logRequests = logRequests
SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
SocketServer.TCPServer.__init__(self, addr, requestHandler)
# [Bug #1222790] If possible, set close-on-exec flag; if a
# method spawns a subprocess, the subprocess shouldn't have
# the listening socket open.
if fcntl is not None and hasattr(fcntl, 'FD_CLOEXEC'):
flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD)
flags |= fcntl.FD_CLOEXEC
fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags)
class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
"""Simple handler for XML-RPC data passed through CGI."""
def __init__(self, allow_none=False, encoding=None):
SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
def handle_xmlrpc(self, request_text):
"""Handle a single XML-RPC request"""
response = self._marshaled_dispatch(request_text)
print('Content-Type: text/xml')
print('Content-Length: %d' % len(response))
print(
sys.stdout.write(response))
def handle_get(self):
"""Handle a single HTTP GET request.
Default implementation indicates an error because
XML-RPC uses the POST method.
"""
code = 400
message, explain = \
BaseHTTPServer.BaseHTTPRequestHandler.responses[code]
response = BaseHTTPServer.DEFAULT_ERROR_MESSAGE % \
{
'code' : code,
'message' : message,
'explain' : explain
}
print('Status: %d %s' % (code, message))
print('Content-Type: text/html')
print('Content-Length: %d' % len(response))
print(
sys.stdout.write(response))
def handle_request(self, request_text = None):
"""Handle a single XML-RPC request passed through a CGI post method.
If no XML data is given then it is read from stdin. The resulting
XML-RPC response is printed to stdout along with the correct HTTP
headers.
"""
if request_text is None and \
os.environ.get('REQUEST_METHOD', None) == 'GET':
self.handle_get()
else:
# POST data is normally available through stdin
if request_text is None:
request_text = sys.stdin.read()
self.handle_xmlrpc(request_text)
if __name__ == '__main__':
print('Running XML-RPC server on port 8000')
server = SimpleXMLRPCServer(("localhost", 8000))
server.register_function(pow)
server.register_function(lambda x,y: x+y, 'add')
server.serve_forever()

20
deluge/__rpcapi.py Normal file
View File

@ -0,0 +1,20 @@
from new import classobj
from deluge.core.core import Core
from deluge.core.daemon import Daemon
class RpcApi:
pass
def scan_for_methods(obj):
methods = {
'__doc__': 'Methods available in %s' % obj.__name__.lower()
}
for d in dir(obj):
if not hasattr(getattr(obj,d), '_rpcserver_export'):
continue
methods[d] = getattr(obj, d)
cobj = classobj(obj.__name__.lower(), (object,), methods)
setattr(RpcApi, obj.__name__.lower(), cobj)
scan_for_methods(Core)
scan_for_methods(Daemon)

60
deluge/_libtorrent.py Normal file
View File

@ -0,0 +1,60 @@
#
# _libtorrent.py
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may 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.
#
# deluge 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 deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# 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.
#
#
"""
This module is used to handle the importing of libtorrent.
We use this module to control what versions of libtorrent this version of Deluge
supports.
** Usage **
>>> from deluge._libtorrent import lt
"""
REQUIRED_VERSION = "0.14.9.0"
def check_version(lt):
from deluge.common import VersionSplit
if VersionSplit(lt.version) < VersionSplit(REQUIRED_VERSION):
raise ImportError("This version of Deluge requires libtorrent >=%s!" % REQUIRED_VERSION)
try:
import deluge.libtorrent as lt
check_version(lt)
except ImportError:
import libtorrent as lt
check_version(lt)

View File

@ -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

View File

@ -17,9 +17,20 @@
#
# You should have received a copy of the GNU General Public License
# along with deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA.
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# 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.
#
#
@ -29,9 +40,47 @@ import os
import time
import subprocess
import platform
import sys
import chardet
import pkg_resources
import xdg, xdg.BaseDirectory
import gettext
import locale
try:
import json
except ImportError:
import simplejson as json
from deluge.error import *
from deluge.log import LOG as log
# Do a little hack here just in case the user has json-py installed since it
# has a different api
if not hasattr(json, "dumps"):
json.dumps = json.write
json.loads = json.read
def dump(obj, fp, **kw):
fp.write(json.dumps(obj))
def load(fp, **kw):
return json.loads(fp.read())
json.dump = dump
json.load = load
# Initialize gettext
try:
if hasattr(locale, "bindtextdomain"):
locale.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
if hasattr(locale, "textdomain"):
locale.textdomain("deluge")
gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n"), unicode=True)
except Exception, e:
log.error("Unable to initialize gettext/locale!")
log.exception(e)
import __builtin__
__builtin__.__dict__["_"] = lambda x: x
LT_TORRENT_STATE = {
"Queued": 0,
@ -41,6 +90,7 @@ LT_TORRENT_STATE = {
"Finished": 4,
"Seeding": 5,
"Allocating": 6,
"Checking Resume Data": 7,
0: "Queued",
1: "Checking",
2: "Downloading Metadata",
@ -48,6 +98,7 @@ LT_TORRENT_STATE = {
4: "Finished",
5: "Seeding",
6: "Allocating",
7: "Checking Resume Data"
}
TORRENT_STATE = [
@ -64,11 +115,15 @@ FILE_PRIORITY = {
0: "Do Not Download",
1: "Normal Priority",
2: "High Priority",
5: "Highest Priority",
3: "High Priority",
4: "High Priority",
5: "High Priority",
6: "High Priority",
7: "Highest Priority",
"Do Not Download": 0,
"Normal Priority": 1,
"High Priority": 2,
"Highest Priority": 5
"High Priority": 5,
"Highest Priority": 7
}
def get_version():
@ -79,43 +134,38 @@ def get_version():
:rtype: string
"""
return pkg_resources.require("Deluge")[0].version.split("r")[0]
def get_revision():
"""
The svn revision of the build if available
:returns: the svn revision, or ""
:rtype: string
"""
revision = ""
try:
f = open(pkg_resources.resource_filename("deluge", os.path.join("data", "revision")))
revision = f.read()
f.close()
except IOError, e:
pass
return revision
return pkg_resources.require("Deluge")[0].version
def get_default_config_dir(filename=None):
"""
:param filename: if None, only the config path is returned, if provided, a path including the filename will be returned
:type filename: string
:returns: a file path to the config directory and optional filename
:rtype: string
"""
if windows_check():
appDataPath = os.environ.get("APPDATA")
if not appDataPath:
import _winreg
hkey = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders")
appDataReg = _winreg.QueryValueEx(hkey, "AppData")
appDataPath = appDataReg[0]
_winreg.CloseKey(hkey)
if filename:
return os.path.join(os.environ.get("APPDATA"), "deluge", filename)
return os.path.join(appDataPath, "deluge", filename)
else:
return os.path.join(os.environ.get("APPDATA"), "deluge")
return os.path.join(appDataPath, "deluge")
else:
if filename:
return os.path.join(xdg.BaseDirectory.save_config_path("deluge"), filename)
else:
return xdg.BaseDirectory.save_config_path("deluge")
from xdg.BaseDirectory import save_config_path
try:
if filename:
return os.path.join(save_config_path("deluge"), filename)
else:
return save_config_path("deluge")
except OSError, e:
log.error("Unable to use default config directory, exiting... (%s)", e)
sys.exit(1)
def get_default_download_dir():
"""
@ -124,8 +174,20 @@ def get_default_download_dir():
"""
if windows_check():
return os.path.expanduser("~")
return os.path.join(os.path.expanduser("~"), 'Downloads')
else:
from xdg.BaseDirectory import xdg_config_home
userdir_file = os.path.join(xdg_config_home, 'user-dirs.dirs')
try:
for line in open(userdir_file, 'r'):
if not line.startswith('#') and 'XDG_DOWNLOAD_DIR' in line:
download_dir = os.path.expandvars(\
line.partition("=")[2].rstrip().strip('"'))
if os.path.isdir(download_dir):
return download_dir
except IOError:
pass
return os.environ.get("HOME")
def windows_check():
@ -163,6 +225,7 @@ def get_pixmap(fname):
Provides easy access to files in the deluge/data/pixmaps folder within the Deluge egg
:param fname: the filename to look for
:type fname: string
:returns: a path to a pixmap file included with Deluge
:rtype: string
@ -175,10 +238,13 @@ def open_file(path):
Opens a file or folder using the system configured program
:param path: the path to the file or folder to open
:type path: string
"""
if windows_check():
os.startfile("%s" % path)
os.startfile(path.decode("utf8"))
elif osx_check():
subprocess.Popen(["open", "%s" % path])
else:
subprocess.Popen(["xdg-open", "%s" % path])
@ -187,18 +253,11 @@ def open_url_in_browser(url):
Opens a url in the desktop's default browser
:param url: the url to open
:type url: string
"""
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 webbrowser
webbrowser.open(url)
## Formatting text functions
@ -206,7 +265,8 @@ def fsize(fsize_b):
"""
Formats the bytes value into a string with KiB, MiB or GiB units
:param fsize_b: int, the filesize in bytes
:param fsize_b: the filesize in bytes
:type fsize_b: int
:returns: formatted string in KiB, MiB or GiB units
:rtype: string
@ -218,18 +278,43 @@ def fsize(fsize_b):
"""
fsize_kb = fsize_b / 1024.0
if fsize_kb < 1024:
return "%.1f KiB" % fsize_kb
return "%.1f %s" % (fsize_kb, _("KiB"))
fsize_mb = fsize_kb / 1024.0
if fsize_mb < 1024:
return "%.1f MiB" % fsize_mb
return "%.1f %s" % (fsize_mb, _("MiB"))
fsize_gb = fsize_mb / 1024.0
return "%.1f GiB" % fsize_gb
return "%.1f %s" % (fsize_gb, _("GiB"))
def fsize_short(fsize_b):
"""
Formats the bytes value into a string with K, M or G units
:param fsize_b: the filesize in bytes
:type fsize_b: int
:returns: formatted string in K, M or G units
:rtype: string
**Usage**
>>> fsize(112245)
'109.6 K'
"""
fsize_kb = fsize_b / 1024.0
if fsize_kb < 1024:
return "%.1f %s" % (fsize_kb, _("K"))
fsize_mb = fsize_kb / 1024.0
if fsize_mb < 1024:
return "%.1f %s" % (fsize_mb, _("M"))
fsize_gb = fsize_mb / 1024.0
return "%.1f %s" % (fsize_gb, _("G"))
def fpcnt(dec):
"""
Formats a string to display a percentage with two decimal places
:param dec: float, the ratio in the range [0.0, 1.0]
:param dec: the ratio in the range [0.0, 1.0]
:type dec: float
:returns: a formatted string representing a percentage
:rtype: string
@ -245,7 +330,8 @@ def fspeed(bps):
"""
Formats a string to display a transfer speed utilizing :func:`fsize`
:param bps: int, bytes per second
:param bps: bytes per second
:type bps: int
:returns: a formatted string representing transfer speed
:rtype: string
@ -255,14 +341,23 @@ def fspeed(bps):
'42.1 KiB/s'
"""
return '%s/s' % (fsize(bps))
fspeed_kb = bps / 1024.0
if fspeed_kb < 1024:
return "%.1f %s" % (fspeed_kb, _("KiB/s"))
fspeed_mb = fspeed_kb / 1024.0
if fspeed_mb < 1024:
return "%.1f %s" % (fspeed_mb, _("MiB/s"))
fspeed_gb = fspeed_mb / 1024.0
return "%.1f %s" % (fspeed_gb, _("GiB/s"))
def fpeer(num_peers, total_peers):
"""
Formats a string to show 'num_peers' ('total_peers')
:param num_peers: int, the number of connected peers
:param total_peers: int, the total number of peers
:param num_peers: the number of connected peers
:type num_peers: int
:param total_peers: the total number of peers
:type total_peers: int
:returns: a formatted string: num_peers (total_peers), if total_peers < 0, then it will not be shown
:rtype: string
@ -283,7 +378,8 @@ def ftime(seconds):
"""
Formats a string to show time in a human readable form
:param seconds: int, the number of seconds
:param seconds: the number of seconds
:type seconds: int
:returns: a formatted time string, will return '' if seconds == 0
:rtype: string
@ -319,22 +415,24 @@ def ftime(seconds):
def fdate(seconds):
"""
Formats a date string in the locale's date representation based on the systems timezone
Formats a date time string in the locale's date representation based on the systems timezone
:param seconds: float, time in seconds since the Epoch
:returns: a string in the locale's date representation or "" if seconds < 0
:param seconds: time in seconds since the Epoch
:type seconds: float
:returns: a string in the locale's datetime representation or "" if seconds < 0
:rtype: string
"""
if seconds < 0:
return ""
return time.strftime("%x", time.localtime(seconds))
return time.strftime("%x %X", time.localtime(seconds))
def is_url(url):
"""
A simple regex test to check if the URL is valid
A simple test to check if the URL is valid
:param url: string, the url to test
:param url: the url to test
:type url: string
:returns: True or False
:rtype: bool
@ -344,14 +442,14 @@ def is_url(url):
True
"""
import re
return bool(re.search('^(https?|ftp|udp)://', url))
return url.partition('://')[0] in ("http", "https", "ftp", "udp")
def is_magnet(uri):
"""
A check to determine if a uri is a valid bittorrent magnet uri
:param uri: string, the uri to check
:param uri: the uri to check
:type uri: string
:returns: True or False
:rtype: bool
@ -361,40 +459,22 @@ def is_magnet(uri):
True
"""
if uri[:20] == "magnet:?xt=urn:btih:":
magnet_scheme = 'magnet:?'
xt_param = 'xt=urn:btih:'
if uri.startswith(magnet_scheme) and xt_param in uri:
return True
return False
def fetch_url(url):
"""
Downloads a torrent file from a given URL and checks the file's validity
:param url: string, the url of the .torrent file to fetch
:returns: the filepath to the downloaded file
:rtype: string
"""
import urllib
from deluge.log import LOG as log
try:
filename, headers = urllib.urlretrieve(url)
except IOError:
log.debug("Network error while trying to fetch torrent from %s", url)
else:
if filename.endswith(".torrent") or headers["content-type"] ==\
"application/x-bittorrent":
return filename
else:
log.debug("URL doesn't appear to be a valid torrent file: %s", url)
return None
def create_magnet_uri(infohash, name=None, trackers=[]):
"""
Creates a magnet uri
:param infohash: string, the info-hash of the torrent
:param name: string, the name of the torrent (optional)
:param trackers: list of strings, the trackers to announce to (optional)
:param infohash: the info-hash of the torrent
:type infohash: string
:param name: the name of the torrent (optional)
:type name: string
:param trackers: the trackers to announce to (optional)
:type trackers: list of strings
:returns: a magnet uri string
:rtype: string
@ -414,7 +494,8 @@ def get_path_size(path):
"""
Gets the size in bytes of 'path'
:param path: string, the path to check for size
:param path: the path to check for size
:type path: string
:returns: the size in bytes of the path or -1 if the path does not exist
:rtype: int
@ -436,26 +517,31 @@ def free_space(path):
"""
Gets the free space available at 'path'
:param path: string, the path to check
:param path: the path to check
:type path: string
:returns: the free space at path in bytes
:rtype: int
:raises InvalidPathError: if the path is not valid
"""
if not os.path.exists(path):
raise InvalidPathError("%s is not a valid path" % path)
if windows_check():
import win32api
drive = path.split(":")[0]
free = win32api.GetDiskFreeSpaceEx(drive)[0]
return free
from win32file import GetDiskFreeSpaceEx
return GetDiskFreeSpaceEx(path)[0]
else:
disk_data = os.statvfs(path)
block_size = disk_data.f_bsize
disk_data = os.statvfs(path.encode("utf8"))
block_size = disk_data.f_frsize
return disk_data.f_bavail * block_size
def is_ip(ip):
"""
A simple test to see if 'ip' is valid
:param ip: string, the ip to check
:param ip: the ip to check
:type ip: string
:returns: True or False
:rtype: bool
@ -468,14 +554,144 @@ def is_ip(ip):
import socket
#first we test ipv4
try:
if socket.inet_pton(socket.AF_INET, "%s" % (ip)):
return True
if windows_check():
if socket.inet_aton("%s" % (ip)):
return True
else:
if socket.inet_pton(socket.AF_INET, "%s" % (ip)):
return True
except socket.error:
if not socket.has_ipv6:
return False
#now test ipv6
try:
if socket.inet_pton(socket.AF_INET6, "%s" % (ip)):
if windows_check():
log.warning("ipv6 check unavailable on windows")
return True
else:
if socket.inet_pton(socket.AF_INET6, "%s" % (ip)):
return True
except socket.error:
return False
def path_join(*parts):
"""
An implementation of os.path.join that always uses / for the separator
to ensure that the correct paths are produced when working with internal
paths on Windows.
"""
path = ''
for part in parts:
if not part:
continue
elif part[0] == '/':
path = part
elif not path:
path = part
else:
path += '/' + part
return path
XML_ESCAPES = (
('&', '&amp;'),
('<', '&lt;'),
('>', '&gt;'),
('"', '&quot;'),
("'", '&apos;')
)
def xml_decode(string):
"""
Unescape a string that was previously encoded for use within xml.
:param string: The string to escape
:type string: string
:returns: The unescaped version of the string.
:rtype: string
"""
for char, escape in XML_ESCAPES:
string = string.replace(escape, char)
return string
def xml_encode(string):
"""
Escape a string for use within an xml element or attribute.
:param string: The string to escape
:type string: string
:returns: An escaped version of the string.
:rtype: string
"""
for char, escape in XML_ESCAPES:
string = string.replace(char, escape)
return string
def decode_string(s, encoding="utf8"):
"""
Decodes a string and re-encodes it in utf8. If it cannot decode using
`:param:encoding` then it will try to detect the string encoding and
decode it.
:param s: string to decode
:type s: string
:keyword encoding: the encoding to use in the decoding
:type encoding: string
"""
try:
s = s.decode(encoding).encode("utf8", "ignore")
except UnicodeDecodeError:
s = s.decode(chardet.detect(s)["encoding"], "ignore").encode("utf8", "ignore")
return s
def utf8_encoded(s):
"""
Returns a utf8 encoded string of s
:param s: (unicode) string to (re-)encode
:type s: basestring
:returns: a utf8 encoded string of s
:rtype: str
"""
if isinstance(s, str):
s = decode_string(s)
elif isinstance(s, unicode):
s = s.encode("utf8", "ignore")
return s
class VersionSplit(object):
"""
Used for comparing version numbers.
:param ver: the version
:type ver: string
"""
def __init__(self, ver):
ver = ver.lower()
vs = ver.replace("_", "-").split("-")
self.version = [int(x) for x in vs[0].split(".")]
self.suffix = None
self.dev = False
if len(vs) > 1:
if vs[1].startswith(("rc", "alpha", "beta")):
self.suffix = vs[1]
if vs[-1] == 'dev':
self.dev = True
def __cmp__(self, ver):
"""
The comparison method.
:param ver: the version to compare with
:type ver: VersionSplit
"""
# If there is no suffix we use z because we want final
# to appear after alpha, beta, and rc alphabetically.
v1 = [self.version, self.suffix or 'z', self.dev]
v2 = [ver.version, ver.suffix or 'z', ver.dev]
return cmp(v1, v2)

View File

@ -1,7 +1,7 @@
#
# component.py
#
# Copyright (C) 2007, 2008 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2007-2010 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
@ -19,203 +19,409 @@
# 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 gobject
from twisted.internet.defer import maybeDeferred, succeed, DeferredList, fail
from twisted.internet.task import LoopingCall
from deluge.log import LOG as log
COMPONENT_STATE = [
"Stopped",
"Started",
"Paused"
]
class ComponentAlreadyRegistered(Exception):
pass
class Component:
def __init__(self, name, interval=1000, depend=None):
# Register with the ComponentRegistry
register(name, self, depend)
self._interval = interval
self._timer = None
self._state = COMPONENT_STATE.index("Stopped")
class Component(object):
"""
Component objects are singletons managed by the :class:`ComponentRegistry`.
When a new Component object is instantiated, it will be automatically
registered with the :class:`ComponentRegistry`.
def get_state(self):
return self._state
The ComponentRegistry has the ability to start, stop, pause and shutdown the
components registered with it.
**Events:**
**start()** - This method is called when the client has connected to a
Deluge core.
**stop()** - This method is called when the client has disconnected from a
Deluge core.
**update()** - This method is called every 1 second by default while the
Componented is in a *Started* state. The interval can be
specified during instantiation. The update() timer can be
paused by instructing the :class:`ComponentRegistry` to pause
this Component.
**shutdown()** - This method is called when the client is exiting. If the
Component is in a "Started" state when this is called, a
call to stop() will be issued prior to shutdown().
**States:**
A Component can be in one of these 5 states.
**Started** - The Component has been started by the :class:`ComponentRegistry`
and will have it's update timer started.
**Starting** - The Component has had it's start method called, but it hasn't
fully started yet.
**Stopped** - The Component has either been stopped or has yet to be started.
**Stopping** - The Component has had it's stop method called, but it hasn't
fully stopped yet.
**Paused** - The Component has had it's update timer stopped, but will
still be considered in a Started state.
"""
def __init__(self, name, interval=1, depend=None):
self._component_name = name
self._component_interval = interval
self._component_depend = depend
self._component_state = "Stopped"
self._component_timer = None
self._component_starting_deferred = None
self._component_stopping_deferred = None
_ComponentRegistry.register(self)
def __del__(self):
if _ComponentRegistry:
_ComponentRegistry.deregister(self._component_name)
def _component_start_timer(self):
if hasattr(self, "update"):
self._component_timer = LoopingCall(self.update)
self._component_timer.start(self._component_interval)
def _component_start(self):
def on_start(result):
self._component_state = "Started"
self._component_starting_deferred = None
self._component_start_timer()
return True
def on_start_fail(result):
self._component_state = "Stopped"
self._component_starting_deferred = None
log.error(result)
return result
if self._component_state == "Stopped":
if hasattr(self, "start"):
self._component_state = "Starting"
d = maybeDeferred(self.start)
d.addCallback(on_start)
d.addErrback(on_start_fail)
self._component_starting_deferred = d
else:
d = maybeDeferred(on_start, None)
elif self._component_state == "Starting":
return self._component_starting_deferred
elif self._component_state == "Started":
d = succeed(True)
else:
d = fail("Cannot start a component not in a Stopped state!")
return d
def _component_stop(self):
def on_stop(result):
self._component_state = "Stopped"
if self._component_timer and self._component_timer.running:
self._component_timer.stop()
return True
def on_stop_fail(result):
self._component_state = "Started"
self._component_stopping_deferred = None
log.error(result)
return result
if self._component_state != "Stopped" and self._component_state != "Stopping":
if hasattr(self, "stop"):
self._component_state = "Stopping"
d = maybeDeferred(self.stop)
d.addCallback(on_stop)
d.addErrback(on_stop_fail)
self._component_stopping_deferred = d
else:
d = maybeDeferred(on_stop, None)
if self._component_state == "Stopping":
return self._component_stopping_deferred
return succeed(None)
def _component_pause(self):
def on_pause(result):
self._component_state = "Paused"
if self._component_state == "Started":
if self._component_timer and self._component_timer.running:
d = maybeDeferred(self._component_timer.stop)
d.addCallback(on_pause)
else:
d = succeed(None)
elif self._component_state == "Paused":
d = succeed(None)
else:
d = fail("Cannot pause a component in a non-Started state!")
return d
def _component_resume(self):
def on_resume(result):
self._component_state = "Started"
if self._component_state == "Paused":
d = maybeDeferred(self._component_start_timer)
d.addCallback(on_resume)
else:
d = fail("Component cannot be resumed from a non-Paused state!")
return d
def _component_shutdown(self):
def on_stop(result):
if hasattr(self, "shutdown"):
return maybeDeferred(self.shutdown)
return succeed(None)
d = self._component_stop()
d.addCallback(on_stop)
return d
def start(self):
pass
def _start(self):
self._state = COMPONENT_STATE.index("Started")
if self._update():
self._timer = gobject.timeout_add(self._interval, self._update)
def stop(self):
pass
def _stop(self):
self._state = COMPONENT_STATE.index("Stopped")
try:
gobject.source_remove(self._timer)
except:
pass
def _pause(self):
self._state = COMPONENT_STATE.index("Paused")
try:
gobject.source_remove(self._timer)
except:
pass
def _resume(self):
self._start()
def shutdown(self):
pass
def _update(self):
try:
self.update()
except AttributeError:
# This will stop the timer since the component doesn't have an
# update method.
return False
return True
class ComponentRegistry:
def __init__(self):
self.components = {}
self.depend = {}
def register(self, name, obj, depend):
"""Registers a component.. depend must be list or None"""
log.debug("Registered %s with ComponentRegistry..", name)
self.components[name] = obj
if depend != None:
self.depend[name] = depend
def get(self, name):
"""Returns a reference to the component 'name'"""
return self.components[name]
def start(self):
"""Starts all components"""
for component in self.components.keys():
self.start_component(component)
def start_component(self, name):
"""Starts a component"""
# Check to see if this component has any dependencies
if self.depend.has_key(name):
for depend in self.depend[name]:
self.start_component(depend)
# Only start if the component is stopped.
if self.components[name].get_state() == \
COMPONENT_STATE.index("Stopped"):
log.debug("Starting component %s..", name)
self.components[name].start()
self.components[name]._start()
def stop(self):
"""Stops all components"""
for component in self.components.keys():
self.stop_component(component)
def stop_component(self, component):
if self.components[component].get_state() != \
COMPONENT_STATE.index("Stopped"):
log.debug("Stopping component %s..", component)
self.components[component].stop()
self.components[component]._stop()
def pause(self):
"""Pauses all components. Stops calling update()"""
for component in self.components.keys():
self.pause_component(component)
def pause_component(self, component):
if self.components[component].get_state() not in \
[COMPONENT_STATE.index("Paused"), COMPONENT_STATE.index("Stopped")]:
log.debug("Pausing component %s..", component)
self.components[component]._pause()
def resume(self):
"""Resumes all components. Starts calling update()"""
for component in self.components.keys():
self.resume_component(component)
def resume_component(self, component):
if self.components[component].get_state() == COMPONENT_STATE.index("Paused"):
log.debug("Resuming component %s..", component)
self.components[component]._resume()
def update(self):
"""Updates all components"""
for component in self.components.keys():
# Only update the component if it's started
if self.components[component].get_state() == \
COMPONENT_STATE.index("Started"):
self.components[component].update()
return True
pass
def shutdown(self):
"""Shuts down all components. This should be called when the program
exits so that components can do any necessary clean-up."""
# Stop all components first
self.stop()
for component in self.components.keys():
log.debug("Shutting down component %s..", component)
try:
self.components[component].shutdown()
except Exception, e:
log.debug("Unable to call shutdown(): %s", e)
pass
class ComponentRegistry(object):
"""
The ComponentRegistry holds a list of currently registered
:class:`Component` objects. It is used to manage the Components by
starting, stopping, pausing and shutting them down.
"""
def __init__(self):
self.components = {}
def register(self, obj):
"""
Registers a component object with the registry. This is done
automatically when a Component object is instantiated.
:param obj: the Component object
:type obj: object
:raises ComponentAlreadyRegistered: if a component with the same name is already registered.
"""
name = obj._component_name
if name in self.components:
raise ComponentAlreadyRegistered(
"Component already registered with name %s" % name)
self.components[obj._component_name] = obj
def deregister(self, name):
"""
Deregisters a component from the registry. A stop will be
issued to the component prior to deregistering it.
:param name: the name of the component
:type name: string
"""
if name in self.components:
log.debug("Deregistering Component: %s", name)
d = self.stop([name])
def on_stop(result, name):
del self.components[name]
return d.addCallback(on_stop, name)
else:
return succeed(None)
def start(self, names=[]):
"""
Starts Components that are currently in a Stopped state and their
dependencies. If *names* is specified, will only start those
Components and their dependencies and if not it will start all
registered components.
:param names: a list of Components to start
:type names: list
:returns: a Deferred object that will fire once all Components have been sucessfully started
:rtype: twisted.internet.defer.Deferred
"""
# Start all the components if names is empty
if not names:
names = self.components.keys()
elif isinstance(names, str):
names = [names]
def on_depends_started(result, name):
return self.components[name]._component_start()
deferreds = []
for name in names:
if self.components[name]._component_depend:
# This component has depends, so we need to start them first.
d = self.start(self.components[name]._component_depend)
d.addCallback(on_depends_started, name)
deferreds.append(d)
else:
deferreds.append(self.components[name]._component_start())
return DeferredList(deferreds)
def stop(self, names=[]):
"""
Stops Components that are currently not in a Stopped state. If
*names* is specified, then it will only stop those Components,
and if not it will stop all the registered Components.
:param names: a list of Components to start
:type names: list
:returns: a Deferred object that will fire once all Components have been sucessfully stopped
:rtype: twisted.internet.defer.Deferred
"""
if not names:
names = self.components.keys()
elif isinstance(names, str):
names = [names]
deferreds = []
for name in names:
if name in self.components:
deferreds.append(self.components[name]._component_stop())
return DeferredList(deferreds)
def pause(self, names=[]):
"""
Pauses Components that are currently in a Started state. If
*names* is specified, then it will only pause those Components,
and if not it will pause all the registered Components.
:param names: a list of Components to pause
:type names: list
:returns: a Deferred object that will fire once all Components have been sucessfully paused
:rtype: twisted.internet.defer.Deferred
"""
if not names:
names = self.components.keys()
elif isinstance(names, str):
names = [names]
deferreds = []
for name in names:
if self.components[name]._component_state == "Started":
deferreds.append(self.components[name]._component_pause())
return DeferredList(deferreds)
def resume(self, names=[]):
"""
Resumes Components that are currently in a Paused state. If
*names* is specified, then it will only resume those Components,
and if not it will resume all the registered Components.
:param names: a list of Components to resume
:type names: list
:returns: a Deferred object that will fire once all Components have been sucessfully resumed
:rtype: twisted.internet.defer.Deferred
"""
if not names:
names = self.components.keys()
elif isinstance(names, str):
names = [names]
deferreds = []
for name in names:
if self.components[name]._component_state == "Paused":
deferreds.append(self.components[name]._component_resume())
return DeferredList(deferreds)
def shutdown(self):
"""
Shutdowns all Components regardless of state. This will call
:meth:`stop` on call the components prior to shutting down. This should
be called when the program is exiting to ensure all Components have a
chance to properly shutdown.
:returns: a Deferred object that will fire once all Components have been sucessfully resumed
:rtype: twisted.internet.defer.Deferred
"""
deferreds = []
for component in self.components.values():
deferreds.append(component._component_shutdown())
return DeferredList(deferreds)
def update(self):
"""
Updates all Components that are in a Started state.
"""
for component in self.components.items():
component.update()
_ComponentRegistry = ComponentRegistry()
def register(name, obj, depend=None):
"""Registers a component with the registry"""
_ComponentRegistry.register(name, obj, depend)
deregister = _ComponentRegistry.deregister
start = _ComponentRegistry.start
stop = _ComponentRegistry.stop
pause = _ComponentRegistry.pause
resume = _ComponentRegistry.resume
update = _ComponentRegistry.update
shutdown = _ComponentRegistry.shutdown
def start(component=None):
"""Starts all components"""
if component == None:
_ComponentRegistry.start()
else:
_ComponentRegistry.start_component(component)
def get(name):
"""
Return a reference to a component.
def stop(component=None):
"""Stops all or specified components"""
if component == None:
_ComponentRegistry.stop()
else:
_ComponentRegistry.stop_component(component)
:param name: the Component name to get
:type name: string
def pause(component=None):
"""Pauses all or specificed components"""
if component == None:
_ComponentRegistry.pause()
else:
_ComponentRegistry.pause_component(component)
:returns: the Component object
:rtype: object
def resume(component=None):
"""Resumes all or specificed components"""
if component == None:
_ComponentRegistry.resume()
else:
_ComponentRegistry.resume_component(component)
:raises KeyError: if the Component does not exist
def update():
"""Updates all components"""
_ComponentRegistry.update()
def shutdown():
"""Shutdowns all components"""
_ComponentRegistry.shutdown()
def get(component):
"""Return a reference to the component"""
return _ComponentRegistry.get(component)
"""
return _ComponentRegistry.components[name]

View File

@ -19,21 +19,63 @@
# 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.
#
#
"""
Deluge Config Module
This module is used for loading and saving of configuration files.. or anything
really.
The format of the config file is two json encoded dicts:
<version dict>
<content dict>
The version dict contains two keys: file and format. The format version is
controlled by the Config class. It should only be changed when anything below
it is changed directly by the Config class. An example of this would be if we
changed the serializer for the content to something different.
The config file version is changed by the 'owner' of the config file. This is
to signify that there is a change in the naming of some config keys or something
similar along those lines.
The content is simply the dict to be saved and will be serialized before being
written.
Converting
Since the format of the config could change, there needs to be a way to have
the Config object convert to newer formats. To do this, you will need to
register conversion functions for various versions of the config file. Note that
this can only be done for the 'config file version' and not for the 'format'
version as this will be done internally.
"""
import cPickle as pickle
import shutil
import os
import gobject
import deluge.common
from deluge.log import LOG as log
json = deluge.common.json
def prop(func):
"""Function decorator for defining property attributes
@ -48,6 +90,37 @@ def prop(func):
"""
return property(doc=func.__doc__, **func())
def find_json_objects(s):
"""
Find json objects in a string.
:param s: the string to find json objects in
:type s: string
:returns: a list of tuples containing start and end locations of json objects in the string `s`
:rtype: [(start, end), ...]
"""
objects = []
opens = 0
start = s.find("{")
offset = start
if start < 0:
return []
for index, c in enumerate(s[offset:]):
if c == "{":
opens += 1
elif c == "}":
opens -= 1
if opens == 0:
objects.append((start, index+offset+1))
start = index + offset + 1
return objects
class Config(object):
"""
This class is used to access/create/modify config files
@ -59,15 +132,22 @@ 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
self.__change_callbacks = []
# These hold the version numbers and they will be set when loaded
self.__version = {
"format": 1,
"file": 1
}
# This will get set with a reactor.callLater whenever a config option
# is set.
self.__save_timer = None
self._save_timer = None
if defaults:
self.__config = defaults
for key, value in defaults.iteritems():
self.set_item(key, value)
# Load the config from file in the config_dir
if config_dir:
@ -77,6 +157,9 @@ class Config(object):
self.load()
def __contains__(self, item):
return item in self.__config
def __setitem__(self, key, value):
"""
See
@ -88,12 +171,14 @@ class Config(object):
def set_item(self, key, value):
"""
Sets item 'key' to 'value' in the config dictionary, but does not allow
changing the item's type unless it is None
changing the item's type unless it is None. If the types do not match,
it will attempt to convert it to the set type before raising a ValueError.
:param key: string, item to change to change
:param value: the value to change item to, must be same type as what is currently in the config
:raises ValueError: raised when the type of value is not the same as what is currently in the config
:raises ValueError: raised when the type of value is not the same as\
what is currently in the config and it could not convert the value
**Usage**
@ -103,6 +188,10 @@ class Config(object):
5
"""
if isinstance(value, basestring):
value = deluge.common.utf8_encoded(value)
if not self.__config.has_key(key):
self.__config[key] = value
log.debug("Setting '%s' to %s of %s", key, value, type(value))
@ -116,29 +205,35 @@ class Config(object):
if value is not None and oldtype != type(None) and oldtype != newtype:
try:
value = oldtype(value)
if oldtype == unicode:
value = oldtype(value, "utf8")
else:
value = oldtype(value)
except ValueError:
log.warning("Type '%s' invalid for '%s'", newtype, key)
raise
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
from twisted.internet import reactor
try:
gobject.idle_add(self.__set_functions[key], key, value)
for func in self.__set_functions[key]:
reactor.callLater(0, func, key, value)
except KeyError:
pass
try:
gobject.idle_add(self.__change_callback, key, value)
def do_change_callbacks(key, value):
for func in self.__change_callbacks:
func(key, value)
reactor.callLater(0, do_change_callbacks, key, value)
except:
pass
# We set the save_timer for 5 seconds if not already set
if not self.__save_timer:
self.__save_timer = gobject.timeout_add(5000, self.save)
if not self._save_timer or not self._save_timer.active():
self._save_timer = reactor.callLater(5, self.save)
def __getitem__(self, key):
"""
@ -163,7 +258,13 @@ class Config(object):
5
"""
return self.__config[key]
if isinstance(self.__config[key], str):
try:
return self.__config[key].decode("utf8")
except UnicodeDecodeError:
return self.__config[key]
else:
return self.__config[key]
def register_change_callback(self, callback):
"""
@ -180,7 +281,7 @@ class Config(object):
>>> config.register_change_callback(cb)
"""
self.__change_callback = callback
self.__change_callbacks.append(callback)
def register_set_function(self, key, function, apply_now=True):
"""
@ -201,10 +302,14 @@ class Config(object):
"""
log.debug("Registering function for %s key..", key)
self.__set_functions[key] = function
if key not in self.__set_functions:
self.__set_functions[key] = []
self.__set_functions[key].append(function)
# Run the function now if apply_now is set
if apply_now:
self.__set_functions[key](key, self.__config[key])
function(key, self.__config[key])
return
def apply_all(self):
@ -224,7 +329,20 @@ class Config(object):
"""
log.debug("Calling all set functions..")
for key, value in self.__set_functions.iteritems():
value(key, self.__config[key])
for func in value:
func(key, self.__config[key])
def apply_set_functions(self, key):
"""
Calls set functions for `:param:key`.
:param key: str, the config key
"""
log.debug("Calling set functions for key %s..", key)
if key in self.__set_functions:
for func in self.__set_functions[key]:
func(key, self.__config[key])
def load(self, filename=None):
"""
@ -236,18 +354,49 @@ class Config(object):
"""
if not filename:
filename = self.__config_file
try:
self.__config.update(pickle.load(open(filename, "rb")))
except Exception, e:
log.warning("Unable to load config file: %s", filename)
log.debug("Config %s loaded: %s", filename, self.__config)
try:
data = open(filename, "rb").read()
except IOError, e:
log.warning("Unable to open config file %s: %s", filename, e)
return
objects = find_json_objects(data)
if not len(objects):
# No json objects found, try depickling it
try:
self.__config.update(pickle.loads(data))
except Exception, e:
log.exception(e)
log.warning("Unable to load config file: %s", filename)
elif len(objects) == 1:
start, end = objects[0]
try:
self.__config.update(json.loads(data[start:end]))
except Exception, e:
log.exception(e)
log.warning("Unable to load config file: %s", filename)
elif len(objects) == 2:
try:
start, end = objects[0]
self.__version.update(json.loads(data[start:end]))
start, end = objects[1]
self.__config.update(json.loads(data[start:end]))
except Exception, e:
log.exception(e)
log.warning("Unable to load config file: %s", filename)
log.debug("Config %s version: %s.%s loaded: %s", filename,
self.__version["format"], self.__version["file"], self.__config)
def save(self, filename=None):
"""
Save configuration to disk
:param filename: if None, uses filename set in object initiliazation
:rtype bool:
:return: whether or not the save succeeded.
"""
if not filename:
@ -255,21 +404,39 @@ class Config(object):
# Check to see if the current config differs from the one on disk
# We will only write a new config file if there is a difference
try:
if self.__config == pickle.load(open(filename, "rb")):
data = open(filename, "rb").read()
objects = find_json_objects(data)
start, end = objects[0]
version = json.loads(data[start:end])
start, end = objects[1]
loaded_data = json.loads(data[start:end])
if self.__config == loaded_data and self.__version == version:
# The config has not changed so lets just return
self.__save_timer = None
return
except Exception, e:
log.warning("Unable to open config file: %s", filename)
self.__save_timer = None
if self._save_timer and self._save_timer.active():
self._save_timer.cancel()
return True
except (IOError, IndexError), e:
log.warning("Unable to open config file: %s because: %s", filename, e)
# 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"))
except Exception, e:
f = open(filename + ".new", "wb")
json.dump(self.__version, f, indent=2)
json.dump(self.__config, f, indent=2)
f.flush()
os.fsync(f.fileno())
f.close()
except IOError, e:
log.error("Error writing new config file: %s", e)
return
return False
# 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.warning("Unable to backup old config...")
# The new config file has been written successfully, so let's move it over
# the existing one.
@ -278,8 +445,50 @@ class Config(object):
shutil.move(filename + ".new", filename)
except Exception, e:
log.error("Error moving new config file: %s", e)
return False
else:
return True
finally:
if self._save_timer and self._save_timer.active():
self._save_timer.cancel()
def run_converter(self, input_range, output_version, func):
"""
Runs a function that will convert file versions in the `:param:input_range`
to the `:param:output_version`.
:param input_range: tuple, (int, int) the range of input versions this
function will accept
:param output_version: int, the version this function will return
:param func: func, the function that will do the conversion, it will take
the config dict as an argument and return the augmented dict
:raises ValueError: if the output_version is less than the input_range
"""
if output_version in input_range or output_version <= max(input_range):
raise ValueError("output_version needs to be greater than input_range")
if self.__version["file"] not in input_range:
log.debug("File version %s is not in input_range %s, ignoring converter function..",
self.__version["file"], input_range)
return
try:
self.__config = func(self.__config)
except Exception, e:
log.exception(e)
log.error("There was an exception try to convert config file %s %s to %s",
self.__config_file, self.__version["file"], output_version)
raise e
else:
self.__version["file"] = output_version
self.save()
@property
def config_file(self):
return self.__config_file
@prop
def config():
"""The config dictionary"""

View File

@ -19,13 +19,21 @@
# 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 gobject
import os
import os.path
import deluge.common
from deluge.log import LOG as log
@ -35,27 +43,51 @@ class _ConfigManager:
def __init__(self):
log.debug("ConfigManager started..")
self.config_files = {}
self.config_directory = deluge.common.get_default_config_dir()
# Set a 5 minute timer to call save()
gobject.timeout_add(300000, self.save)
self.__config_directory = None
@property
def config_directory(self):
if self.__config_directory is None:
self.__config_directory = deluge.common.get_default_config_dir()
return self.__config_directory
def __del__(self):
log.debug("ConfigManager stopping..")
del self.config_files
def set_config_dir(self, directory):
"""Sets the config directory"""
if directory == None:
return
"""
Sets the config directory.
:param directory: str, the directory where the config info should be
:returns bool: True if successfully changed directory, False if not
"""
if not directory:
return False
log.info("Setting config directory to: %s", directory)
if not os.path.exists(directory):
# Try to create the config folder if it doesn't exist
try:
os.makedirs(directory)
except Exception, e:
log.warning("Unable to make config directory: %s", e)
log.error("Unable to make config directory: %s", e)
return False
elif not os.path.isdir(directory):
log.error("Config directory needs to be a directory!")
return False
self.config_directory = directory
self.__config_directory = directory
# Reset the config_files so we don't get config from old config folder
# XXX: Probably should have it go through the config_files dict and try
# to reload based on the new config directory
self.save()
self.config_files = {}
return True
def get_config_dir(self):
return self.config_directory
@ -69,8 +101,8 @@ class _ConfigManager:
def save(self):
"""Saves all the configs to disk."""
for key in self.config_files.keys():
self.config_files[key].save()
for value in self.config_files.values():
value.save()
# We need to return True to keep the timer active
return True

View File

@ -1,7 +1,7 @@
#
# alertmanager.py
#
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
@ -19,54 +19,74 @@
# 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.
#
"""
"""The AlertManager handles all the libtorrent alerts."""
The AlertManager handles all the libtorrent alerts.
import gobject
This should typically only be used by the Core. Plugins should utilize the
`:mod:EventManager` for similar functionality.
"""
from twisted.internet import reactor
import deluge.component as component
try:
import deluge.libtorrent as lt
except ImportError:
import libtorrent as lt
if not (lt.version_major == 0 and lt.version_minor == 14):
raise ImportError("This version of Deluge requires libtorrent 0.14!")
from deluge._libtorrent import lt
from deluge.log import LOG as log
class AlertManager(component.Component):
def __init__(self, session):
def __init__(self):
log.debug("AlertManager initialized..")
component.Component.__init__(self, "AlertManager", interval=50)
self.session = session
component.Component.__init__(self, "AlertManager", interval=0.05)
self.session = component.get("Core").session
self.session.set_alert_mask(
lt.alert.category_t.error_notification |
lt.alert.category_t.port_mapping_notification |
lt.alert.category_t.storage_notification |
lt.alert.category_t.tracker_notification |
lt.alert.category_t.status_notification |
lt.alert.category_t.ip_block_notification)
lt.alert.category_t.ip_block_notification |
lt.alert.category_t.performance_warning)
# handlers is a dictionary of lists {"alert_type": [handler1,h2,..]}
self.handlers = {}
self.delayed_calls = []
def update(self):
self.delayed_calls = [dc for dc in self.delayed_calls if dc.active()]
self.handle_alerts()
def shutdown(self):
del self.session
del self.handlers
def stop(self):
for dc in self.delayed_calls:
dc.cancel()
self.delayed_calls = []
def register_handler(self, alert_type, handler):
"""Registers a function that will be called when 'alert_type' is pop'd
in handle_alerts. The handler function should look like:
handler(alert)
Where 'alert' is the actual alert object from libtorrent
"""
if alert_type not in self.handlers.keys():
Registers a function that will be called when 'alert_type' is pop'd
in handle_alerts. The handler function should look like: handler(alert)
Where 'alert' is the actual alert object from libtorrent.
:param alert_type: str, this is string representation of the alert name
:param handler: func(alert), the function to be called when the alert is raised
"""
if alert_type not in self.handlers:
# There is no entry for this alert type yet, so lets make it with an
# empty list.
self.handlers[alert_type] = []
@ -76,32 +96,37 @@ class AlertManager(component.Component):
log.debug("Registered handler for alert %s", alert_type)
def deregister_handler(self, handler):
"""De-registers the 'handler' function from all alert types."""
"""
De-registers the `:param:handler` function from all alert types.
:param handler: func, the handler function to deregister
"""
# Iterate through all handlers and remove 'handler' where found
for (key, value) in self.handlers:
for (key, value) in self.handlers.items():
if handler in value:
# Handler is in this alert type list
value.remove(handler)
def handle_alerts(self, wait=False):
"""Pops all libtorrent alerts in the session queue and handles them
appropriately."""
"""
Pops all libtorrent alerts in the session queue and handles them
appropriately.
:param wait: bool, if True then the handler functions will be run right
away and waited to return before processing the next alert
"""
alert = self.session.pop_alert()
# Loop through all alerts in the queue
while alert is not None:
# Loop through all alerts in the queue
# Do some magic to get the alert type as a string
alert_type = str(type(alert)).split("'")[1].split(".")[-1]
alert_type = type(alert).__name__
# Display the alert message
log.debug("%s: %s", alert_type, alert.message())
# Call any handlers for this alert type
if alert_type in self.handlers.keys():
if alert_type in self.handlers:
for handler in self.handlers[alert_type]:
if not wait:
gobject.idle_add(handler, alert)
self.delayed_calls.append(reactor.callLater(0, handler, alert))
else:
handler(alert)
alert = self.session.pop_alert()
# Return True so that the timer continues
return True

View File

@ -1,7 +1,7 @@
#
# authmanager.py
#
# Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
@ -19,26 +19,50 @@
# 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
import os
import random
import stat
import deluge.component as component
import deluge.configmanager as configmanager
import deluge.error
from deluge.log import LOG as log
AUTH_LEVEL_NONE = 0
AUTH_LEVEL_READONLY = 1
AUTH_LEVEL_NORMAL = 5
AUTH_LEVEL_ADMIN = 10
AUTH_LEVEL_DEFAULT = AUTH_LEVEL_NORMAL
class BadLoginError(deluge.error.DelugeError):
pass
class AuthManager(component.Component):
def __init__(self):
component.Component.__init__(self, "AuthManager")
self.auth = {}
self.__auth = {}
def start(self):
self.__load_auth_file()
def stop(self):
self.auth = {}
self.__auth = {}
def shutdown(self):
pass
@ -49,43 +73,74 @@ class AuthManager(component.Component):
:param username: str, username
:param password: str, password
:returns: True or False
:rtype: bool
:returns: int, the auth level for this user
:rtype: int
:raises BadLoginError: if the username does not exist or password does not match
"""
if username not in self.auth:
if username not in self.__auth:
# Let's try to re-load the file.. Maybe it's been updated
self.__load_auth_file()
if username not in self.auth:
return False
if username not in self.__auth:
raise BadLoginError("Username does not exist")
if self.auth[username] == password:
return True
if self.__auth[username][0] == password:
# Return the users auth level
return int(self.__auth[username][1])
else:
raise BadLoginError("Password does not match")
return False
def __create_localclient_account(self):
"""
Returns the string.
"""
# We create a 'localclient' account with a random password
try:
from hashlib import sha1 as sha_hash
except ImportError:
from sha import new as sha_hash
return "localclient:" + sha_hash(str(random.random())).hexdigest() + ":" + str(AUTH_LEVEL_ADMIN) + "\n"
def __load_auth_file(self):
auth_file = configmanager.get_config_dir("auth")
# Check for auth file and create if necessary
if not os.path.exists(auth_file):
# We create a 'localclient' account with a random password
try:
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())
localclient = self.__create_localclient_account()
fd = open(auth_file, "w")
fd.write(localclient)
fd.flush()
os.fsync(fd.fileno())
fd.close()
# Change the permissions on the file so only this user can read/write it
os.chmod(auth_file, stat.S_IREAD | stat.S_IWRITE)
f = [localclient]
else:
# Load the auth file into a dictionary: {username: password, ...}
f = open(auth_file, "r").readlines()
# Load the auth file into a dictionary: {username: password, ...}
f = open(auth_file, "r")
for line in f:
if line.startswith("#"):
# This is a comment line
line = line.strip()
if line.startswith("#") or not line:
# This line is a comment or empty
continue
try:
username, password = line.split(":")
except ValueError:
lsplit = line.split(":")
except Exception, e:
log.error("Your auth file is malformed: %s", e)
continue
self.auth[username.strip()] = password.strip()
if len(lsplit) == 2:
username, password = lsplit
log.warning("Your auth entry for %s contains no auth level, using AUTH_LEVEL_DEFAULT(%s)..", username, AUTH_LEVEL_DEFAULT)
level = AUTH_LEVEL_DEFAULT
elif len(lsplit) == 3:
username, password, level = lsplit
else:
log.error("Your auth file is malformed: Incorrect number of fields!")
continue
self.__auth[username.strip()] = (password.strip(), level)
if "localclient" not in self.__auth:
open(auth_file, "a").write(self.__create_localclient_account())

View File

@ -19,18 +19,24 @@
# 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
try:
import deluge.libtorrent as lt
except ImportError:
import libtorrent as lt
if not (lt.version_major == 0 and lt.version_minor == 14):
raise ImportError("This version of Deluge requires libtorrent 0.14!")
from deluge._libtorrent import lt
import deluge.component as component
from deluge.configmanager import ConfigManager
@ -40,7 +46,7 @@ MAX_NUM_ATTEMPTS = 10
class AutoAdd(component.Component):
def __init__(self):
component.Component.__init__(self, "AutoAdd", depend=["TorrentManager"], interval=5000)
component.Component.__init__(self, "AutoAdd", depend=["TorrentManager"], interval=5)
# Get the core config
self.config = ConfigManager("core.conf")
@ -62,14 +68,18 @@ class AutoAdd(component.Component):
return
# Check the auto add folder for new torrents to add
if not os.path.exists(self.config["autoadd_location"]):
if not os.path.isdir(self.config["autoadd_location"]):
log.warning("Invalid AutoAdd folder: %s", self.config["autoadd_location"])
component.pause("AutoAdd")
return
for filename in os.listdir(self.config["autoadd_location"]):
if filename.split(".")[-1] == "torrent":
try:
filepath = os.path.join(self.config["autoadd_location"], filename)
except UnicodeDecodeError, e:
log.error("Unable to auto add torrent due to improper filename encoding: %s", e)
continue
if os.path.isfile(filepath) and filename.endswith(".torrent"):
try:
filedump = self.load_torrent(filepath)
except (RuntimeError, Exception), e:

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#
# daemon.py
#
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
@ -19,27 +19,187 @@
# 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
import gettext
import locale
import pkg_resources
from twisted.internet import reactor
import twisted.internet.error
import deluge.component as component
import deluge.configmanager
import deluge.common
from deluge.core.rpcserver import RPCServer, export
from deluge.log import LOG as log
import deluge.error
class Daemon(object):
def __init__(self, options=None, args=None, classic=False):
# Check for another running instance of the daemon
if os.path.isfile(deluge.configmanager.get_config_dir("deluged.pid")):
# Get the PID and the port of the supposedly running daemon
try:
(pid, port) = open(deluge.configmanager.get_config_dir("deluged.pid")).read().strip().split(";")
pid = int(pid)
port = int(port)
except ValueError:
pid = None
port = None
def process_running(pid):
if deluge.common.windows_check():
import win32process
return pid in win32process.EnumProcesses()
else:
# We can just use os.kill on UNIX to test if the process is running
try:
os.kill(pid, 0)
except OSError:
return False
else:
return True
if pid is not None and process_running(pid):
# Ok, so a process is running with this PID, let's make doubly-sure
# it's a deluged process by trying to open a socket to it's port.
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect(("127.0.0.1", port))
except socket.error:
# Can't connect, so it must not be a deluged process..
pass
else:
# This is a deluged!
s.close()
raise deluge.error.DaemonRunningError("There is a deluge daemon running with this config directory!")
# Initialize gettext
try:
locale.setlocale(locale.LC_ALL, '')
if hasattr(locale, "bindtextdomain"):
locale.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
if hasattr(locale, "textdomain"):
locale.textdomain("deluge")
gettext.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
gettext.textdomain("deluge")
gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n"))
except Exception, e:
log.error("Unable to initialize gettext/locale: %s", e)
import __builtin__
__builtin__.__dict__["_"] = lambda x: x
# Twisted catches signals to terminate, so just have it call the shutdown
# method.
reactor.addSystemEventTrigger("before", "shutdown", self._shutdown)
# Catch some Windows specific signals
if deluge.common.windows_check():
from win32api import SetConsoleCtrlHandler
from win32con import CTRL_CLOSE_EVENT
from win32con import CTRL_SHUTDOWN_EVENT
def win_handler(ctrl_type):
log.debug("ctrl_type: %s", ctrl_type)
if ctrl_type == CTRL_CLOSE_EVENT or ctrl_type == CTRL_SHUTDOWN_EVENT:
self._shutdown()
return 1
SetConsoleCtrlHandler(win_handler)
class Daemon:
def __init__(self, options, args):
version = deluge.common.get_version()
if deluge.common.get_revision() != "":
version = version + "r" + deluge.common.get_revision()
log.info("Deluge daemon %s", version)
log.debug("options: %s", options)
log.debug("args: %s", args)
# Set the config directory
deluge.configmanager.set_config_dir(options.config)
if options and options.config:
deluge.configmanager.set_config_dir(options.config)
if options and options.listen_interface:
listen_interface = options.listen_interface
else:
listen_interface = ""
from deluge.core.core import Core
# Start the core as a thread and join it until it's done
self.core = Core(options.port).run()
self.core = Core(listen_interface=listen_interface)
port = self.core.config["daemon_port"]
if options and options.port:
port = options.port
if options and options.ui_interface:
interface = options.ui_interface
else:
interface = ""
self.rpcserver = RPCServer(
port=port,
allow_remote=self.core.config["allow_remote"],
listen=not classic,
interface=interface
)
# Register the daemon and the core RPCs
self.rpcserver.register_object(self.core)
self.rpcserver.register_object(self)
# Make sure we start the PreferencesManager first
component.start("PreferencesManager")
if not classic:
# Write out a pid file all the time, we use this to see if a deluged is running
# We also include the running port number to do an additional test
open(deluge.configmanager.get_config_dir("deluged.pid"), "wb").write(
"%s;%s\n" % (os.getpid(), port))
component.start()
try:
reactor.run()
finally:
self._shutdown()
@export()
def shutdown(self, *args, **kwargs):
reactor.callLater(0, reactor.stop)
def _shutdown(self, *args, **kwargs):
if os.path.exists(deluge.configmanager.get_config_dir("deluged.pid")):
try:
os.remove(deluge.configmanager.get_config_dir("deluged.pid"))
except Exception, e:
log.exception(e)
log.error("Error removing deluged.pid!")
log.info("Waiting for components to shutdown..")
d = component.shutdown()
return d
@export()
def info(self):
"""
Returns some info from the daemon.
:returns: str, the version number
"""
return deluge.common.get_version()
@export()
def get_method_list(self):
"""
Returns a list of the exported methods.
"""
return self.rpcserver.get_method_list()

View File

@ -0,0 +1,84 @@
#
# eventmanager.py
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may 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.
#
# deluge 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 deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# 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 deluge.component as component
from deluge.log import LOG as log
class EventManager(component.Component):
def __init__(self):
component.Component.__init__(self, "EventManager")
self.handlers = {}
def emit(self, event):
"""
Emits the event to interested clients.
:param event: DelugeEvent
"""
# Emit the event to the interested clients
component.get("RPCServer").emit_event(event)
# Call any handlers for the event
if event.name in self.handlers:
for handler in self.handlers[event.name]:
#log.debug("Running handler %s for event %s with args: %s", event.name, handler, event.args)
try:
handler(*event.args)
except Exception, e:
log.error("Event handler %s failed in %s with exception %s", event.name, handler, e)
def register_event_handler(self, event, handler):
"""
Registers a function to be called when a `:param:event` is emitted.
:param event: str, the event name
:param handler: function, to be called when `:param:event` is emitted
"""
if event not in self.handlers:
self.handlers[event] = []
if handler not in self.handlers[event]:
self.handlers[event].append(handler)
def deregister_event_handler(self, event, handler):
"""
Deregisters an event handler function.
:param event: str, the event name
:param handler: function, currently registered to handle `:param:event`
"""
if event in self.handlers and handler in self.handlers[event]:
self.handlers[event].remove(handler)

View File

@ -19,7 +19,18 @@
# 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.
#
#
@ -66,6 +77,24 @@ def filter_one_keyword(torrent_ids, keyword):
yield torrent_id
break
def tracker_error_filter(torrent_ids, values):
filtered_torrent_ids = []
tm = component.get("TorrentManager")
# If this is a tracker_host, then we need to filter on it
if values[0] != "Error":
for torrent_id in torrent_ids:
if values[0] == tm[torrent_id].get_status(["tracker_host"])["tracker_host"]:
filtered_torrent_ids.append(torrent_id)
return filtered_torrent_ids
# Check all the torrent's tracker_status for 'Error:' and only return torrent_ids
# that have this substring in their tracker_status
for torrent_id in torrent_ids:
if _("Error") + ":" in tm[torrent_id].get_status(["tracker_status"])["tracker_status"]:
filtered_torrent_ids.append(torrent_id)
return filtered_torrent_ids
class FilterManager(component.Component):
"""FilterManager
@ -75,13 +104,17 @@ class FilterManager(component.Component):
component.Component.__init__(self, "FilterManager")
log.debug("FilterManager init..")
self.core = core
self.torrents = core.torrents
self.torrents = core.torrentmanager
self.registered_filters = {}
self.register_filter("keyword", filter_keywords)
self.tree_fields = {}
self.register_tree_field("state", self._init_state_tree)
self.register_tree_field("tracker_host")
def _init_tracker_tree():
return {"Error": 0}
self.register_tree_field("tracker_host", _init_tracker_tree)
self.register_filter("tracker_host", tracker_error_filter)
def filter_torrent_ids(self, filter_dict):
"""
@ -93,12 +126,11 @@ class FilterManager(component.Component):
#sanitize input: filter-value must be a list of strings
for key, value in filter_dict.items():
if isinstance(value, str):
filter_dict[key] = [value]
if isinstance(value, basestring):
filter_dict[key] = [value]
if "id"in filter_dict: #optimized filter for id:
torrent_ids = filter_dict["id"]
if "id" in filter_dict: #optimized filter for id:
torrent_ids = list(filter_dict["id"])
del filter_dict["id"]
else:
torrent_ids = self.torrents.get_torrent_list()
@ -107,6 +139,10 @@ class FilterManager(component.Component):
return torrent_ids
#special purpose: state=Active.
if "state" in filter_dict:
# We need to make sure this is a list for the logic below
filter_dict["state"] = list(filter_dict["state"])
if "state" in filter_dict and "Active" in filter_dict["state"]:
filter_dict["state"].remove("Active")
if not filter_dict["state"]:
@ -129,7 +165,7 @@ class FilterManager(component.Component):
#leftover filter arguments:
#default filter on status fields.
status_func = self.core.export_get_torrent_status #premature optimalisation..
status_func = self.core.get_torrent_status #premature optimalisation..
for torrent_id in list(torrent_ids):
status = status_func(torrent_id, filter_dict.keys()) #status={key:value}
for field, values in filter_dict.iteritems():
@ -144,7 +180,7 @@ class FilterManager(component.Component):
for use in sidebar.
"""
torrent_ids = self.torrents.get_torrent_list()
status_func = self.core.export_get_torrent_status #premature optimalisation..
status_func = self.core.get_torrent_status #premature optimalisation..
tree_keys = list(self.tree_fields.keys())
if hide_cat:
for cat in hide_cat:
@ -159,6 +195,10 @@ class FilterManager(component.Component):
value = status[field]
items[field][value] = items[field].get(value, 0) + 1
if "tracker_host" in items:
items["tracker_host"]["All"] = len(torrent_ids)
items["tracker_host"]["Error"] = len(tracker_error_filter(torrent_ids, ("Error",)))
if "state" in tree_keys and not show_zero_hits:
self._hide_state_items(items["state"])
@ -193,10 +233,11 @@ class FilterManager(component.Component):
self.tree_fields[field] = init_func
def deregister_tree_field(self, field):
del self.tree_fields[field]
if field in self.tree_fields:
del self.tree_fields[field]
def filter_state_active(self, torrent_ids):
get_status = self.core.export_get_torrent_status
get_status = self.core.get_torrent_status
for torrent_id in list(torrent_ids):
status = get_status(torrent_id, ["download_payload_rate", "upload_payload_rate"])
if status["download_payload_rate"] or status["upload_payload_rate"]:
@ -223,6 +264,3 @@ class FilterManager(component.Component):
iy = 99
return ix - iy

View File

@ -19,7 +19,18 @@
# 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.
#
#
@ -29,14 +40,9 @@ import pickle
import cPickle
import shutil
try:
import deluge.libtorrent as lt
except ImportError:
import libtorrent as lt
if not (lt.version_major == 0 and lt.version_minor == 14):
raise ImportError("This version of Deluge requires libtorrent 0.14!")
from deluge._libtorrent import lt
from deluge.configmanager import ConfigManager
from deluge.configmanager import ConfigManager, get_config_dir
import deluge.core.torrentmanager
from deluge.log import LOG as log
@ -63,8 +69,8 @@ class PickleUpgrader(pickle.Unpickler):
class OldStateUpgrader:
def __init__(self):
self.config = ConfigManager("core.conf")
self.state05_location = os.path.join(self.config["config_location"], "persistent.state")
self.state10_location = os.path.join(self.config["state_location"], "torrents.state")
self.state05_location = os.path.join(get_config_dir(), "persistent.state")
self.state10_location = os.path.join(get_config_dir(), "state", "torrents.state")
if os.path.exists(self.state05_location) and not os.path.exists(self.state10_location):
# If the 0.5 state file exists and the 1.0 doesn't, then let's upgrade it
self.upgrade05()
@ -76,9 +82,14 @@ 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)
torrent_path = os.path.join(get_config_dir(), "torrentfiles", ti.filename)
try:
torrent_info = None
log.debug("Attempting to create torrent_info from %s", torrent_path)
@ -86,11 +97,11 @@ class OldStateUpgrader:
torrent_info = lt.torrent_info(lt.bdecode(_file.read()))
_file.close()
except (IOError, RuntimeError), e:
log.warning("Unable to open %s: %s", filepath, e)
log.warning("Unable to open %s: %s", torrent_path, e)
# Copy the torrent file to the new location
import shutil
shutil.copyfile(torrent_path, os.path.join(self.config["state_location"], str(torrent_info.info_hash()) + ".torrent"))
shutil.copyfile(torrent_path, os.path.join(get_config_dir(), "state", str(torrent_info.info_hash()) + ".torrent"))
# Set the file prioritiy property if not already there
if not hasattr(ti, "priorities"):
@ -116,7 +127,7 @@ class OldStateUpgrader:
try:
log.debug("Saving torrent state file.")
state_file = open(
os.path.join(self.config["state_location"], "torrents.state"), "wb")
os.path.join(get_config_dir(), "state", "torrents.state"), "wb")
cPickle.dump(new_state, state_file)
state_file.close()
except IOError, e:

View File

@ -19,14 +19,27 @@
# 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.
#
#
"""PluginManager for Core"""
import gobject
from twisted.internet import reactor
from twisted.internet.task import LoopingCall
from deluge.event import PluginEnabledEvent, PluginDisabledEvent
import deluge.pluginmanagerbase
import deluge.component as component
from deluge.log import LOG as log
@ -37,14 +50,7 @@ class PluginManager(deluge.pluginmanagerbase.PluginManagerBase,
functions to access parts of the core."""
def __init__(self, core):
component.Component.__init__(self, "PluginManager")
self.core = core
# Set up the hooks dictionary
self.hooks = {
"post_torrent_add": [],
"post_torrent_remove": [],
"post_session_load": []
}
component.Component.__init__(self, "CorePluginManager")
self.status_fields = {}
@ -56,29 +62,42 @@ class PluginManager(deluge.pluginmanagerbase.PluginManagerBase,
# Enable plugins that are enabled in the config
self.enable_plugins()
# Set update timer to call update() in plugins every second
self.update_timer = gobject.timeout_add(1000, self.update_plugins)
def stop(self):
# Disable all enabled plugins
self.disable_plugins()
# Stop the update timer
gobject.source_remove(self.update_timer)
def shutdown(self):
self.stop()
def update_plugins(self):
for plugin in self.plugins.keys():
try:
self.plugins[plugin].update()
except AttributeError:
# We don't care if this doesn't work
pass
if hasattr(self.plugins[plugin], "update"):
try:
self.plugins[plugin].update()
except Exception, e:
log.exception(e)
def get_core(self):
"""Returns a reference to the core"""
return self.core
def enable_plugin(self, name):
if name not in self.plugins:
super(PluginManager, self).enable_plugin(name)
if name in self.plugins:
component.get("EventManager").emit(PluginEnabledEvent(name))
def disable_plugin(self, name):
if name in self.plugins:
super(PluginManager, self).disable_plugin(name)
if name not in self.plugins:
component.get("EventManager").emit(PluginDisabledEvent(name))
def get_status(self, torrent_id, fields):
"""Return the value of status fields for the selected torrent_id."""
status = {}
for field in fields:
try:
status[field] = self.status_fields[field](torrent_id)
except KeyError:
pass
return status
def register_status_field(self, field, function):
"""Register a new status field. This can be used in the same way the
@ -93,62 +112,3 @@ class PluginManager(deluge.pluginmanagerbase.PluginManagerBase,
del self.status_fields[field]
except:
log.warning("Unable to deregister status field %s", field)
def get_status(self, torrent_id, fields):
"""Return the value of status fields for the selected torrent_id."""
status = {}
for field in fields:
try:
status[field] = self.status_fields[field](torrent_id)
except KeyError:
log.warning("Status field %s is not registered with the\
PluginManager.", field)
return status
def register_hook(self, hook, function):
"""Register a hook function with the plugin manager"""
try:
self.hooks[hook].append(function)
except KeyError:
log.warning("Plugin attempting to register invalid hook.")
def deregister_hook(self, hook, function):
"""Deregisters a hook function"""
try:
self.hooks[hook].remove(function)
except:
log.warning("Unable to deregister hook %s", hook)
def run_post_torrent_add(self, torrent_id):
"""This hook is run after a torrent has been added to the session."""
log.debug("run_post_torrent_add")
for function in self.hooks["post_torrent_add"]:
function(torrent_id)
def run_post_torrent_remove(self, torrent_id):
"""This hook is run after a torrent has been removed from the session.
"""
log.debug("run_post_torrent_remove")
for function in self.hooks["post_torrent_remove"]:
function(torrent_id)
def run_post_session_load(self):
"""This hook is run after all the torrents have been loaded into the
session from the saved state. It is called prior to resuming the
torrents and they all will have a 'Paused' state."""
log.debug("run_post_session_load")
for function in self.hooks["post_session_load"]:
function()
def get_torrent_list(self):
"""Returns a list of torrent_id's in the current session."""
return component.get("TorrentManager").get_torrent_list()
def block_ip_range(self, range):
"""Blocks the ip range in the core"""
return self.core.export_block_ip_range(range)
def reset_ip_filter(self):
"""Resets the ip filter"""
return self.core.export_reset_ip_filter()

View File

@ -19,28 +19,36 @@
# 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
import threading
import gobject
import pkg_resources
from twisted.internet import reactor
from twisted.internet.task import LoopingCall
try:
import deluge.libtorrent as lt
except ImportError:
import libtorrent as lt
if not (lt.version_major == 0 and lt.version_minor == 14):
raise ImportError("This version of Deluge requires libtorrent 0.14!")
from deluge._libtorrent import lt
from deluge.event import *
import deluge.configmanager
import deluge.common
import deluge.component as component
from deluge.log import LOG as log
DEFAULT_PREFS = {
"config_location": deluge.configmanager.get_config_dir(),
"send_info": False,
"info_sent": 0.0,
"daemon_port": 58846,
@ -48,10 +56,11 @@ DEFAULT_PREFS = {
"compact_allocation": False,
"download_location": deluge.common.get_default_download_dir(),
"listen_ports": [6881, 6891],
"listen_interface": "",
"copy_torrent_file": False,
"del_copy_torrent_file": False,
"torrentfiles_location": deluge.common.get_default_download_dir(),
"plugins_location": os.path.join(deluge.configmanager.get_config_dir(), "plugins"),
"state_location": os.path.join(deluge.configmanager.get_config_dir(), "state"),
"prioritize_first_last_pieces": False,
"random_port": True,
"dht": True,
@ -68,7 +77,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,
@ -128,7 +137,10 @@ DEFAULT_PREFS = {
"outgoing_ports": [0, 0],
"random_outgoing_ports": True,
"peer_tos": "0x00",
"rate_limit_ip_overhead": True
"rate_limit_ip_overhead": True,
"geoip_db_location": "/usr/share/GeoIP/GeoIP.dat",
"cache_size": 512,
"cache_expiry": 60
}
class PreferencesManager(component.Component):
@ -140,16 +152,14 @@ class PreferencesManager(component.Component):
def start(self):
self.core = component.get("Core")
self.session = component.get("Core").session
self.settings = component.get("Core").settings
self.signals = component.get("SignalManager")
# Register set functions in the Config
self.config.register_set_function("torrentfiles_location",
self._on_set_torrentfiles_location)
self.config.register_set_function("state_location",
self._on_set_state_location)
self.config.register_set_function("listen_ports",
self._on_set_listen_ports)
self.config.register_set_function("listen_interface",
self._on_set_listen_interface)
self.config.register_set_function("random_port",
self._on_set_random_port)
self.config.register_set_function("outgoing_ports",
@ -208,12 +218,27 @@ class PreferencesManager(component.Component):
self._on_new_release_check)
self.config.register_set_function("rate_limit_ip_overhead",
self._on_rate_limit_ip_overhead)
self.config.register_set_function("geoip_db_location",
self._on_geoip_db_location)
self.config.register_set_function("cache_size",
self._on_cache_size)
self.config.register_set_function("cache_expiry",
self._on_cache_expiry)
self.config.register_change_callback(self._on_config_value_change)
def stop(self):
if self.new_release_timer and self.new_release_timer.running:
self.new_release_timer.stop()
# Config set functions
def session_set_setting(self, key, value):
settings = self.session.settings()
setattr(settings, key, value)
self.session.set_settings(settings)
def _on_config_value_change(self, key, value):
self.signals.emit("config_value_changed", key, value)
component.get("EventManager").emit(ConfigValueChangedEvent(key, value))
def _on_set_torrentfiles_location(self, key, value):
if self.config["copy_torrent_file"]:
@ -222,18 +247,15 @@ class PreferencesManager(component.Component):
except Exception, e:
log.debug("Unable to make directory: %s", e)
def _on_set_state_location(self, key, value):
if not os.access(value, os.F_OK):
try:
os.makedirs(value)
except Exception, e:
log.debug("Unable to make directory: %s", e)
def _on_set_listen_ports(self, key, value):
# Only set the listen ports if random_port is not true
if self.config["random_port"] is not True:
log.debug("listen port range set to %s-%s", value[0], value[1])
self.session.listen_on(value[0], value[1])
self.session.listen_on(value[0], value[1], str(self.config["listen_interface"]))
def _on_set_listen_interface(self, key, value):
# Call the random_port callback since it'll do what we need
self._on_set_random_port("random_port", self.config["random_port"])
def _on_set_random_port(self, key, value):
log.debug("random port value set to %s", value)
@ -251,12 +273,12 @@ class PreferencesManager(component.Component):
# Set the listen ports
log.debug("listen port range set to %s-%s", listen_ports[0],
listen_ports[1])
self.session.listen_on(listen_ports[0], listen_ports[1])
self.session.listen_on(listen_ports[0], listen_ports[1], str(self.config["listen_interface"]))
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.session_set_setting("outgoing_ports", (value[0], value[1]))
def _on_set_random_outgoing_ports(self, key, value):
if value:
@ -265,16 +287,14 @@ 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.session_set_setting("peer_tos", chr(int(value, 16)))
except ValueError, e:
log.debug("Invalid tos byte: %s", e)
return
self.session.set_settings(self.settings)
def _on_set_dht(self, key, value):
log.debug("dht value set to %s", value)
state_file = deluge.common.get_default_config_dir("dht.state")
state_file = deluge.configmanager.get_config_dir("dht.state")
if value:
state = None
try:
@ -318,7 +338,10 @@ class PreferencesManager(component.Component):
def _on_set_utpex(self, key, value):
log.debug("utpex value set to %s", value)
if value:
self.session.add_extension(lt.create_ut_pex_plugin)
# Note: All libtorrent python bindings to set plugins/extensions need to be disabled
# due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
#self.session.add_extension(lt.create_ut_pex_plugin)
pass
def _on_set_encryption(self, key, value):
log.debug("encryption value %s set to %s..", key, value)
@ -368,51 +391,39 @@ class PreferencesManager(component.Component):
self.session.set_max_half_open_connections(value)
def _on_set_max_connections_per_second(self, key, value):
self.settings.connection_speed = value
self.session.set_settings(self.settings)
self.session_set_setting("connection_speed", value)
def _on_ignore_limits_on_local_network(self, key, value):
self.settings.ignore_limits_on_local_network = value
self.session.set_settings(self.settings)
self.session_set_setting("ignore_limits_on_local_network", value)
def _on_set_share_ratio_limit(self, key, value):
log.debug("%s set to %s..", key, value)
self.settings.share_ratio_limit = value
self.session.set_settings(self.settings)
self.session_set_setting("share_ratio_limit", value)
def _on_set_seed_time_ratio_limit(self, key, value):
log.debug("%s set to %s..", key, value)
self.settings.seed_time_ratio_limit = value
self.session.set_settings(self.settings)
self.session_set_setting("seed_time_ratio_limit", value)
def _on_set_seed_time_limit(self, key, value):
log.debug("%s set to %s..", key, value)
# This value is stored in minutes in deluge, but libtorrent wants seconds
self.settings.seed_time_limit = int(value * 60)
self.session.set_settings(self.settings)
self.session_set_setting("seed_time_limit", int(value * 60))
def _on_set_max_active_downloading(self, key, value):
log.debug("%s set to %s..", key, value)
log.debug("active_downloads: %s", self.settings.active_downloads)
self.settings.active_downloads = value
self.session.set_settings(self.settings)
self.session_set_setting("active_downloads", value)
def _on_set_max_active_seeding(self, key, value):
log.debug("%s set to %s..", key, value)
log.debug("active_seeds: %s", self.settings.active_seeds)
self.settings.active_seeds = value
self.session.set_settings(self.settings)
self.session_set_setting("active_seeds", value)
def _on_set_max_active_limit(self, key, value):
log.debug("%s set to %s..", key, value)
log.debug("active_limit: %s", self.settings.active_limit)
self.settings.active_limit = value
self.session.set_settings(self.settings)
self.session_set_setting("active_limit", value)
def _on_set_dont_count_slow_torrents(self, key, value):
log.debug("%s set to %s..", key, value)
self.settings.dont_count_slow_torrents = value
self.session.set_settings(self.settings)
self.session_set_setting("dont_count_slow_torrents", value)
def _on_send_info(self, key, value):
log.debug("Sending anonymous stats..")
@ -435,7 +446,7 @@ class PreferencesManager(component.Component):
platform.machine() + "&python=" + platform.python_version() \
+ "&deluge=" + deluge.common.get_version() \
+ "&os=" + platform.system() \
+ "&plugins=" + quote_plus(self.config["enabled_plugins"])
+ "&plugins=" + quote_plus(":".join(self.config["enabled_plugins"]))
urlopen(url)
except IOError, e:
log.debug("Network error while trying to send info: %s", e)
@ -448,28 +459,53 @@ class PreferencesManager(component.Component):
if value:
log.debug("Checking for new release..")
threading.Thread(target=self.core.get_new_release).start()
if self.new_release_timer:
gobject.source_remove(self.new_release_timer)
if self.new_release_timer and self.new_release_timer.running:
self.new_release_timer.stop()
# Set a timer to check for a new release every 3 days
self.new_release_timer = gobject.timeout_add(
72 * 60 * 60 * 1000, self._on_new_release_check, "new_release_check", True)
self.new_release_timer = LoopingCall(
self._on_new_release_check, "new_release_check", True)
self.new_release_timer.start(72 * 60 * 60, False)
else:
if self.new_release_timer:
gobject.source.remove(self.new_release_timer)
if self.new_release_timer and self.new_release_timer.running:
self.new_release_timer.stop()
def _on_set_proxies(self, key, value):
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.username = v["username"]
proxy_settings.password = v["password"]
proxy_settings.hostname = v["hostname"]
proxy_settings.port = v["port"]
log.debug("setting %s proxy settings", k)
getattr(self.session, "set_%s_proxy" % k)(proxy_settings)
proxy_settings = lt.proxy_settings()
proxy_settings.type = lt.proxy_type(v["type"])
proxy_settings.username = str(v["username"])
proxy_settings.password = str(v["password"])
proxy_settings.hostname = str(v["hostname"])
proxy_settings.port = v["port"]
log.debug("setting %s proxy settings", k)
getattr(self.session, "set_%s_proxy" % k)(proxy_settings)
def _on_rate_limit_ip_overhead(self, key, value):
log.debug("%s: %s", key, value)
self.settings.rate_limit_ip_overhead = value
self.session.set_settings(self.settings)
self.session_set_setting("rate_limit_ip_overhead", value)
def _on_geoip_db_location(self, key, value):
log.debug("%s: %s", key, value)
# Load the GeoIP DB for country look-ups if available
geoip_db = ""
if os.path.exists(value):
geoip_db = value
elif os.path.exists(pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat"))):
geoip_db = pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat"))
else:
log.warning("Unable to find GeoIP database file!")
if geoip_db:
try:
self.session.load_country_db(str(geoip_db))
except Exception, e:
log.error("Unable to load geoip database!")
log.exception(e)
def _on_cache_size(self, key, value):
log.debug("%s: %s", key, value)
self.session_set_setting("cache_size", value)
def _on_cache_expiry(self, key, value):
log.debug("%s: %s", key, value)
self.session_set_setting("cache_expiry", value)

View File

@ -1,7 +1,7 @@
#
# rpcserver.py
#
# Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2008,2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
@ -19,96 +19,505 @@
# 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.
#
#
"""RPCServer Module"""
import gobject
import sys
import zlib
import os
import stat
import traceback
from deluge.SimpleXMLRPCServer import SimpleXMLRPCServer
from deluge.SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
from SocketServer import ThreadingMixIn
from base64 import decodestring, encodestring
from twisted.internet.protocol import Factory, Protocol
from twisted.internet import ssl, reactor, defer
from OpenSSL import crypto, SSL
from types import FunctionType
try:
import rencode
except ImportError:
import deluge.rencode as rencode
from deluge.log import LOG as log
import deluge.component as component
import deluge.configmanager
from deluge.core.authmanager import AUTH_LEVEL_NONE, AUTH_LEVEL_DEFAULT
def export(func):
func._rpcserver_export = True
return func
RPC_RESPONSE = 1
RPC_ERROR = 2
RPC_EVENT = 3
def export(auth_level=AUTH_LEVEL_DEFAULT):
"""
Decorator function to register an object's method as an RPC. The object
will need to be registered with an :class:`RPCServer` to be effective.
:param func: the function to export
:type func: function
:param auth_level: the auth level required to call this method
:type auth_level: int
"""
def wrap(func, *args, **kwargs):
func._rpcserver_export = True
func._rpcserver_auth_level = auth_level
doc = func.__doc__
func.__doc__ = "**RPC Exported Function** (*Auth Level: %s*)\n\n" % auth_level
if doc:
func.__doc__ += doc
return func
if type(auth_level) is FunctionType:
func = auth_level
auth_level = AUTH_LEVEL_DEFAULT
return wrap(func)
else:
return wrap
def format_request(call):
"""
Format the RPCRequest message for debug printing
:param call: the request
:type call: a RPCRequest
:returns: a formatted string for printing
:rtype: str
"""
try:
s = call[1] + "("
if call[2]:
s += ", ".join([str(x) for x in call[2]])
if call[3]:
if call[2]:
s += ", "
s += ", ".join([key + "=" + str(value) for key, value in call[3].items()])
s += ")"
except UnicodeEncodeError:
return "UnicodeEncodeError, call: %s" % call
else:
return s
class DelugeError(Exception):
pass
class NotAuthorizedError(DelugeError):
pass
class ServerContextFactory(object):
def getContext(self):
"""
Create an SSL context.
This loads the servers cert/private key SSL files for use with the
SSL transport.
"""
ssl_dir = deluge.configmanager.get_config_dir("ssl")
ctx = SSL.Context(SSL.SSLv3_METHOD)
ctx.use_certificate_file(os.path.join(ssl_dir, "daemon.cert"))
ctx.use_privatekey_file(os.path.join(ssl_dir, "daemon.pkey"))
return ctx
class DelugeRPCProtocol(Protocol):
__buffer = None
def dataReceived(self, data):
"""
This method is called whenever data is received from a client. The
only message that a client sends to the server is a RPC Request message.
If the RPC Request message is valid, then the method is called in
:meth:`dispatch`.
:param data: the data from the client. It should be a zlib compressed
rencoded string.
:type data: str
"""
if self.__buffer:
# We have some data from the last dataReceived() so lets prepend it
data = self.__buffer + data
self.__buffer = None
while data:
dobj = zlib.decompressobj()
try:
request = rencode.loads(dobj.decompress(data))
except Exception, e:
#log.debug("Received possible invalid message (%r): %s", data, e)
# This could be cut-off data, so we'll save this in the buffer
# and try to prepend it on the next dataReceived()
self.__buffer = data
return
else:
data = dobj.unused_data
if type(request) is not tuple:
log.debug("Received invalid message: type is not tuple")
return
if len(request) < 1:
log.debug("Received invalid message: there are no items")
return
for call in request:
if len(call) != 4:
log.debug("Received invalid rpc request: number of items in request is %s", len(call))
continue
#log.debug("RPCRequest: %s", format_request(call))
reactor.callLater(0, self.dispatch, *call)
def sendData(self, data):
"""
Sends the data to the client.
:param data: the object that is to be sent to the client. This should
be one of the RPC message types.
:type data: object
"""
self.transport.write(zlib.compress(rencode.dumps(data)))
def connectionMade(self):
"""
This method is called when a new client connects.
"""
peer = self.transport.getPeer()
log.info("Deluge Client connection made from: %s:%s", peer.host, peer.port)
# Set the initial auth level of this session to AUTH_LEVEL_NONE
self.factory.authorized_sessions[self.transport.sessionno] = AUTH_LEVEL_NONE
def connectionLost(self, reason):
"""
This method is called when the client is disconnected.
:param reason: the reason the client disconnected.
:type reason: str
"""
# We need to remove this session from various dicts
del self.factory.authorized_sessions[self.transport.sessionno]
if self.transport.sessionno in self.factory.session_protocols:
del self.factory.session_protocols[self.transport.sessionno]
if self.transport.sessionno in self.factory.interested_events:
del self.factory.interested_events[self.transport.sessionno]
log.info("Deluge client disconnected: %s", reason.value)
def dispatch(self, request_id, method, args, kwargs):
"""
This method is run when a RPC Request is made. It will run the local method
and will send either a RPC Response or RPC Error back to the client.
:param request_id: the request_id from the client (sent in the RPC Request)
:type request_id: int
:param method: the local method to call. It must be registered with
the :class:`RPCServer`.
:type method: str
:param args: the arguments to pass to `method`
:type args: list
:param kwargs: the keyword-arguments to pass to `method`
:type kwargs: dict
"""
def sendError():
"""
Sends an error response with the contents of the exception that was raised.
"""
exceptionType, exceptionValue, exceptionTraceback = sys.exc_info()
self.sendData((
RPC_ERROR,
request_id,
(exceptionType.__name__,
exceptionValue.args[0] if len(exceptionValue.args) == 1 else "",
"".join(traceback.format_tb(exceptionTraceback)))
))
if method == "daemon.login":
# This is a special case and used in the initial connection process
# We need to authenticate the user here
try:
ret = component.get("AuthManager").authorize(*args, **kwargs)
if ret:
self.factory.authorized_sessions[self.transport.sessionno] = (ret, args[0])
self.factory.session_protocols[self.transport.sessionno] = self
except Exception, e:
sendError()
log.exception(e)
else:
self.sendData((RPC_RESPONSE, request_id, (ret)))
if not ret:
self.transport.loseConnection()
finally:
return
elif method == "daemon.set_event_interest" and self.transport.sessionno in self.factory.authorized_sessions:
# This special case is to allow clients to set which events they are
# interested in receiving.
# We are expecting a sequence from the client.
try:
if self.transport.sessionno not in self.factory.interested_events:
self.factory.interested_events[self.transport.sessionno] = []
self.factory.interested_events[self.transport.sessionno].extend(args[0])
except Exception, e:
sendError()
else:
self.sendData((RPC_RESPONSE, request_id, (True)))
finally:
return
if method in self.factory.methods and self.transport.sessionno in self.factory.authorized_sessions:
try:
method_auth_requirement = self.factory.methods[method]._rpcserver_auth_level
auth_level = self.factory.authorized_sessions[self.transport.sessionno][0]
if auth_level < method_auth_requirement:
# This session is not allowed to call this method
log.debug("Session %s is trying to call a method it is not authorized to call!", self.transport.sessionno)
raise NotAuthorizedError("Auth level too low: %s < %s" % (auth_level, method_auth_requirement))
# Set the session_id in the factory so that methods can know
# which session is calling it.
self.factory.session_id = self.transport.sessionno
ret = self.factory.methods[method](*args, **kwargs)
except Exception, e:
sendError()
# Don't bother printing out DelugeErrors, because they are just for the client
if not isinstance(e, DelugeError):
log.exception("Exception calling RPC request: %s", e)
else:
# Check if the return value is a deferred, since we'll need to
# wait for it to fire before sending the RPC_RESPONSE
if isinstance(ret, defer.Deferred):
def on_success(result):
self.sendData((RPC_RESPONSE, request_id, result))
return result
def on_fail(failure):
try:
failure.raiseException()
except Exception, e:
sendError()
return failure
ret.addCallbacks(on_success, on_fail)
else:
self.sendData((RPC_RESPONSE, request_id, ret))
class RPCServer(component.Component):
def __init__(self, port):
"""
This class is used to handle rpc requests from the client. Objects are
registered with this class and their methods are exported using the export
decorator.
:param port: the port the RPCServer will listen on
:type port: int
:param interface: the interface to listen on, this may override the `allow_remote` setting
:type interface: str
:param allow_remote: set True if the server should allow remote connections
:type allow_remote: bool
:param listen: if False, will not start listening.. This is only useful in Classic Mode
:type listen: bool
"""
def __init__(self, port=58846, interface="", allow_remote=False, listen=True):
component.Component.__init__(self, "RPCServer")
# Get config
self.config = deluge.configmanager.ConfigManager("core.conf")
self.factory = Factory()
self.factory.protocol = DelugeRPCProtocol
self.factory.session_id = -1
if port == None:
port = self.config["daemon_port"]
# Holds the registered methods
self.factory.methods = {}
# Holds the session_ids and auth levels
self.factory.authorized_sessions = {}
# Holds the protocol objects with the session_id as key
self.factory.session_protocols = {}
# Holds the interested event list for the sessions
self.factory.interested_events = {}
if self.config["allow_remote"]:
if not listen:
return
if allow_remote:
hostname = ""
else:
hostname = "localhost"
# Setup the xmlrpc server
if interface:
hostname = interface
log.info("Starting DelugeRPC server %s:%s", hostname, port)
# Check for SSL keys and generate some if needed
check_ssl_keys()
try:
log.info("Starting XMLRPC server %s:%s", hostname, port)
self.server = XMLRPCServer((hostname, port),
requestHandler=BasicAuthXMLRPCRequestHandler,
logRequests=False,
allow_none=True)
reactor.listenSSL(port, self.factory, ServerContextFactory(), interface=hostname)
except Exception, e:
log.info("Daemon already running or port not available..")
log.error(e)
sys.exit(0)
self.server.register_multicall_functions()
self.server.register_introspection_functions()
self.server.socket.setblocking(False)
gobject.io_add_watch(self.server.socket.fileno(), gobject.IO_IN | gobject.IO_OUT | gobject.IO_PRI | gobject.IO_ERR | gobject.IO_HUP, self._on_socket_activity)
def _on_socket_activity(self, source, condition):
"""This gets called when there is activity on the socket, ie, data to read
or to write."""
self.server.handle_request()
return True
def register_object(self, obj, name=None):
"""
Registers an object to export it's rpc methods. These methods should
be exported with the export decorator prior to registering the object.
:param obj: the object that we want to export
:type obj: object
:param name: the name to use, if None, it will be the class name of the object
:type name: str
"""
if not name:
name = obj.__class__.__name__
name = obj.__class__.__name__.lower()
for d in dir(obj):
if d[0] == "_":
continue
if getattr(getattr(obj, d), '_rpcserver_export', False):
log.debug("Registering method: %s", name + "." + d)
self.server.register_function(getattr(obj, d), name + "." + d)
self.factory.methods[name + "." + d] = getattr(obj, d)
class XMLRPCServer(ThreadingMixIn, SimpleXMLRPCServer):
def get_request(self):
"""Get the request and client address from the socket.
We override this so that we can get the ip address of the client.
def get_object_method(self, name):
"""
request, client_address = self.socket.accept()
self.client_address = client_address[0]
return (request, client_address)
class BasicAuthXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
def do_POST(self):
if "authorization" in self.headers:
auth = self.headers['authorization']
auth = auth.replace("Basic ","")
decoded_auth = decodestring(auth)
# Check authentication here
if component.get("AuthManager").authorize(*decoded_auth.split(":")):
# User authorized, call the real do_POST now
return SimpleXMLRPCRequestHandler.do_POST(self)
Returns a registered method.
# if cannot authenticate, end the connection
self.send_response(401)
self.end_headers()
:param name: the name of the method, usually in the form of 'object.method'
:type name: str
:returns: method
:raises KeyError: if `name` is not registered
"""
return self.factory.methods[name]
def get_method_list(self):
"""
Returns a list of the exported methods.
:returns: the exported methods
:rtype: list
"""
return self.factory.methods.keys()
def get_session_id(self):
"""
Returns the session id of the current RPC.
:returns: the session id, this will be -1 if no connections have been made
:rtype: int
"""
return self.factory.session_id
def get_session_user(self):
"""
Returns the username calling the current RPC.
:returns: the username of the user calling the current RPC
:rtype: string
"""
session_id = self.get_session_id()
if session_id > -1 and session_id in self.factory.authorized_sessions:
return self.factory.authorized_sessions[session_id][1]
else:
# No connections made yet
return ""
def is_session_valid(self, session_id):
"""
Checks if the session is still valid, eg, if the client is still connected.
:param session_id: the session id
:type session_id: int
:returns: True if the session is valid
:rtype: bool
"""
return session_id in self.factory.authorized_sessions
def emit_event(self, event):
"""
Emits the event to interested clients.
:param event: the event to emit
:type event: :class:`deluge.event.DelugeEvent`
"""
log.debug("intevents: %s", self.factory.interested_events)
# Find sessions interested in this event
for session_id, interest in self.factory.interested_events.items():
if event.name in interest:
log.debug("Emit Event: %s %s", event.name, event.args)
# This session is interested so send a RPC_EVENT
self.factory.session_protocols[session_id].sendData(
(RPC_EVENT, event.name, event.args)
)
def check_ssl_keys():
"""
Check for SSL cert/key and create them if necessary
"""
ssl_dir = deluge.configmanager.get_config_dir("ssl")
if not os.path.exists(ssl_dir):
# The ssl folder doesn't exist so we need to create it
os.makedirs(ssl_dir)
generate_ssl_keys()
else:
for f in ("daemon.pkey", "daemon.cert"):
if not os.path.exists(os.path.join(ssl_dir, f)):
generate_ssl_keys()
break
def generate_ssl_keys():
"""
This method generates a new SSL key/cert.
"""
digest = "md5"
# Generate key pair
pkey = crypto.PKey()
pkey.generate_key(crypto.TYPE_RSA, 1024)
# Generate cert request
req = crypto.X509Req()
subj = req.get_subject()
setattr(subj, "CN", "Deluge Daemon")
req.set_pubkey(pkey)
req.sign(pkey, digest)
# Generate certificate
cert = crypto.X509()
cert.set_serial_number(0)
cert.gmtime_adj_notBefore(0)
cert.gmtime_adj_notAfter(60*60*24*365*5) # Five Years
cert.set_issuer(req.get_subject())
cert.set_subject(req.get_subject())
cert.set_pubkey(req.get_pubkey())
cert.sign(pkey, digest)
# Write out files
ssl_dir = deluge.configmanager.get_config_dir("ssl")
open(os.path.join(ssl_dir, "daemon.pkey"), "w").write(crypto.dump_privatekey(crypto.FILETYPE_PEM, pkey))
open(os.path.join(ssl_dir, "daemon.cert"), "w").write(crypto.dump_certificate(crypto.FILETYPE_PEM, cert))
# Make the files only readable by this user
for f in ("daemon.pkey", "daemon.cert"):
os.chmod(os.path.join(ssl_dir, f), stat.S_IREAD | stat.S_IWRITE)

View File

@ -1,108 +0,0 @@
#
# signalmanager.py
#
# Copyright (C) 2007, 2008 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may 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.
#
# deluge 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 deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA.
#
import deluge.xmlrpclib as xmlrpclib
import socket
import struct
import gobject
import deluge.component as component
from deluge.log import LOG as log
class Transport(xmlrpclib.Transport):
def make_connection(self, host):
# create a HTTP connection object from a host descriptor
import httplib
host, extra_headers, x509 = self.get_host_info(host)
h = httplib.HTTP(host)
h._conn.connect()
h._conn.sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
struct.pack('ii', 1, 0))
return h
class SignalManager(component.Component):
def __init__(self):
component.Component.__init__(self, "SignalManager")
self.clients = {}
self.handlers = {}
def shutdown(self):
self.clients = {}
self.handlers = {}
def register_handler(self, signal, handler):
"""Registers a handler for signals"""
if signal not in self.handler.keys():
self.handler[signal] = []
self.handler[signal].append(handler)
log.debug("Registered signal handler for %s", signal)
def deregister_handler(self, handler):
"""De-registers the 'handler' function from all signal types."""
# Iterate through all handlers and remove 'handler' where found
for (key, value) in self.handlers:
if handler in value:
value.remove(handler)
def deregister_client(self, address):
"""Deregisters a client"""
log.debug("Deregistering %s as a signal reciever..", address)
for client in self.clients.keys():
if client.split("//")[1].split(":")[0] == address:
del self.clients[client]
break
def register_client(self, address, port):
"""Registers a client to emit signals to."""
uri = "http://" + str(address) + ":" + str(port)
log.debug("Registering %s as a signal reciever..", uri)
self.clients[uri] = xmlrpclib.ServerProxy(uri, transport=Transport())
#self.clients[uri].socket.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
# struct.pack('ii', 1, 0))
def emit(self, signal, *data):
# Run the handlers
if signal in self.handlers.keys():
for handler in self.handlers[signal]:
handler(*data)
for uri in self.clients:
gobject.idle_add(self._emit, uri, signal, 1, *data)
def _emit(self, uri, signal, count, *data):
if uri not in self.clients:
return
client = self.clients[uri]
try:
client.emit_signal(signal, *data)
except (socket.error, Exception), e:
log.warning("Unable to emit signal to client %s: %s (%d)", client, e, count)
if count < 30:
gobject.timeout_add(1000, self._emit, uri, signal, count + 1, *data)
else:
log.info("Removing %s because it couldn't be reached..", uri)
del self.clients[uri]

View File

@ -1,7 +1,7 @@
#
# torrent.py
#
# Copyright (C) 2007, 2008 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
@ -19,91 +19,86 @@
# 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.
#
"""Internal Torrent class"""
import os
import time
from urllib import unquote
from urlparse import urlparse
try:
import deluge.libtorrent as lt
except ImportError:
import libtorrent as lt
if not (lt.version_major == 0 and lt.version_minor == 14):
raise ImportError("This version of Deluge requires libtorrent 0.14!")
from deluge._libtorrent import lt
import deluge.common
import deluge.component as component
from deluge.configmanager import ConfigManager
from deluge.configmanager import ConfigManager, get_config_dir
from deluge.log import LOG as log
import deluge.xmlrpclib
from deluge.event import *
TORRENT_STATE = deluge.common.TORRENT_STATE
def sanitize_filepath(filepath, folder=False):
"""
Returns a sanitized filepath to pass to libotorrent rename_file().
The filepath will have backslashes substituted along with whitespace
padding and duplicate slashes stripped. If `folder` is True a trailing
slash is appended to the returned filepath.
"""
def clean_filename(filename):
filename = filename.strip()
if filename.replace('.', '') == '':
return ''
return filename
if '\\' in filepath or '/' in filepath:
folderpath = filepath.replace('\\', '/').split('/')
folderpath = [clean_filename(x) for x in folderpath]
newfilepath = '/'.join(filter(None, folderpath))
else:
newfilepath = clean_filename(filepath)
if folder is True:
return newfilepath + '/'
else:
return newfilepath
class TorrentOptions(dict):
def __init__(self):
self.config = ConfigManager("core.conf")
self.default_keys = {
"max_download_speed": "max_download_speed_per_torrent",
"max_upload_speed": "max_upload_speed_per_torrent",
"max_connections": "max_connections_per_torrent",
"max_upload_slots": "max_upload_slots_per_torrent",
"prioritize_first_last_pieces": "prioritize_first_last_pieces",
"auto_managed": "auto_managed",
"move_completed": "move_completed",
"move_completed_path": "move_completed_path",
"file_priorities": [],
"compact_allocation": "compact_allocation",
"download_location": "download_location",
"add_paused": "add_paused"
}
super(TorrentOptions, self).__setitem__("stop_at_ratio", False)
super(TorrentOptions, self).__setitem__("stop_ratio", 2.0)
super(TorrentOptions, self).__setitem__("remove_at_ratio", False)
config = ConfigManager("core.conf").config
options_conf_map = {
"max_connections": "max_connections_per_torrent",
"max_upload_slots": "max_upload_slots_per_torrent",
"max_upload_speed": "max_upload_speed_per_torrent",
"max_download_speed": "max_download_speed_per_torrent",
"prioritize_first_last_pieces": "prioritize_first_last_pieces",
"compact_allocation": "compact_allocation",
"download_location": "download_location",
"auto_managed": "auto_managed",
"stop_at_ratio": "stop_seed_at_ratio",
"stop_ratio": "stop_seed_ratio",
"remove_at_ratio": "remove_seed_at_ratio",
"move_completed": "move_completed",
"move_completed_path": "move_completed_path",
"add_paused": "add_paused",
}
for opt_k, conf_k in options_conf_map.iteritems():
self[opt_k] = config[conf_k]
self["file_priorities"] = []
self["mapped_files"] = {}
def items(self):
i = super(TorrentOptions, self).items()
for k in self.default_keys:
if k not in super(TorrentOptions, self).keys():
i.append((k, self.__getitem__(k)))
return i
def keys(self):
k = super(TorrentOptions, self).keys()
for key in self.default_keys.keys():
if key not in k:
k.append(key)
return k
def iteritems(self):
return self.items().itermitems()
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
def __setitem__(self, key, value):
super(TorrentOptions, self).__setitem__(key, value)
def __getitem__(self, key):
if super(TorrentOptions, self).has_key(key):
return super(TorrentOptions, self).__getitem__(key)
else:
if self.default_keys[key]:
return self.config[self.default_keys[key]]
else:
return self.default_keys[key]
class Torrent:
class Torrent(object):
"""Torrent holds information about torrents added to the libtorrent session.
"""
def __init__(self, handle, options, state=None, filename=None, magnet=None):
@ -111,7 +106,15 @@ class Torrent:
# Get the core config
self.config = ConfigManager("core.conf")
self.signals = component.get("SignalManager")
self.rpcserver = component.get("RPCServer")
# This dict holds previous status dicts returned for this torrent
# We use this to return dicts that only contain changes from the previous
# {session_id: status_dict, ...}
self.prev_status = {}
from twisted.internet.task import LoopingCall
self.prev_status_cleanup_loop = LoopingCall(self.cleanup_prev_status)
self.prev_status_cleanup_loop.start(10)
# Set the libtorrent handle
self.handle = handle
@ -146,9 +149,6 @@ class Torrent:
except RuntimeError:
self.torrent_info = None
# Files dictionary
self.files = self.get_files()
# Default total_uploaded to 0, this may be changed by the state
self.total_uploaded = 0
@ -169,22 +169,22 @@ class Torrent:
# Set the filename
self.filename = state.filename
self.is_finished = state.is_finished
# Set the per-torrent queue options
self.options["stop_at_ratio"] = state.stop_at_ratio
self.options["stop_ratio"] = state.stop_ratio
self.options["remove_at_ratio"] = state.remove_at_ratio
else:
# Tracker list
self.trackers = []
# Create a list of trackers
for value in self.handle.trackers():
tracker = {}
tracker["url"] = value.url
tracker["tier"] = value.tier
if lt.version_major == 0 and lt.version_minor < 15:
tracker = {}
tracker["url"] = value.url
tracker["tier"] = value.tier
else:
tracker = value
self.trackers.append(tracker)
# Various torrent options
self.handle.resolve_countries(True)
self.set_options(self.options)
# Status message holds error info about the torrent
@ -196,25 +196,33 @@ class Torrent:
# The tracker status
self.tracker_status = ""
# This gets updated when get_tracker_host is called
self.tracker_host = None
if state:
self.time_added = state.time_added
else:
self.time_added = time.time()
# Keep track if we're forcing a recheck of the torrent so that we can
# repause it after its done if necessary
self.forcing_recheck = False
self.forcing_recheck_paused = False
log.debug("Torrent object created.")
## Options methods ##
def set_options(self, options):
OPTIONS_FUNCS = {
# Functions used for setting options
"max_download_speed": self.set_max_download_speed,
"max_upload_speed": self.set_max_upload_speed,
"max_connections": self.handle.set_max_connections,
"max_upload_slots": self.handle.set_max_uploads,
"prioritize_first_last_pieces": self.set_prioritize_first_last,
"auto_managed": self.set_auto_managed,
"file_priorities": self.set_file_priorities,
"download_location": self.set_save_path,
"file_priorities": self.set_file_priorities,
"max_connections": self.handle.set_max_connections,
"max_download_speed": self.set_max_download_speed,
"max_upload_slots": self.handle.set_max_uploads,
"max_upload_speed": self.set_max_upload_speed,
"prioritize_first_last_pieces": self.set_prioritize_first_last
}
for (key, value) in options.items():
if OPTIONS_FUNCS.has_key(key):
@ -252,11 +260,11 @@ class Torrent:
self.handle.set_download_limit(v)
def set_prioritize_first_last(self, prioritize):
self.options["prioritize_first_last_pieces"] = prioritize
if prioritize:
if self.handle.has_metadata():
if self.handle.get_torrent_info().num_files() == 1:
# We only do this if one file is in the torrent
self.options["prioritize_first_last_pieces"] = prioritize
priorities = [1] * self.handle.get_torrent_info().num_pieces()
priorities[0] = 7
priorities[-1] = 7
@ -277,8 +285,14 @@ class Torrent:
def set_remove_at_ratio(self, remove_at_ratio):
self.options["remove_at_ratio"] = remove_at_ratio
def set_move_completed(self, move_completed):
self.options["move_completed"] = move_completed
def set_move_completed_path(self, move_completed_path):
self.options["move_completed_path"] = move_completed_path
def set_file_priorities(self, file_priorities):
if len(file_priorities) != len(self.files):
if len(file_priorities) != len(self.get_files()):
log.debug("file_priorities len != num_files")
self.options["file_priorities"] = self.handle.file_priorities()
return
@ -302,7 +316,9 @@ class Torrent:
self.update_state()
break
self.options["file_priorities"] = file_priorities
self.options["file_priorities"] = self.handle.file_priorities()
if self.options["file_priorities"] != list(file_priorities):
log.warning("File priorities were not set for this torrent")
# Set the first/last priorities if needed
self.set_prioritize_first_last(self.options["prioritize_first_last_pieces"])
@ -317,6 +333,7 @@ class Torrent:
tracker["tier"] = value.tier
trackers.append(tracker)
self.trackers = trackers
self.tracker_host = None
return
log.debug("Setting trackers for %s: %s", self.torrent_id, trackers)
@ -326,18 +343,19 @@ class Torrent:
new_entry = lt.announce_entry(tracker["url"])
new_entry.tier = tracker["tier"]
tracker_list.append(new_entry)
self.handle.replace_trackers(tracker_list)
# Print out the trackers
for t in self.handle.trackers():
log.debug("tier: %s tracker: %s", t.tier, t.url)
#for t in self.handle.trackers():
# log.debug("tier: %s tracker: %s", t["tier"], t["url"])
# Set the tracker list in the torrent object
self.trackers = trackers
if len(trackers) > 0:
# Force a reannounce if there is at least 1 tracker
self.force_reannounce()
self.tracker_host = None
### End Options methods ###
def set_save_path(self, save_path):
@ -353,10 +371,31 @@ class Torrent:
LTSTATE = deluge.common.LT_TORRENT_STATE
ltstate = int(self.handle.status().state)
# Set self.state to the ltstate right away just incase we don't hit some
# of the logic below
if ltstate in LTSTATE:
self.state = LTSTATE[ltstate]
else:
self.state = str(ltstate)
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"
if self.handle.is_paused():
self.state = "Paused"
else:
self.state = "Checking"
return
elif ltstate == LTSTATE["Downloading"] or ltstate == LTSTATE["Downloading Metadata"]:
self.state = "Downloading"
@ -365,12 +404,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"
@ -394,15 +428,14 @@ class Torrent:
else:
status = self.status
if self.is_finished and (self.options["stop_at_ratio"] or self.config["stop_seed_at_ratio"]):
if self.is_finished and self.options["stop_at_ratio"]:
# We're a seed, so calculate the time to the 'stop_share_ratio'
if not status.upload_payload_rate:
return 0
stop_ratio = self.config["stop_seed_ratio"] if self.config["stop_seed_at_ratio"] else self.options["stop_ratio"]
stop_ratio = self.options["stop_ratio"]
return ((status.all_time_download * stop_ratio) - status.all_time_upload) / status.upload_payload_rate
left = status.total_wanted - status.total_done
left = status.total_wanted - status.total_wanted_done
if left <= 0 or status.download_payload_rate == 0:
return 0
@ -421,9 +454,7 @@ class Torrent:
else:
status = self.status
if status.all_time_download > 0:
downloaded = status.all_time_download
elif status.total_done > 0:
if status.total_done > 0:
# We use 'total_done' if the downloaded value is 0
downloaded = status.total_done
else:
@ -447,7 +478,8 @@ class Torrent:
for index, file in enumerate(files):
ret.append({
'index': index,
'path': file.path.decode("utf8", "ignore"),
# Make path separators consistent across platforms
'path': file.path.decode("utf8").replace('\\', '/'),
'size': file.size,
'offset': file.offset
})
@ -476,13 +508,13 @@ class Torrent:
country += c
ret.append({
"ip": "%s:%s" % (peer.ip[0], peer.ip[1]),
"up_speed": peer.up_speed,
"down_speed": peer.down_speed,
"country": country,
"client": client,
"country": country,
"down_speed": peer.payload_down_speed,
"ip": "%s:%s" % (peer.ip[0], peer.ip[1]),
"progress": peer.progress,
"seed": peer.flags & peer.seed,
"progress": peer.progress
"up_speed": peer.payload_up_speed,
})
return ret
@ -498,7 +530,7 @@ class Torrent:
file_progress = self.handle.file_progress()
ret = []
for i,f in enumerate(self.files):
for i,f in enumerate(self.get_files()):
try:
ret.append(float(file_progress[i]) / float(f["size"]))
except ZeroDivisionError:
@ -509,6 +541,9 @@ class Torrent:
def get_tracker_host(self):
"""Returns just the hostname of the currently connected tracker
if no tracker is connected, it uses the 1st tracker."""
if self.tracker_host:
return self.tracker_host
if not self.status:
self.status = self.handle.status()
@ -517,17 +552,44 @@ 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:])
self.tracker_host = host
return host
return ""
def get_status(self, keys):
"""Returns the status of the torrent based on the keys provided"""
def get_status(self, keys, diff=False):
"""
Returns the status of the torrent based on the keys provided
:param keys: the keys to get the status on
:type keys: list of str
:param diff: if True, will return a diff of the changes since the last
call to get_status based on the session_id
:type diff: bool
:returns: a dictionary of the status keys and their values
:rtype: dict
"""
# Create the full dictionary
self.status = self.handle.status()
if self.handle.has_metadata():
@ -541,59 +603,95 @@ class Torrent:
if distributed_copies < 0:
distributed_copies = 0.0
# Calculate the seeds:peers ratio
if self.status.num_incomplete == 0:
# Use -1.0 to signify infinity
seeds_peers_ratio = -1.0
else:
seeds_peers_ratio = self.status.num_complete / float(self.status.num_incomplete)
#if you add a key here->add it to core.py STATUS_KEYS too.
full_status = {
"distributed_copies": distributed_copies,
"total_done": self.status.total_done,
"total_uploaded": self.status.all_time_upload,
"active_time": self.status.active_time,
"all_time_download": self.status.all_time_download,
"state": self.state,
"paused": self.status.paused,
"progress": progress,
"next_announce": self.status.next_announce.seconds,
"total_payload_download": self.status.total_payload_download,
"total_payload_upload": self.status.total_payload_upload,
"compact": self.options["compact_allocation"],
"distributed_copies": distributed_copies,
"download_payload_rate": self.status.download_payload_rate,
"upload_payload_rate": self.status.upload_payload_rate,
"file_priorities": self.options["file_priorities"],
"hash": self.torrent_id,
"is_auto_managed": self.options["auto_managed"],
"is_finished": self.is_finished,
"max_connections": self.options["max_connections"],
"max_download_speed": self.options["max_download_speed"],
"max_upload_slots": self.options["max_upload_slots"],
"max_upload_speed": self.options["max_upload_speed"],
"message": self.statusmsg,
"move_on_completed_path": self.options["move_completed_path"],
"move_on_completed": self.options["move_completed"],
"move_completed_path": self.options["move_completed_path"],
"move_completed": self.options["move_completed"],
"next_announce": self.status.next_announce.seconds,
"num_peers": self.status.num_peers - self.status.num_seeds,
"num_seeds": self.status.num_seeds,
"paused": self.status.paused,
"prioritize_first_last": self.options["prioritize_first_last_pieces"],
"progress": progress,
"remove_at_ratio": self.options["remove_at_ratio"],
"save_path": self.options["download_location"],
"seeding_time": self.status.seeding_time,
"seeds_peers_ratio": seeds_peers_ratio,
"seed_rank": self.status.seed_rank,
"state": self.state,
"stop_at_ratio": self.options["stop_at_ratio"],
"stop_ratio": self.options["stop_ratio"],
"time_added": self.time_added,
"total_done": self.status.total_done,
"total_payload_download": self.status.total_payload_download,
"total_payload_upload": self.status.total_payload_upload,
"total_peers": self.status.num_incomplete,
"total_seeds": self.status.num_complete,
"total_uploaded": self.status.all_time_upload,
"total_wanted": self.status.total_wanted,
"tracker": self.status.current_tracker,
"trackers": self.trackers,
"tracker_status": self.tracker_status,
"save_path": self.options["download_location"],
"files": self.files,
"file_priorities": self.options["file_priorities"],
"compact": self.options["compact_allocation"],
"max_connections": self.options["max_connections"],
"max_upload_slots": self.options["max_upload_slots"],
"max_upload_speed": self.options["max_upload_speed"],
"max_download_speed": self.options["max_download_speed"],
"prioritize_first_last": self.options["prioritize_first_last_pieces"],
"message": self.statusmsg,
"hash": self.torrent_id,
"active_time": self.status.active_time,
"seeding_time": self.status.seeding_time,
"seed_rank": self.status.seed_rank,
"is_auto_managed": self.options["auto_managed"],
"stop_ratio": self.options["stop_ratio"],
"stop_at_ratio": self.options["stop_at_ratio"],
"remove_at_ratio": self.options["remove_at_ratio"],
"move_on_completed": self.options["move_completed"],
"move_on_completed_path": self.options["move_completed_path"],
"time_added": self.time_added
"upload_payload_rate": self.status.upload_payload_rate
}
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():
name = self.torrent_info.file_at(0).path.replace("\\", "/", 1).split("/", 1)[0]
if not name:
name = self.torrent_info.name()
try:
return self.torrent_info.name().decode("utf8", "ignore")
return name.decode("utf8", "ignore")
except UnicodeDecodeError:
return self.torrent_info.name()
return name
elif self.magnet:
try:
keys = dict([k.split('=') for k in self.magnet.split('?')[-1].split('&')])
name = keys.get('dn')
if not name:
return self.torrent_id
name = unquote(name).replace('+', ' ')
try:
return name.decode("utf8", "ignore")
except UnicodeDecodeError:
return name
except:
pass
return self.torrent_id
def ti_priv():
if self.handle.has_metadata():
return self.torrent_info.priv()
@ -616,19 +714,21 @@ class Torrent:
return 0
fns = {
"comment": ti_comment,
"eta": self.get_eta,
"file_progress": self.get_file_progress,
"files": self.get_files,
"is_seed": self.handle.is_seed,
"name": ti_name,
"private": ti_priv,
"total_size": ti_total_size,
"num_files": ti_num_files,
"num_pieces": ti_num_pieces,
"piece_length": ti_piece_length,
"eta": self.get_eta,
"ratio": self.get_ratio,
"file_progress": self.get_file_progress,
"queue": self.handle.queue_position,
"is_seed": self.handle.is_seed,
"peers": self.get_peers,
"tracker_host": self.get_tracker_host
"piece_length": ti_piece_length,
"private": ti_priv,
"queue": self.handle.queue_position,
"ratio": self.get_ratio,
"total_size": ti_total_size,
"tracker_host": self.get_tracker_host,
}
# Create the desired status dictionary and return it
@ -645,6 +745,24 @@ class Torrent:
elif key in fns:
status_dict[key] = fns[key]()
session_id = self.rpcserver.get_session_id()
if diff:
if session_id in self.prev_status:
# We have a previous status dict, so lets make a diff
status_diff = {}
for key, value in status_dict.items():
if key in self.prev_status[session_id]:
if value != self.prev_status[session_id][key]:
status_diff[key] = value
else:
status_diff[key] = value
self.prev_status[session_id] = status_dict
return status_diff
self.prev_status[session_id] = status_dict
return status_dict
return status_dict
def apply_options(self):
@ -666,7 +784,7 @@ class Torrent:
# show it as 'Paused'. We need to emit a torrent_paused signal because
# the torrent_paused alert from libtorrent will not be generated.
self.update_state()
self.signals.emit("torrent_paused", self.torrent_id)
component.get("EventManager").emit(TorrentStateChangedEvent(self.torrent_id, "Paused"))
else:
try:
self.handle.pause()
@ -688,14 +806,10 @@ class Torrent:
if self.handle.is_finished():
# If the torrent has already reached it's 'stop_seed_ratio' then do not do anything
if self.config["stop_seed_at_ratio"] or self.options["stop_at_ratio"]:
if self.options["stop_at_ratio"]:
ratio = self.options["stop_ratio"]
else:
ratio = self.config["stop_seed_ratio"]
if self.get_ratio() >= ratio:
self.signals.emit("torrent_resume_at_stop_ratio")
if self.options["stop_at_ratio"]:
if self.get_ratio() >= self.options["stop_ratio"]:
#XXX: This should just be returned in the RPC Response, no event
#self.signals.emit_event("torrent_resume_at_stop_ratio")
return
if self.options["auto_managed"]:
@ -721,8 +835,29 @@ class Torrent:
def move_storage(self, dest):
"""Move a torrent's storage location"""
try:
self.handle.move_storage(dest.encode("utf8"))
except:
dest = unicode(dest, "utf-8")
except TypeError:
# String is already unicode
pass
if not os.path.exists(dest):
try:
# Try to make the destination path if it doesn't exist
os.makedirs(dest)
except IOError, e:
log.exception(e)
log.error("Could not move storage for torrent %s since %s does not exist and could not create the directory.", self.torrent_id, dest_u)
return False
dest_bytes = dest.encode('utf-8')
try:
# libtorrent needs unicode object if wstrings are enabled, utf8 bytestring otherwise
try:
self.handle.move_storage(dest)
except TypeError:
self.handle.move_storage(dest_bytes)
except Exception, e:
log.error("Error calling libtorrent move_storage: %s" % e)
return False
return True
@ -733,44 +868,22 @@ class Torrent:
self.handle.save_resume_data()
self.waiting_on_resume_data = True
def write_resume_data(self, resume_data):
"""Writes the .fastresume file for the torrent"""
resume_data = lt.bencode(resume_data)
path = "%s/%s.fastresume" % (
self.config["state_location"],
self.torrent_id)
try:
self.delete_fastresume()
log.debug("Saving fastresume file: %s", path)
fastresume = open(path, "wb")
fastresume.write(resume_data)
fastresume.close()
except IOError:
log.warning("Error trying to save fastresume file")
self.waiting_on_resume_data = False
def delete_fastresume(self):
"""Deletes the .fastresume file"""
path = "%s/%s.fastresume" % (
self.config["state_location"],
self.torrent_id)
log.debug("Deleting fastresume file: %s", path)
try:
os.remove(path)
except Exception, e:
log.warning("Unable to delete the fastresume file: %s", e)
def on_metadata_received(self):
if self.options["prioritize_first_last_pieces"]:
self.set_prioritize_first_last(True)
self.write_torrentfile()
def write_torrentfile(self):
"""Writes the torrent file"""
path = "%s/%s.torrent" % (
self.config["state_location"],
os.path.join(get_config_dir(), "state"),
self.torrent_id)
log.debug("Writing torrent file: %s", path)
try:
ti = self.handle.get_torrent_info()
md = lt.bdecode(ti.metadata())
log.debug("md: %s", md)
self.torrent_info = self.handle.get_torrent_info()
# Regenerate the file priorities
self.set_file_priorities([])
md = lt.bdecode(self.torrent_info.metadata())
torrent_file = {}
torrent_file["info"] = md
open(path, "wb").write(lt.bencode(torrent_file))
@ -780,7 +893,7 @@ class Torrent:
def delete_torrentfile(self):
"""Deletes the .torrent file in the state"""
path = "%s/%s.torrent" % (
self.config["state_location"],
os.path.join(get_config_dir(), "state"),
self.torrent_id)
log.debug("Deleting torrent file: %s", path)
try:
@ -810,18 +923,32 @@ class Torrent:
def force_recheck(self):
"""Forces a recheck of the torrents pieces"""
paused = self.handle.is_paused()
try:
self.handle.force_recheck()
self.handle.resume()
except Exception, e:
log.debug("Unable to force recheck: %s", e)
return False
self.forcing_recheck = True
self.forcing_recheck_paused = paused
return True
def rename_files(self, filenames):
"""Renames files in the torrent. 'filenames' should be a list of
(index, filename) pairs."""
for index, filename in filenames:
self.handle.rename_file(index, filename)
# Make sure filename is a unicode object
try:
filename = unicode(filename, "utf-8")
except TypeError:
pass
filename = sanitize_filepath(filename)
# libtorrent needs unicode object if wstrings are enabled, utf8 bytestring otherwise
try:
self.handle.rename_file(index, filename)
except TypeError:
self.handle.rename_file(index, filename.encode("utf-8"))
def rename_folder(self, folder, new_folder):
"""Renames a folder within a torrent. This basically does a file rename
@ -831,13 +958,27 @@ class Torrent:
log.error("Attempting to rename a folder with an invalid folder name: %s", new_folder)
return
if new_folder[-1:] != "/":
new_folder += "/"
new_folder = sanitize_filepath(new_folder, folder=True)
wait_on_folder = (folder, new_folder, [])
for f in self.get_files():
if f["path"].startswith(folder):
# Keep a list of filerenames we're waiting on
wait_on_folder[2].append(f["index"])
self.handle.rename_file(f["index"], f["path"].replace(folder, new_folder, 1))
new_path = f["path"].replace(folder, new_folder, 1)
try:
self.handle.rename_file(f["index"], new_path)
except TypeError:
self.handle.rename_file(f["index"], new_path.encode("utf-8"))
self.waiting_on_folder_rename.append(wait_on_folder)
def cleanup_prev_status(self):
"""
This method gets called to check the validity of the keys in the prev_status
dict. If the key is no longer valid, the dict will be deleted.
"""
for key in self.prev_status.keys():
if not self.rpcserver.is_session_valid(key):
del self.prev_status[key]

File diff suppressed because it is too large Load Diff

View File

@ -1,39 +0,0 @@
There are two licenses, one for the C library software, and one for
the database.
SOFTWARE LICENSE (C library)
The GeoIP C Library is licensed under the LGPL. For details see
the COPYING file.
OPEN DATA LICENSE (GeoLite Country and GeoLite City databases)
Copyright (c) 2008 MaxMind, Inc. All Rights Reserved.
All advertising materials and documentation mentioning features or use of
this database must display the following acknowledgment:
"This product includes GeoLite data created by MaxMind, available from
http://maxmind.com/"
Redistribution and use with or without modification, are permitted provided
that the following conditions are met:
1. Redistributions must retain the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
2. All advertising materials and documentation mentioning features or use of
this database must display the following acknowledgement:
"This product includes GeoLite data created by MaxMind, available from
http://maxmind.com/"
3. "MaxMind" may not be used to endorse or promote products derived from this
database without specific prior written permission.
THIS DATABASE IS PROVIDED BY MAXMIND, INC ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL MAXMIND BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Binary file not shown.

View File

@ -1,2 +0,0 @@
From: http://famfamfam.com/lab/icons/flags/
"These flag icons are available for free use for any purpose with no requirement for attribution."

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

View File

View File

@ -1,12 +0,0 @@
[Desktop Entry]
Version=1.0
Name=Deluge BitTorrent Client
GenericName=Bittorrent Client
Comment=Transfer files using the Bittorrent protocol
Exec=deluge
Icon=deluge
Terminal=false
Type=Application
Categories=Network;
StartupNotify=true
MimeType=application/x-bittorrent;

View File

@ -0,0 +1,14 @@
[Desktop Entry]
Version=1.0
_Name=Deluge
_GenericName=BitTorrent Client
_X-GNOME-FullName=Deluge BitTorrent Client
_Comment=Download and share files over BitTorrent
TryExec=deluge-gtk
Exec=deluge-gtk %U
Icon=deluge
Terminal=false
Type=Application
Categories=Network;FileTransfer;P2P;GTK;
StartupNotify=true
MimeType=application/x-bittorrent;x-scheme-handler/magnet;

51
deluge/decorators.py Normal file
View File

@ -0,0 +1,51 @@
#
# decorators.py
#
# Copyright (C) 2010 John Garland <johnnybg+deluge@gmail.com>
#
# Deluge is free software.
#
# You may 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.
#
# deluge 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 deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# 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.
#
#
from functools import wraps
def proxy(proxy_func):
"""
Factory class which returns a decorator that passes
the decorated function to a proxy function
:param proxy_func: the proxy function
:type proxy_func: function
"""
def decorator(func):
@wraps(func)
def wrapper(*args, **kwargs):
return proxy_func(func, *args, **kwargs)
return wrapper
return decorator

View File

@ -1,27 +0,0 @@
.. deluge documentation master file, created by sphinx-quickstart on Tue Nov 4 18:24:06 2008.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to deluge's documentation!
==================================
Contents:
.. toctree::
:maxdepth: 2
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Modules
=======
.. toctree::
:maxdepth: 2
modules/common
modules/config

View File

@ -1,11 +0,0 @@
:mod:`deluge.config`
====================
.. automodule:: deluge.config
.. autoclass:: Config
:show-inheritance:
:members:
:undoc-members:
.. automethod:: __setitem__
.. automethod:: __getitem__

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

View File

@ -1,833 +0,0 @@
/**
* Sphinx Doc Design
*/
body {
font-family: sans-serif;
font-size: 100%;
background-color: #11303d;
color: #000;
margin: 0;
padding: 0;
}
/* :::: LAYOUT :::: */
div.document {
background-color: #1c4e63;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 230px;
}
div.body {
background-color: white;
padding: 0 20px 30px 20px;
}
div.sphinxsidebarwrapper {
padding: 10px 5px 0 10px;
}
div.sphinxsidebar {
float: left;
width: 230px;
margin-left: -100%;
font-size: 90%;
}
div.clearer {
clear: both;
}
div.footer {
color: #fff;
width: 100%;
padding: 9px 0 9px 0;
text-align: center;
font-size: 75%;
}
div.footer a {
color: #fff;
text-decoration: underline;
}
div.related {
background-color: #133f52;
color: #fff;
width: 100%;
height: 30px;
line-height: 30px;
font-size: 90%;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
}
div.related li.right {
float: right;
margin-right: 5px;
}
div.related a {
color: white;
}
/* ::: TOC :::: */
div.sphinxsidebar h3 {
font-family: 'Trebuchet MS', sans-serif;
color: white;
font-size: 1.4em;
font-weight: normal;
margin: 0;
padding: 0;
}
div.sphinxsidebar h4 {
font-family: 'Trebuchet MS', sans-serif;
color: white;
font-size: 1.3em;
font-weight: normal;
margin: 5px 0 0 0;
padding: 0;
}
div.sphinxsidebar p {
color: white;
}
div.sphinxsidebar p.topless {
margin: 5px 10px 10px 10px;
}
div.sphinxsidebar ul {
margin: 10px;
padding: 0;
list-style: none;
color: white;
}
div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
margin-left: 20px;
list-style: square;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar a {
color: #98dbcc;
}
div.sphinxsidebar form {
margin-top: 10px;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
/* :::: MODULE CLOUD :::: */
div.modulecloud {
margin: -5px 10px 5px 10px;
padding: 10px;
line-height: 160%;
border: 1px solid #cbe7e5;
background-color: #f2fbfd;
}
div.modulecloud a {
padding: 0 5px 0 5px;
}
/* :::: SEARCH :::: */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* :::: COMMON FORM STYLES :::: */
div.actions {
padding: 5px 10px 5px 10px;
border-top: 1px solid #cbe7e5;
border-bottom: 1px solid #cbe7e5;
background-color: #e0f6f4;
}
form dl {
color: #333;
}
form dt {
clear: both;
float: left;
min-width: 110px;
margin-right: 10px;
padding-top: 2px;
}
input#homepage {
display: none;
}
div.error {
margin: 5px 20px 0 0;
padding: 5px;
border: 1px solid #d00;
font-weight: bold;
}
/* :::: INLINE COMMENTS :::: */
div.inlinecomments {
position: absolute;
right: 20px;
}
div.inlinecomments a.bubble {
display: block;
float: right;
background-image: url(style/comment.png);
background-repeat: no-repeat;
width: 25px;
height: 25px;
text-align: center;
padding-top: 3px;
font-size: 0.9em;
line-height: 14px;
font-weight: bold;
color: black;
}
div.inlinecomments a.bubble span {
display: none;
}
div.inlinecomments a.emptybubble {
background-image: url(style/nocomment.png);
}
div.inlinecomments a.bubble:hover {
background-image: url(style/hovercomment.png);
text-decoration: none;
color: #3ca0a4;
}
div.inlinecomments div.comments {
float: right;
margin: 25px 5px 0 0;
max-width: 50em;
min-width: 30em;
border: 1px solid #2eabb0;
background-color: #f2fbfd;
z-index: 150;
}
div#comments {
border: 1px solid #2eabb0;
margin-top: 20px;
}
div#comments div.nocomments {
padding: 10px;
font-weight: bold;
}
div.inlinecomments div.comments h3,
div#comments h3 {
margin: 0;
padding: 0;
background-color: #2eabb0;
color: white;
border: none;
padding: 3px;
}
div.inlinecomments div.comments div.actions {
padding: 4px;
margin: 0;
border-top: none;
}
div#comments div.comment {
margin: 10px;
border: 1px solid #2eabb0;
}
div.inlinecomments div.comment h4,
div.commentwindow div.comment h4,
div#comments div.comment h4 {
margin: 10px 0 0 0;
background-color: #2eabb0;
color: white;
border: none;
padding: 1px 4px 1px 4px;
}
div#comments div.comment h4 {
margin: 0;
}
div#comments div.comment h4 a {
color: #d5f4f4;
}
div.inlinecomments div.comment div.text,
div.commentwindow div.comment div.text,
div#comments div.comment div.text {
margin: -5px 0 -5px 0;
padding: 0 10px 0 10px;
}
div.inlinecomments div.comment div.meta,
div.commentwindow div.comment div.meta,
div#comments div.comment div.meta {
text-align: right;
padding: 2px 10px 2px 0;
font-size: 95%;
color: #538893;
border-top: 1px solid #cbe7e5;
background-color: #e0f6f4;
}
div.commentwindow {
position: absolute;
width: 500px;
border: 1px solid #cbe7e5;
background-color: #f2fbfd;
display: none;
z-index: 130;
}
div.commentwindow h3 {
margin: 0;
background-color: #2eabb0;
color: white;
border: none;
padding: 5px;
font-size: 1.5em;
cursor: pointer;
}
div.commentwindow div.actions {
margin: 10px -10px 0 -10px;
padding: 4px 10px 4px 10px;
color: #538893;
}
div.commentwindow div.actions input {
border: 1px solid #2eabb0;
background-color: white;
color: #135355;
cursor: pointer;
}
div.commentwindow div.form {
padding: 0 10px 0 10px;
}
div.commentwindow div.form input,
div.commentwindow div.form textarea {
border: 1px solid #3c9ea2;
background-color: white;
color: black;
}
div.commentwindow div.error {
margin: 10px 5px 10px 5px;
background-color: #fbe5dc;
display: none;
}
div.commentwindow div.form textarea {
width: 99%;
}
div.commentwindow div.preview {
margin: 10px 0 10px 0;
background-color: #70d0d4;
padding: 0 1px 1px 25px;
}
div.commentwindow div.preview h4 {
margin: 0 0 -5px -20px;
padding: 4px 0 0 4px;
color: white;
font-size: 1.3em;
}
div.commentwindow div.preview div.comment {
background-color: #f2fbfd;
}
div.commentwindow div.preview div.comment h4 {
margin: 10px 0 0 0!important;
padding: 1px 4px 1px 4px!important;
font-size: 1.2em;
}
/* :::: SUGGEST CHANGES :::: */
div#suggest-changes-box input, div#suggest-changes-box textarea {
border: 1px solid #ccc;
background-color: white;
color: black;
}
div#suggest-changes-box textarea {
width: 99%;
height: 400px;
}
/* :::: PREVIEW :::: */
div.preview {
background-image: url(style/preview.png);
padding: 0 20px 20px 20px;
margin-bottom: 30px;
}
/* :::: INDEX PAGE :::: */
table.contentstable {
width: 90%;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* :::: INDEX STYLES :::: */
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable dl, table.indextable dd {
margin-top: 0;
margin-bottom: 0;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
form.pfform {
margin: 10px 0 20px 0;
}
/* :::: GLOBAL STYLES :::: */
.docwarning {
background-color: #ffe4e4;
padding: 10px;
margin: 0 -20px 0 -20px;
border-bottom: 1px solid #f66;
}
p.subhead {
font-weight: bold;
margin-top: 20px;
}
a {
color: #355f7c;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: 'Trebuchet MS', sans-serif;
background-color: #f2f2f2;
font-weight: normal;
color: #20435c;
border-bottom: 1px solid #ccc;
margin: 20px -20px 10px -20px;
padding: 3px 0 3px 10px;
}
div.body h1 { margin-top: 0; font-size: 200%; }
div.body h2 { font-size: 160%; }
div.body h3 { font-size: 140%; }
div.body h4 { font-size: 120%; }
div.body h5 { font-size: 110%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
visibility: visible;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
div.body p, div.body dd, div.body li {
text-align: justify;
line-height: 130%;
}
div.body p.caption {
text-align: inherit;
}
div.body td {
text-align: left;
}
ul.fakelist {
list-style: none;
margin: 10px 0 10px 20px;
padding: 0;
}
.field-list ul {
padding-left: 1em;
}
.first {
margin-top: 0 !important;
}
/* "Footnotes" heading */
p.rubric {
margin-top: 30px;
font-weight: bold;
}
/* "Topics" */
div.topic {
background-color: #eee;
border: 1px solid #ccc;
padding: 0 7px 0 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* Admonitions */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
div.admonition dl {
margin-bottom: 0;
}
div.admonition p {
display: inline;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
display: inline;
}
p.admonition-title:after {
content: ":";
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
table.docutils {
border: 0;
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 0;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #aaa;
}
table.field-list td, table.field-list th {
border: 0 !important;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
dl {
margin-bottom: 15px;
clear: both;
}
dd p {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
.refcount {
color: #060;
}
dt:target,
.highlight {
background-color: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
th {
text-align: left;
padding-right: 5px;
}
pre {
padding: 5px;
background-color: #efc;
color: #333;
border: 1px solid #ac9;
border-left: none;
border-right: none;
overflow: auto;
}
td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
}
tt {
background-color: #ecf0f3;
padding: 0 1px 0 1px;
font-size: 0.95em;
}
tt.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
tt.descclassname {
background-color: transparent;
}
tt.xref, a tt {
background-color: transparent;
font-weight: bold;
}
.footnote:target { background-color: #ffa }
h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
background-color: transparent;
}
.optional {
font-size: 1.3em;
}
.versionmodified {
font-style: italic;
}
form.comment {
margin: 0;
padding: 10px 30px 10px 30px;
background-color: #eee;
}
form.comment h3 {
background-color: #326591;
color: white;
margin: -10px -30px 10px -30px;
padding: 5px;
font-size: 1.4em;
}
form.comment input,
form.comment textarea {
border: 1px solid #ccc;
padding: 2px;
font-family: sans-serif;
font-size: 100%;
}
form.comment input[type="text"] {
width: 240px;
}
form.comment textarea {
width: 100%;
height: 200px;
margin-bottom: 10px;
}
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
/* :::: PRINT :::: */
@media print {
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0;
width : 100%;
}
div.sphinxsidebar,
div.related,
div.footer,
div#comments div.new-comment-box,
#top-link {
display: none;
}
}

View File

@ -1,352 +0,0 @@
/// XXX: make it cross browser
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
*/
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {}
}
/**
* small helper function to urldecode strings
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
}
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s == 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
}
/**
* small function to check if an array contains
* a given item.
*/
jQuery.contains = function(arr, item) {
for (var i = 0; i < arr.length; i++) {
if (arr[i] == item)
return true;
}
return false;
}
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node) {
if (node.nodeType == 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && !jQuery.className.has(node.parentNode, className)) {
var span = document.createElement("span");
span.className = className;
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this)
});
}
}
return this.each(function() {
highlight(this);
});
}
/**
* Small JavaScript module for the documentation.
*/
var Documentation = {
init : function() {
/* this.addContextElements(); -- now done statically */
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initModIndex();
this.initComments();
},
/**
* add context elements like header anchor links
*/
addContextElements : function() {
for (var i = 1; i <= 6; i++) {
$('h' + i + '[@id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', 'Permalink to this headline').
appendTo(this);
});
}
$('dt[@id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', 'Permalink to this definition').
appendTo(this);
});
},
/**
* workaround a firefox stupidity
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
},
/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords : function() {
var params = $.getQueryParameters();
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlight');
});
}, 10);
$('<li class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">Hide Search Matches</a></li>')
.appendTo($('.sidebar .this-page-menu'));
}
},
/**
* init the modindex toggle buttons
*/
initModIndex : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
console.log($('tr.cg-' + idnum).toggle());
if (src.substr(-9) == 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX) {
togglers.click();
}
},
/**
* init the inline comments
*/
initComments : function() {
$('.inlinecomments div.actions').each(function() {
this.innerHTML += ' | ';
$(this).append($('<a href="#">hide comments</a>').click(function() {
$(this).parent().parent().toggle();
return false;
}));
});
$('.inlinecomments .comments').hide();
$('.inlinecomments a.bubble').each(function() {
$(this).click($(this).is('.emptybubble') ? function() {
var params = $.getQueryParameters(this.href);
Documentation.newComment(params.target[0]);
return false;
} : function() {
$('.comments', $(this).parent().parent()[0]).toggle();
return false;
});
});
$('#comments div.actions a.newcomment').click(function() {
Documentation.newComment();
return false;
});
if (document.location.hash.match(/^#comment-/))
$('.inlinecomments .comments ' + document.location.hash)
.parent().toggle();
},
/**
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
$('span.highlight').removeClass('highlight');
},
/**
* show the comment window for a certain id or the whole page.
*/
newComment : function(id) {
Documentation.CommentWindow.openFor(id || '');
},
/**
* write a new comment from within a comment view box
*/
newCommentFromBox : function(link) {
var params = $.getQueryParameters(link.href);
$(link).parent().parent().fadeOut('slow');
this.newComment(params.target);
},
/**
* make the url absolute
*/
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
},
/**
* get the current relative url
*/
getCurrentURL : function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this == '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
},
/**
* class that represents the comment window
*/
CommentWindow : (function() {
var openWindows = {};
var Window = function(sectionID) {
this.url = Documentation.makeURL('@comments/' + Documentation.getCurrentURL()
+ '/?target=' + $.urlencode(sectionID) + '&mode=ajax');
this.sectionID = sectionID;
this.root = $('<div class="commentwindow"></div>');
this.root.appendTo($('body'));
this.title = $('<h3>New Comment</h3>').appendTo(this.root);
this.body = $('<div class="form">please wait...</div>').appendTo(this.root);
this.resizeHandle = $('<div class="resizehandle"></div>').appendTo(this.root);
this.root.Draggable({
handle: this.title[0]
});
this.root.css({
left: window.innerWidth / 2 - $(this.root).width() / 2,
top: window.scrollY + (window.innerHeight / 2 - 150)
});
this.root.fadeIn('slow');
this.updateView();
};
Window.prototype.updateView = function(data) {
var self = this;
function update(data) {
if (data.posted) {
document.location.hash = '#comment-' + data.commentID;
document.location.reload();
}
else {
self.body.html(data.body);
$('div.actions', self.body).append($('<input>')
.attr('type', 'button')
.attr('value', 'Close')
.click(function() { self.close(); })
);
$('div.actions input[@name="preview"]')
.attr('type', 'button')
.click(function() { self.submitForm($('form', self.body)[0], true); });
$('form', self.body).bind("submit", function() {
self.submitForm(this);
return false;
});
if (data.error) {
self.root.Highlight(1000, '#aadee1');
$('div.error', self.root).slideDown(500);
}
}
}
if (typeof data == 'undefined')
$.getJSON(this.url, function(json) { update(json); });
else
$.ajax({
url: this.url,
type: 'POST',
dataType: 'json',
data: data,
success: function(json) { update(json); }
});
}
Window.prototype.getFormValue = function(name) {
return $('*[@name="' + name + '"]', this.body)[0].value;
}
Window.prototype.submitForm = function(form, previewMode) {
this.updateView({
author: form.author.value,
author_mail: form.author_mail.value,
title: form.title.value,
comment_body: form.comment_body.value,
preview: previewMode ? 'yes' : ''
});
}
Window.prototype.close = function() {
var self = this;
delete openWindows[this.sectionID];
this.root.fadeOut('slow', function() {
self.root.remove();
});
}
Window.openFor = function(sectionID) {
if (sectionID in openWindows)
return openWindows[sectionID];
return new Window(sectionID);
}
return Window;
})()
};
$(document).ready(function() {
Documentation.init();
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

View File

@ -1,59 +0,0 @@
.c { color: #408090; font-style: italic } /* Comment */
.err { border: 1px solid #FF0000 } /* Error */
.k { color: #007020; font-weight: bold } /* Keyword */
.o { color: #666666 } /* Operator */
.cm { color: #408090; font-style: italic } /* Comment.Multiline */
.cp { color: #007020 } /* Comment.Preproc */
.c1 { color: #408090; font-style: italic } /* Comment.Single */
.cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.gd { color: #A00000 } /* Generic.Deleted */
.ge { font-style: italic } /* Generic.Emph */
.gr { color: #FF0000 } /* Generic.Error */
.gh { color: #000080; font-weight: bold } /* Generic.Heading */
.gi { color: #00A000 } /* Generic.Inserted */
.go { color: #303030 } /* Generic.Output */
.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.gt { color: #0040D0 } /* Generic.Traceback */
.kc { color: #007020; font-weight: bold } /* Keyword.Constant */
.kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
.kp { color: #007020 } /* Keyword.Pseudo */
.kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
.kt { color: #902000 } /* Keyword.Type */
.m { color: #208050 } /* Literal.Number */
.s { color: #4070a0 } /* Literal.String */
.na { color: #4070a0 } /* Name.Attribute */
.nb { color: #007020 } /* Name.Builtin */
.nc { color: #0e84b5; font-weight: bold } /* Name.Class */
.no { color: #60add5 } /* Name.Constant */
.nd { color: #555555; font-weight: bold } /* Name.Decorator */
.ni { color: #d55537; font-weight: bold } /* Name.Entity */
.ne { color: #007020 } /* Name.Exception */
.nf { color: #06287e } /* Name.Function */
.nl { color: #002070; font-weight: bold } /* Name.Label */
.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
.nt { color: #062873; font-weight: bold } /* Name.Tag */
.nv { color: #bb60d5 } /* Name.Variable */
.ow { color: #007020; font-weight: bold } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: #208050 } /* Literal.Number.Float */
.mh { color: #208050 } /* Literal.Number.Hex */
.mi { color: #208050 } /* Literal.Number.Integer */
.mo { color: #208050 } /* Literal.Number.Oct */
.sb { color: #4070a0 } /* Literal.String.Backtick */
.sc { color: #4070a0 } /* Literal.String.Char */
.sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
.s2 { color: #4070a0 } /* Literal.String.Double */
.se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
.sh { color: #4070a0 } /* Literal.String.Heredoc */
.si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
.sx { color: #c65d09 } /* Literal.String.Other */
.sr { color: #235388 } /* Literal.String.Regex */
.s1 { color: #4070a0 } /* Literal.String.Single */
.ss { color: #517918 } /* Literal.String.Symbol */
.bp { color: #007020 } /* Name.Builtin.Pseudo */
.vc { color: #bb60d5 } /* Name.Variable.Class */
.vg { color: #bb60d5 } /* Name.Variable.Global */
.vi { color: #bb60d5 } /* Name.Variable.Instance */
.il { color: #208050 } /* Literal.Number.Integer.Long */

View File

@ -1,16 +0,0 @@
/**
* Sphinx Doc Design -- Right Side Bar Overrides
*/
div.sphinxsidebar {
float: right;
}
div.bodywrapper {
margin: 0 230px 0 0;
}
div.inlinecomments {
right: 250px;
}

View File

@ -1,404 +0,0 @@
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words, hlwords is the list of normal, unstemmed
* words. the first one is used to find the occurance, the
* latter for highlighting it.
*/
jQuery.makeSearchSummary = function(text, keywords, hlwords) {
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
var i = textLower.indexOf(this.toLowerCase());
if (i > -1) {
start = i;
}
});
start = Math.max(start - 120, 0);
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlight');
});
return rv;
}
/**
* Porter Stemmer
*/
var PorterStemmer = function() {
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
};
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3) {
return w;
}
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y") {
w = firstch.toUpperCase() + w.substr(1);
}
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w)) {
w = w.replace(re,"$1$2");
}
else if (re2.test(w)) {
w = w.replace(re2,"$1$2");
}
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w)) {
w = w + "e";
}
else if (re3.test(w)) {
re = /.$/; w = w.replace(re,"");
}
else if (re4.test(w)) {
w = w + "e";
}
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem)) { w = stem + "i"; }
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem)) {
w = stem + step2list[suffix];
}
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem)) {
w = stem + step3list[suffix];
}
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem)) {
w = stem;
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem)) {
w = stem;
}
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {
w = stem;
}
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y") {
w = firstch.toLowerCase() + w.substr(1);
}
return w;
}
}
/**
* Search Module
*/
var Search = {
init : function() {
var params = $.getQueryParameters();
if (params.q) {
var query = params.q[0];
$('input[@name="q"]')[0].value = query;
this.performSearch(query);
}
},
/**
* perform a search for something
*/
performSearch : function(query) {
// create the required interface elements
var out = $('#search-results');
var title = $('<h2>Searching</h2>').appendTo(out);
var dots = $('<span></span>').appendTo(title);
var status = $('<p style="display: none"></p>').appendTo(out);
var output = $('<ul class="search"/>').appendTo(out);
// spawn a background runner for updating the dots
// until the search has finished
var pulseStatus = 0;
function pulse() {
pulseStatus = (pulseStatus + 1) % 4;
var dotString = '';
for (var i = 0; i < pulseStatus; i++) {
dotString += '.';
}
dots.text(dotString);
if (pulseStatus > -1) {
window.setTimeout(pulse, 500);
}
};
pulse();
// stem the searchwords and add them to the
// correct list
var stemmer = new PorterStemmer();
var searchwords = [];
var excluded = [];
var hlwords = [];
var tmp = query.split(/\s+/);
for (var i = 0; i < tmp.length; i++) {
// stem the word
var word = stemmer.stemWord(tmp[i]).toLowerCase();
// select the correct list
if (word[0] == '-') {
var toAppend = excluded;
word = word.substr(1);
}
else {
var toAppend = searchwords;
hlwords.push(tmp[i].toLowerCase());
}
// only add if not already in the list
if (!$.contains(toAppend, word)) {
toAppend.push(word);
}
};
var highlightstring = '?highlight=' + $.urlencode(hlwords.join(" "));
console.debug('SEARCH: searching for:');
console.info('required: ', searchwords);
console.info('excluded: ', excluded);
// fetch searchindex and perform search
$.getJSON('searchindex.json', function(data) {
// prepare search
var filenames = data[0];
var titles = data[1]
var words = data[2];
var fileMap = {};
var files = null;
// perform the search on the required words
for (var i = 0; i < searchwords.length; i++) {
var word = searchwords[i];
// no match but word was a required one
if ((files = words[word]) == null) {
break;
}
// create the mapping
for (var j = 0; j < files.length; j++) {
var file = files[j];
if (file in fileMap) {
fileMap[file].push(word);
}
else {
fileMap[file] = [word];
}
}
}
// now check if the files are in the correct
// areas and if the don't contain excluded words
var results = [];
for (var file in fileMap) {
var valid = true;
// check if all requirements are matched
if (fileMap[file].length != searchwords.length) {
continue;
}
// ensure that none of the excluded words is in the
// search result.
for (var i = 0; i < excluded.length; i++) {
if ($.contains(words[excluded[i]] || [], file)) {
valid = false;
break;
}
}
// if we have still a valid result we can add it
// to the result list
if (valid) {
results.push([filenames[file], titles[file]]);
}
}
// delete unused variables in order to not waste
// memory until list is retrieved completely
delete filenames, titles, words, data;
// now sort the results by title
results.sort(function(a, b) {
var left = a[1].toLowerCase();
var right = b[1].toLowerCase();
return (left > right) ? -1 : ((left < right) ? 1 : 0);
});
// print the results
var resultCount = results.length;
function displayNextItem() {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
listItem.append($('<a/>').attr(
'href',
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
highlightstring).html(item[1]));
$.get('_sources/' + item[0] + '.txt', function(data) {
listItem.append($.makeSearchSummary(data, searchwords, hlwords));
output.append(listItem);
listItem.slideDown(10, function() {
displayNextItem();
});
});
}
// search finished, update title and status message
else {
pulseStatus = -1;
title.text('Search Results');
if (!resultCount) {
status.text('Your search did not match any documents. ' +
'Please make sure that all words are spelled ' +
'correctly and that you\'ve selected enough ' +
'categories.');
}
else {
status.text('Search finished, found ' + resultCount +
' page' + (resultCount != 1 ? 's' : '') +
' matching the search query.');
}
status.fadeIn(500);
}
}
displayNextItem();
});
}
}
$(document).ready(function() {
Search.init();
});

View File

@ -1,504 +0,0 @@
/**
* Alternate Sphinx design
* Originally created by Armin Ronacher for Werkzeug, adapted by Georg Brandl.
*/
body {
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
font-size: 14px;
letter-spacing: -0.01em;
line-height: 150%;
text-align: center;
/*background-color: #AFC1C4; */
background-color: #BFD1D4;
color: black;
padding: 0;
border: 1px solid #aaa;
margin: 0px 80px 0px 80px;
min-width: 740px;
}
a {
color: #CA7900;
text-decoration: none;
}
a:hover {
color: #2491CF;
}
pre {
font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 0.95em;
letter-spacing: 0.015em;
padding: 0.5em;
border: 1px solid #ccc;
background-color: #f8f8f8;
}
td.linenos pre {
padding: 0.5em 0;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
}
cite, code, tt {
font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 0.95em;
letter-spacing: 0.01em;
}
hr {
border: 1px solid #abc;
margin: 2em;
}
tt {
background-color: #f2f2f2;
border-bottom: 1px solid #ddd;
color: #333;
}
tt.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
border: 0;
}
tt.descclassname {
background-color: transparent;
border: 0;
}
tt.xref {
background-color: transparent;
font-weight: bold;
border: 0;
}
a tt {
background-color: transparent;
font-weight: bold;
border: 0;
color: #CA7900;
}
a tt:hover {
color: #2491CF;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
dl {
margin-bottom: 15px;
}
dd p {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
.refcount {
color: #060;
}
dt:target,
.highlight {
background-color: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
pre {
line-height: 120%;
}
pre a {
color: inherit;
text-decoration: underline;
}
.first {
margin-top: 0 !important;
}
div.document {
background-color: white;
text-align: left;
background-image: url(contents.png);
background-repeat: repeat-x;
}
/*
div.documentwrapper {
width: 100%;
}
*/
div.clearer {
clear: both;
}
div.related h3 {
display: none;
}
div.related ul {
background-image: url(navigation.png);
height: 2em;
list-style: none;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 0;
padding-left: 10px;
}
div.related ul li {
margin: 0;
padding: 0;
height: 2em;
float: left;
}
div.related ul li.right {
float: right;
margin-right: 5px;
}
div.related ul li a {
margin: 0;
padding: 0 5px 0 5px;
line-height: 1.75em;
color: #EE9816;
}
div.related ul li a:hover {
color: #3CA8E7;
}
div.body {
margin: 0;
padding: 0.5em 20px 20px 20px;
}
div.bodywrapper {
margin: 0 240px 0 0;
border-right: 1px solid #ccc;
}
div.body a {
text-decoration: underline;
}
div.sphinxsidebar {
margin: 0;
padding: 0.5em 15px 15px 0;
width: 210px;
float: right;
text-align: left;
/* margin-left: -100%; */
}
div.sphinxsidebar h4, div.sphinxsidebar h3 {
margin: 1em 0 0.5em 0;
font-size: 0.9em;
padding: 0.1em 0 0.1em 0.5em;
color: white;
border: 1px solid #86989B;
background-color: #AFC1C4;
}
div.sphinxsidebar ul {
padding-left: 1.5em;
margin-top: 7px;
list-style: none;
padding: 0;
line-height: 130%;
}
div.sphinxsidebar ul ul {
list-style: square;
margin-left: 20px;
}
p {
margin: 0.8em 0 0.5em 0;
}
p.rubric {
font-weight: bold;
}
h1 {
margin: 0;
padding: 0.7em 0 0.3em 0;
font-size: 1.5em;
color: #11557C;
}
h2 {
margin: 1.3em 0 0.2em 0;
font-size: 1.35em;
padding: 0;
}
h3 {
margin: 1em 0 -0.3em 0;
font-size: 1.2em;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
color: black!important;
}
h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor {
display: none;
margin: 0 0 0 0.3em;
padding: 0 0.2em 0 0.2em;
color: #aaa!important;
}
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor,
h5:hover a.anchor, h6:hover a.anchor {
display: inline;
}
h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover,
h5 a.anchor:hover, h6 a.anchor:hover {
color: #777;
background-color: #eee;
}
table {
border-collapse: collapse;
margin: 0 -0.5em 0 -0.5em;
}
table td, table th {
padding: 0.2em 0.5em 0.2em 0.5em;
}
div.footer {
background-color: #E3EFF1;
color: #86989B;
padding: 3px 8px 3px 0;
clear: both;
font-size: 0.8em;
text-align: right;
}
div.footer a {
color: #86989B;
text-decoration: underline;
}
div.pagination {
margin-top: 2em;
padding-top: 0.5em;
border-top: 1px solid black;
text-align: center;
}
div.sphinxsidebar ul.toc {
margin: 1em 0 1em 0;
padding: 0 0 0 0.5em;
list-style: none;
}
div.sphinxsidebar ul.toc li {
margin: 0.5em 0 0.5em 0;
font-size: 0.9em;
line-height: 130%;
}
div.sphinxsidebar ul.toc li p {
margin: 0;
padding: 0;
}
div.sphinxsidebar ul.toc ul {
margin: 0.2em 0 0.2em 0;
padding: 0 0 0 1.8em;
}
div.sphinxsidebar ul.toc ul li {
padding: 0;
}
div.admonition, div.warning {
font-size: 0.9em;
margin: 1em 0 0 0;
border: 1px solid #86989B;
background-color: #f7f7f7;
}
div.admonition p, div.warning p {
margin: 0.5em 1em 0.5em 1em;
padding: 0;
}
div.admonition pre, div.warning pre {
margin: 0.4em 1em 0.4em 1em;
}
div.admonition p.admonition-title,
div.warning p.admonition-title {
margin: 0;
padding: 0.1em 0 0.1em 0.5em;
color: white;
border-bottom: 1px solid #86989B;
font-weight: bold;
background-color: #AFC1C4;
}
div.warning {
border: 1px solid #940000;
}
div.warning p.admonition-title {
background-color: #CF0000;
border-bottom-color: #940000;
}
div.admonition ul, div.admonition ol,
div.warning ul, div.warning ol {
margin: 0.1em 0.5em 0.5em 3em;
padding: 0;
}
div.versioninfo {
margin: 1em 0 0 0;
border: 1px solid #ccc;
background-color: #DDEAF0;
padding: 8px;
line-height: 1.3em;
font-size: 0.9em;
}
a.headerlink {
color: #c60f0f!important;
font-size: 1em;
margin-left: 6px;
padding: 0 4px 0 4px;
text-decoration: none!important;
visibility: hidden;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
visibility: visible;
}
a.headerlink:hover {
background-color: #ccc;
color: white!important;
}
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable dl, table.indextable dd {
margin-top: 0;
margin-bottom: 0;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
form.pfform {
margin: 10px 0 20px 0;
}
table.contentstable {
width: 90%;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}

View File

@ -1,19 +0,0 @@
/**
* Sphinx Doc Design -- Sticky sidebar Overrides
*/
div.sphinxsidebar {
top: 30px;
left: 0px;
position: fixed;
margin: 0;
float: none;
}
div.related {
position: fixed;
}
div.documentwrapper {
margin-top: 30px;
}

View File

@ -1,700 +0,0 @@
/**
* Sphinx Doc Design -- traditional python.org style
*/
body {
color: #000;
margin: 0;
padding: 0;
}
/* :::: LAYOUT :::: */
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 230px 0 0;
}
div.body {
background-color: white;
padding: 0 20px 30px 20px;
}
div.sphinxsidebarwrapper {
border: 1px solid #99ccff;
padding: 10px;
margin: 10px 15px 10px 0;
}
div.sphinxsidebar {
float: right;
margin-left: -100%;
width: 230px;
}
div.clearer {
clear: both;
}
div.footer {
clear: both;
width: 100%;
background-color: #99ccff;
padding: 9px 0 9px 0;
text-align: center;
}
div.related {
background-color: #99ccff;
color: #333;
width: 100%;
height: 30px;
line-height: 30px;
border-bottom: 5px solid white;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
font-weight: bold;
}
div.related li.right {
float: right;
margin-right: 5px;
}
/* ::: SIDEBAR :::: */
div.sphinxsidebar h3 {
margin: 0;
}
div.sphinxsidebar h4 {
margin: 5px 0 0 0;
}
div.sphinxsidebar p.topless {
margin: 5px 10px 10px 10px;
}
div.sphinxsidebar ul {
margin: 10px;
margin-left: 15px;
padding: 0;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar form {
margin-top: 10px;
}
/* :::: SEARCH :::: */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* :::: COMMON FORM STYLES :::: */
div.actions {
border-top: 1px solid #aaa;
background-color: #ddd;
margin: 10px 0 0 -20px;
padding: 5px 0 5px 20px;
}
form dl {
color: #333;
}
form dt {
clear: both;
float: left;
min-width: 110px;
margin-right: 10px;
padding-top: 2px;
}
input#homepage {
display: none;
}
div.error {
margin: 5px 20px 0 0;
padding: 5px;
border: 1px solid #d00;
/*border: 2px solid #05171e;
background-color: #092835;
color: white;*/
font-weight: bold;
}
/* :::: INLINE COMMENTS :::: */
div.inlinecommentswrapper {
float: right;
max-width: 40%;
}
div.commentmarker {
float: right;
background-image: url(style/comment.png);
background-repeat: no-repeat;
width: 25px;
height: 25px;
text-align: center;
padding-top: 3px;
}
div.nocommentmarker {
float: right;
background-image: url(style/nocomment.png);
background-repeat: no-repeat;
width: 25px;
height: 25px;
}
div.inlinecomments {
margin-left: 10px;
margin-bottom: 5px;
background-color: #eee;
border: 1px solid #ccc;
padding: 5px;
}
div.inlinecomment {
border-top: 1px solid #ccc;
padding-top: 5px;
margin-top: 5px;
}
.inlinecomments p {
margin: 5px 0 5px 0;
}
.inlinecomments .head {
font-weight: bold;
}
.inlinecomments .meta {
font-style: italic;
}
/* :::: COMMENTS :::: */
div#comments h3 {
border-top: 1px solid #aaa;
padding: 5px 20px 5px 20px;
margin: 20px -20px 20px -20px;
background-color: #ddd;
}
/*
div#comments {
background-color: #ccc;
margin: 40px -20px -30px -20px;
padding: 0 0 1px 0;
}
div#comments h4 {
margin: 30px 0 20px 0;
background-color: #aaa;
border-bottom: 1px solid #09232e;
color: #333;
}
div#comments form {
display: block;
margin: 0 0 0 20px;
}
div#comments textarea {
width: 98%;
height: 160px;
}
div#comments div.help {
margin: 20px 20px 10px 0;
background-color: #ccc;
color: #333;
}
div#comments div.help p {
margin: 0;
padding: 0 0 10px 0;
}
div#comments input, div#comments textarea {
font-family: 'Bitstream Vera Sans', 'Arial', sans-serif;
font-size: 13px;
color: black;
background-color: #aaa;
border: 1px solid #092835;
}
div#comments input[type="reset"],
div#comments input[type="submit"] {
cursor: pointer;
font-weight: bold;
padding: 2px;
margin: 5px 5px 5px 0;
background-color: #666;
color: white;
}
div#comments div.comment {
margin: 10px 10px 10px 20px;
padding: 10px;
border: 1px solid #0f3646;
background-color: #aaa;
color: #333;
}
div#comments div.comment p {
margin: 5px 0 5px 0;
}
div#comments div.comment p.meta {
font-style: italic;
color: #444;
text-align: right;
margin: -5px 0 -5px 0;
}
div#comments div.comment h4 {
margin: -10px -10px 5px -10px;
padding: 3px;
font-size: 15px;
background-color: #888;
color: white;
border: 0;
}
div#comments div.comment pre,
div#comments div.comment tt {
background-color: #ddd;
color: #111;
border: none;
}
div#comments div.comment a {
color: #fff;
text-decoration: underline;
}
div#comments div.comment blockquote {
margin: 10px;
padding: 10px;
border-left: 1px solid #0f3646;
/*border: 1px solid #0f3646;
background-color: #071c25;*/
}
div#comments em.important {
color: #d00;
font-weight: bold;
font-style: normal;
}*/
/* :::: SUGGEST CHANGES :::: */
div#suggest-changes-box input, div#suggest-changes-box textarea {
border: 1px solid #ccc;
background-color: white;
color: black;
}
div#suggest-changes-box textarea {
width: 99%;
height: 400px;
}
/* :::: PREVIEW :::: */
div.preview {
background-image: url(style/preview.png);
padding: 0 20px 20px 20px;
margin-bottom: 30px;
}
/* :::: INDEX PAGE :::: */
table.contentstable {
width: 90%;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.5em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
}
/* :::: GENINDEX STYLES :::: */
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable dl, table.indextable dd {
margin-top: 0;
margin-bottom: 0;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
/* :::: GLOBAL STYLES :::: */
p.subhead {
font-weight: bold;
margin-top: 20px;
}
a:link:active { color: #ff0000; }
a:link:hover { background-color: #bbeeff; }
a:visited:hover { background-color: #bbeeff; }
a:visited { color: #551a8b; }
a:link { color: #0000bb; }
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: avantgarde, sans-serif;
font-weight: bold;
}
div.body h1 { font-size: 180%; }
div.body h2 { font-size: 150%; }
div.body h3 { font-size: 120%; }
div.body h4 { font-size: 120%; }
a.headerlink,
a.headerlink,
a.headerlink,
a.headerlink,
a.headerlink,
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
*:hover > a.headerlink,
*:hover > a.headerlink,
*:hover > a.headerlink,
*:hover > a.headerlink,
*:hover > a.headerlink,
*:hover > a.headerlink {
visibility: visible;
}
a.headerlink:hover,
a.headerlink:hover,
a.headerlink:hover,
a.headerlink:hover,
a.headerlink:hover,
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
div.body p, div.body dd, div.body li {
text-align: justify;
}
div.body td {
text-align: left;
}
ul.fakelist {
list-style: none;
margin: 10px 0 10px 20px;
padding: 0;
}
/* "Footnotes" heading */
p.rubric {
margin-top: 30px;
font-weight: bold;
}
/* "Topics" */
div.topic {
background-color: #eee;
border: 1px solid #ccc;
padding: 0 7px 0 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* Admonitions */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
div.admonition dd {
margin-bottom: 10px;
}
div.admonition dl {
margin-bottom: 0;
}
div.admonition p {
display: inline;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
display: inline;
}
p.admonition-title:after {
content: ":";
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
table.docutils {
border: 0;
}
table.docutils td, table.docutils th {
padding: 0 8px 2px 0;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #aaa;
}
table.field-list td, table.field-list th {
border: 0 !important;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
dl {
margin-bottom: 15px;
clear: both;
}
dd p {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
.refcount {
color: #060;
}
th {
text-align: left;
padding-right: 5px;
}
pre {
font-family: monospace;
padding: 5px;
color: #00008b;
border-left: none;
border-right: none;
}
tt {
font-family: monospace;
background-color: #ecf0f3;
padding: 0 1px 0 1px;
}
tt.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
tt.descclassname {
background-color: transparent;
}
tt.xref, a tt {
background-color: transparent;
font-weight: bold;
}
.footnote:target { background-color: #ffa }
h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
background-color: transparent;
}
.optional {
font-size: 1.3em;
}
.versionmodified {
font-style: italic;
}
form.comment {
margin: 0;
padding: 10px 30px 10px 30px;
background-color: #eee;
}
form.comment h3 {
background-color: #326591;
color: white;
margin: -10px -30px 10px -30px;
padding: 5px;
font-size: 1.4em;
}
form.comment input,
form.comment textarea {
border: 1px solid #ccc;
padding: 2px;
font-family: sans-serif;
font-size: 13px;
}
form.comment input[type="text"] {
width: 240px;
}
form.comment textarea {
width: 100%;
height: 200px;
margin-bottom: 10px;
}
/* :::: PRINT :::: */
@media print {
div.documentwrapper {
width: 100%;
}
div.body {
margin: 0;
}
div.sphinxsidebar,
div.related,
div.footer,
div#comments div.new-comment-box,
#top-link {
display: none;
}
}

View File

@ -1,201 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &mdash; deluge v1.1.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.1.0',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: ''
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/interface.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="contents" title="Global table of contents" href="contents.html" />
<link rel="index" title="Global index" href="" />
<link rel="search" title="Search" href="search.html" />
<link rel="top" title="deluge v1.1.0 documentation" href="index.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="index.html">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<h1 id="index">Index</h1>
<a href="#_"><strong>_</strong></a> | <a href="#A"><strong>A</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#L"><strong>L</strong></a> | <a href="#O"><strong>O</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#V"><strong>V</strong></a> | <a href="#W"><strong>W</strong></a>
<hr />
<h2 id="_">_</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/config.html#deluge.config.Config.__getitem__">__getitem__() (deluge.config.Config method)</a></dt>
<dt><a href="modules/config.html#deluge.config.Config.__setitem__">__setitem__() (deluge.config.Config method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="A">A</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/config.html#deluge.config.Config.apply_all">apply_all() (deluge.config.Config method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="C">C</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/config.html#deluge.config.Config">Config (class in deluge.config)</a></dt>
<dt><a href="modules/config.html#deluge.config.Config.config">config (deluge.config.Config attribute)</a></dt></dl></td><td width="33%" valign="top"><dl>
<dt><a href="modules/common.html#deluge.common.create_magnet_uri">create_magnet_uri() (in module deluge.common)</a></dt>
</dl></td></tr></table>
<h2 id="D">D</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/common.html#module-deluge.common">deluge.common (module)</a></dt>
<dt><a href="modules/config.html#module-deluge.config">deluge.config (module)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="F">F</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/common.html#deluge.common.fdate">fdate() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.fetch_url">fetch_url() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.fpcnt">fpcnt() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.fpeer">fpeer() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.free_space">free_space() (in module deluge.common)</a></dt></dl></td><td width="33%" valign="top"><dl>
<dt><a href="modules/common.html#deluge.common.fsize">fsize() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.fspeed">fspeed() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.ftime">ftime() (in module deluge.common)</a></dt>
</dl></td></tr></table>
<h2 id="G">G</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/common.html#deluge.common.get_default_config_dir">get_default_config_dir() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.get_default_download_dir">get_default_download_dir() (in module deluge.common)</a></dt>
<dt><a href="modules/config.html#deluge.config.Config.get_item">get_item() (deluge.config.Config method)</a></dt>
<dt><a href="modules/common.html#deluge.common.get_path_size">get_path_size() (in module deluge.common)</a></dt></dl></td><td width="33%" valign="top"><dl>
<dt><a href="modules/common.html#deluge.common.get_pixmap">get_pixmap() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.get_revision">get_revision() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.get_version">get_version() (in module deluge.common)</a></dt>
</dl></td></tr></table>
<h2 id="I">I</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/common.html#deluge.common.is_ip">is_ip() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.is_magnet">is_magnet() (in module deluge.common)</a></dt></dl></td><td width="33%" valign="top"><dl>
<dt><a href="modules/common.html#deluge.common.is_url">is_url() (in module deluge.common)</a></dt>
</dl></td></tr></table>
<h2 id="L">L</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/config.html#deluge.config.Config.load">load() (deluge.config.Config method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="O">O</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/common.html#deluge.common.open_file">open_file() (in module deluge.common)</a></dt>
<dt><a href="modules/common.html#deluge.common.open_url_in_browser">open_url_in_browser() (in module deluge.common)</a></dt></dl></td><td width="33%" valign="top"><dl>
<dt><a href="modules/common.html#deluge.common.osx_check">osx_check() (in module deluge.common)</a></dt>
</dl></td></tr></table>
<h2 id="R">R</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/config.html#deluge.config.Config.register_change_callback">register_change_callback() (deluge.config.Config method)</a></dt>
<dt><a href="modules/config.html#deluge.config.Config.register_set_function">register_set_function() (deluge.config.Config method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="S">S</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/config.html#deluge.config.Config.save">save() (deluge.config.Config method)</a></dt>
<dt><a href="modules/config.html#deluge.config.Config.set_item">set_item() (deluge.config.Config method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="V">V</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/common.html#deluge.common.vista_check">vista_check() (in module deluge.common)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="W">W</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="modules/common.html#deluge.common.windows_check">windows_check() (in module deluge.common)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" /> <input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="index.html">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2008, Andrew Resch.
Last updated on Nov 06, 2008.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
</body>
</html>

View File

@ -1,123 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to deluge&#8217;s documentation! &mdash; deluge v1.1.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.1.0',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: ''
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/interface.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="contents" title="Global table of contents" href="contents.html" />
<link rel="index" title="Global index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="top" title="deluge v1.1.0 documentation" href="" />
<link rel="next" title="deluge.common" href="modules/common.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="modules/common.html" title="deluge.common"
accesskey="N">next</a> |</li>
<li><a href="">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section">
<h1 id="welcome-to-deluge-s-documentation">Welcome to deluge&#8217;s documentation!<a class="headerlink" href="#welcome-to-deluge-s-documentation" title="Permalink to this headline"></a></h1>
<p>Contents:</p>
</div>
<div class="section">
<h1 id="indices-and-tables">Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><a class="reference" href="genindex.html"><em>Index</em></a></li>
<li><a class="reference" href="modindex.html"><em>Module Index</em></a></li>
<li><a class="reference" href="search.html"><em>Search Page</em></a></li>
</ul>
</div>
<div class="section">
<h1 id="modules">Modules<a class="headerlink" href="#modules" title="Permalink to this headline"></a></h1>
<ul>
<li><a class="reference" href="modules/common.html"><tt class="docutils literal"><span class="pre">deluge.common</span></tt></a></li>
</ul>
<ul>
<li><a class="reference" href="modules/config.html"><tt class="docutils literal"><span class="pre">deluge.config</span></tt></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3>Table Of Contents</h3>
<ul>
<li><a class="reference" href="">Welcome to deluge&#8217;s documentation!</a><ul>
</ul>
</li>
<li><a class="reference" href="#indices-and-tables">Indices and tables</a></li>
<li><a class="reference" href="#modules">Modules</a><ul>
</ul>
</li>
</ul>
<h4>Next topic</h4>
<p class="topless"><a href="modules/common.html" title="next chapter"><tt class="docutils literal"><span class="pre">deluge.common</span></tt></a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.txt">Show Source</a></li>
</ul>
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" /> <input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="modules/common.html" title="deluge.common"
accesskey="N">next</a> |</li>
<li><a href="">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2008, Andrew Resch.
Last updated on Nov 06, 2008.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
</body>
</html>

View File

@ -1,102 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Global Module Index &mdash; deluge v1.1.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.1.0',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: ''
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/interface.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="contents" title="Global table of contents" href="contents.html" />
<link rel="index" title="Global index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="top" title="deluge v1.1.0 documentation" href="index.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="index.html">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<h1 id="global-module-index">Global Module Index</h1>
<a href="#cap-D"><strong>D</strong></a>
<hr/>
<table width="100%" class="indextable" cellspacing="0" cellpadding="2"><tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>
<tr class="cap"><td></td><td><a name="cap-D"><strong>D</strong></a></td><td></td></tr><tr>
<td><img src="_static/minus.png" id="toggle-1"
class="toggler" style="display: none" /></td>
<td>
<tt class="xref">deluge</tt></td><td>
<em></em></td></tr><tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="modules/common.html#module-deluge.common"><tt class="xref">deluge.common</tt></a></td><td>
<em></em></td></tr><tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="modules/config.html#module-deluge.config"><tt class="xref">deluge.config</tt></a></td><td>
<em></em></td></tr>
</table>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" /> <input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="index.html">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2008, Andrew Resch.
Last updated on Nov 06, 2008.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
</body>
</html>

View File

@ -1,614 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>deluge.common &mdash; deluge v1.1.0 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '1.1.0',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: ''
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/interface.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="contents" title="Global table of contents" href="../contents.html" />
<link rel="index" title="Global index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="deluge v1.1.0 documentation" href="../index.html" />
<link rel="next" title="deluge.config" href="config.html" />
<link rel="prev" title="Welcome to deluge&#8217;s documentation!" href="../index.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="config.html" title="deluge.config"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../index.html" title="Welcome to deluge&#8217;s documentation!"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section">
<h1 id="module-deluge.common"><tt class="xref docutils literal"><span class="pre">deluge.common</span></tt><a class="headerlink" href="#module-deluge.common" title="Permalink to this headline"></a></h1>
<p>Common functions for various parts of Deluge to use.</p>
<dl class="function">
<dt id="deluge.common.create_magnet_uri">
<!--[deluge.common.create_magnet_uri]--><tt class="descclassname">deluge.common.</tt><tt class="descname">create_magnet_uri</tt><big>(</big><em>infohash</em>, <em>name=None</em>, <em>trackers=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#deluge.common.create_magnet_uri" title="Permalink to this definition"></a></dt>
<dd><p>Creates a magnet uri</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>infohash</em> &#8211; string, the info-hash of the torrent</li>
<li><em>name</em> &#8211; string, the name of the torrent (optional)</li>
<li><em>trackers</em> &#8211; list of strings, the trackers to announce to (optional)</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a magnet uri string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.fdate">
<!--[deluge.common.fdate]--><tt class="descclassname">deluge.common.</tt><tt class="descname">fdate</tt><big>(</big><em>seconds</em><big>)</big><a class="headerlink" href="#deluge.common.fdate" title="Permalink to this definition"></a></dt>
<dd><p>Formats a date string in the form of DD/MM/YY based on the systems timezone</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>seconds</em> &#8211; float, time in seconds since the Epoch</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a string in the form of DD/MM/YY or &#8220;&#8221; if seconds &lt; 0</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.fetch_url">
<!--[deluge.common.fetch_url]--><tt class="descclassname">deluge.common.</tt><tt class="descname">fetch_url</tt><big>(</big><em>url</em><big>)</big><a class="headerlink" href="#deluge.common.fetch_url" title="Permalink to this definition"></a></dt>
<dd><p>Downloads a torrent file from a given URL and checks the file&#8217;s validity</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>url</em> &#8211; string, the url of the .torrent file to fetch</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">the filepath to the downloaded file</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.fpcnt">
<!--[deluge.common.fpcnt]--><tt class="descclassname">deluge.common.</tt><tt class="descname">fpcnt</tt><big>(</big><em>dec</em><big>)</big><a class="headerlink" href="#deluge.common.fpcnt" title="Permalink to this definition"></a></dt>
<dd><p>Formats a string to display a percentage with two decimal places</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>dec</em> &#8211; float, the ratio in the range [0.0, 1.0]</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a formatted string representing a percentage</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">fpcnt</span><span class="p">(</span><span class="mf">0.9311</span><span class="p">)</span>
<span class="go">&#39;93.11%&#39;</span>
</pre></div>
</dd></dl>
<dl class="function">
<dt id="deluge.common.fpeer">
<!--[deluge.common.fpeer]--><tt class="descclassname">deluge.common.</tt><tt class="descname">fpeer</tt><big>(</big><em>num_peers</em>, <em>total_peers</em><big>)</big><a class="headerlink" href="#deluge.common.fpeer" title="Permalink to this definition"></a></dt>
<dd><p>Formats a string to show &#8216;num_peers&#8217; (&#8216;total_peers&#8217;)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>num_peers</em> &#8211; int, the number of connected peers</li>
<li><em>total_peers</em> &#8211; int, the total number of peers</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a formatted string: num_peers (total_peers), if total_peers &lt; 0, then it will not be shown</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">fpeer</span><span class="p">(</span><span class="mf">10</span><span class="p">,</span> <span class="mf">20</span><span class="p">)</span>
<span class="go">&#39;10 (20)&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">fpeer</span><span class="p">(</span><span class="mf">10</span><span class="p">,</span> <span class="o">-</span><span class="mf">1</span><span class="p">)</span>
<span class="go">&#39;10&#39;</span>
</pre></div>
</dd></dl>
<dl class="function">
<dt id="deluge.common.free_space">
<!--[deluge.common.free_space]--><tt class="descclassname">deluge.common.</tt><tt class="descname">free_space</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#deluge.common.free_space" title="Permalink to this definition"></a></dt>
<dd><p>Gets the free space available at &#8216;path&#8217;</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>path</em> &#8211; string, the path to check</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">the free space at path in bytes</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">int</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.fsize">
<!--[deluge.common.fsize]--><tt class="descclassname">deluge.common.</tt><tt class="descname">fsize</tt><big>(</big><em>fsize_b</em><big>)</big><a class="headerlink" href="#deluge.common.fsize" title="Permalink to this definition"></a></dt>
<dd><p>Formats the bytes value into a string with KiB, MiB or GiB units</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>fsize_b</em> &#8211; int, the filesize in bytes</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">formatted string in KiB, MiB or GiB units</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">fsize</span><span class="p">(</span><span class="mf">112245</span><span class="p">)</span>
<span class="go">&#39;109.6 KiB&#39;</span>
</pre></div>
</dd></dl>
<dl class="function">
<dt id="deluge.common.fspeed">
<!--[deluge.common.fspeed]--><tt class="descclassname">deluge.common.</tt><tt class="descname">fspeed</tt><big>(</big><em>bps</em><big>)</big><a class="headerlink" href="#deluge.common.fspeed" title="Permalink to this definition"></a></dt>
<dd><p>Formats a string to display a transfer speed utilizing <a title="deluge.common.fsize" class="reference" href="#deluge.common.fsize"><tt class="xref docutils literal"><span class="pre">fsize()</span></tt></a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>bps</em> &#8211; int, bytes per second</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a formatted string representing transfer speed</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">fspeed</span><span class="p">(</span><span class="mf">43134</span><span class="p">)</span>
<span class="go">&#39;42.1 KiB/s&#39;</span>
</pre></div>
</dd></dl>
<dl class="function">
<dt id="deluge.common.ftime">
<!--[deluge.common.ftime]--><tt class="descclassname">deluge.common.</tt><tt class="descname">ftime</tt><big>(</big><em>seconds</em><big>)</big><a class="headerlink" href="#deluge.common.ftime" title="Permalink to this definition"></a></dt>
<dd><p>Formats a string to show time in a human readable form</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>seconds</em> &#8211; int, the number of seconds</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a formatted time string, will return &#8216;unknown&#8217; for values greater than 10 weeks and &#8216;Infinity&#8217; if seconds == 0</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">ftime</span><span class="p">(</span><span class="mf">23011</span><span class="p">)</span>
<span class="go">&#39;6h 23m&#39;</span>
</pre></div>
</dd></dl>
<dl class="function">
<dt id="deluge.common.get_default_config_dir">
<!--[deluge.common.get_default_config_dir]--><tt class="descclassname">deluge.common.</tt><tt class="descname">get_default_config_dir</tt><big>(</big><em>filename=None</em><big>)</big><a class="headerlink" href="#deluge.common.get_default_config_dir" title="Permalink to this definition"></a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>filename</em> &#8211; if None, only the config path is returned, if provided, a path including the filename will be returned</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a file path to the config directory and optional filename</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.get_default_download_dir">
<!--[deluge.common.get_default_download_dir]--><tt class="descclassname">deluge.common.</tt><tt class="descname">get_default_download_dir</tt><big>(</big><big>)</big><a class="headerlink" href="#deluge.common.get_default_download_dir" title="Permalink to this definition"></a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the default download directory</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.get_path_size">
<!--[deluge.common.get_path_size]--><tt class="descclassname">deluge.common.</tt><tt class="descname">get_path_size</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#deluge.common.get_path_size" title="Permalink to this definition"></a></dt>
<dd><p>Gets the size in bytes of &#8216;path&#8217;</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>path</em> &#8211; string, the path to check for size</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">the size in bytes of the path or -1 if the path does not exist</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">int</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.get_pixmap">
<!--[deluge.common.get_pixmap]--><tt class="descclassname">deluge.common.</tt><tt class="descname">get_pixmap</tt><big>(</big><em>fname</em><big>)</big><a class="headerlink" href="#deluge.common.get_pixmap" title="Permalink to this definition"></a></dt>
<dd><p>Provides easy access to files in the deluge/data/pixmaps folder within the Deluge egg</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>fname</em> &#8211; the filename to look for</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a path to a pixmap file included with Deluge</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.get_revision">
<!--[deluge.common.get_revision]--><tt class="descclassname">deluge.common.</tt><tt class="descname">get_revision</tt><big>(</big><big>)</big><a class="headerlink" href="#deluge.common.get_revision" title="Permalink to this definition"></a></dt>
<dd><p>The svn revision of the build if available</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the svn revision, or &#8220;&#8221;</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.get_version">
<!--[deluge.common.get_version]--><tt class="descclassname">deluge.common.</tt><tt class="descname">get_version</tt><big>(</big><big>)</big><a class="headerlink" href="#deluge.common.get_version" title="Permalink to this definition"></a></dt>
<dd><p>Returns the program version from the egg metadata</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the version of Deluge</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.is_ip">
<!--[deluge.common.is_ip]--><tt class="descclassname">deluge.common.</tt><tt class="descname">is_ip</tt><big>(</big><em>ip</em><big>)</big><a class="headerlink" href="#deluge.common.is_ip" title="Permalink to this definition"></a></dt>
<dd><p>A simple test to see if &#8216;ip&#8217; is valid</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>ip</em> &#8211; string, the ip to check</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True or False</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bool</p>
</td>
</tr>
</tbody>
</table>
<p>** Usage **</p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">is_ip</span><span class="p">(</span><span class="s">&quot;127.0.0.1&quot;</span><span class="p">)</span>
<span class="go">True</span>
</pre></div>
</dd></dl>
<dl class="function">
<dt id="deluge.common.is_magnet">
<!--[deluge.common.is_magnet]--><tt class="descclassname">deluge.common.</tt><tt class="descname">is_magnet</tt><big>(</big><em>uri</em><big>)</big><a class="headerlink" href="#deluge.common.is_magnet" title="Permalink to this definition"></a></dt>
<dd><p>A check to determine if a uri is a valid bittorrent magnet uri</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>uri</em> &#8211; string, the uri to check</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True or False</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bool</p>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">is_magnet</span><span class="p">(</span><span class="s">&quot;magnet:?xt=urn:btih:SU5225URMTUEQLDXQWRB2EQWN6KLTYKN&quot;</span><span class="p">)</span>
<span class="go">True</span>
</pre></div>
</dd></dl>
<dl class="function">
<dt id="deluge.common.is_url">
<!--[deluge.common.is_url]--><tt class="descclassname">deluge.common.</tt><tt class="descname">is_url</tt><big>(</big><em>url</em><big>)</big><a class="headerlink" href="#deluge.common.is_url" title="Permalink to this definition"></a></dt>
<dd><p>A simple regex test to check if the URL is valid</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>url</em> &#8211; string, the url to test</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True or False</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bool</p>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">is_url</span><span class="p">(</span><span class="s">&quot;http://deluge-torrent.org&quot;</span><span class="p">)</span>
<span class="go">True</span>
</pre></div>
</dd></dl>
<dl class="function">
<dt id="deluge.common.open_file">
<!--[deluge.common.open_file]--><tt class="descclassname">deluge.common.</tt><tt class="descname">open_file</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#deluge.common.open_file" title="Permalink to this definition"></a></dt>
<dd><p>Opens a file or folder using the system configured program</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>path</em> &#8211; the path to the file or folder to open</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.open_url_in_browser">
<!--[deluge.common.open_url_in_browser]--><tt class="descclassname">deluge.common.</tt><tt class="descname">open_url_in_browser</tt><big>(</big><em>url</em><big>)</big><a class="headerlink" href="#deluge.common.open_url_in_browser" title="Permalink to this definition"></a></dt>
<dd><p>Opens a url in the desktop&#8217;s default browser</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>url</em> &#8211; the url to open</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.osx_check">
<!--[deluge.common.osx_check]--><tt class="descclassname">deluge.common.</tt><tt class="descname">osx_check</tt><big>(</big><big>)</big><a class="headerlink" href="#deluge.common.osx_check" title="Permalink to this definition"></a></dt>
<dd><p>Checks if the current platform is Mac OS X</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">True or False</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.vista_check">
<!--[deluge.common.vista_check]--><tt class="descclassname">deluge.common.</tt><tt class="descname">vista_check</tt><big>(</big><big>)</big><a class="headerlink" href="#deluge.common.vista_check" title="Permalink to this definition"></a></dt>
<dd><p>Checks if the current platform is Windows Vista</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">True or False</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="deluge.common.windows_check">
<!--[deluge.common.windows_check]--><tt class="descclassname">deluge.common.</tt><tt class="descname">windows_check</tt><big>(</big><big>)</big><a class="headerlink" href="#deluge.common.windows_check" title="Permalink to this definition"></a></dt>
<dd><p>Checks if the current platform is Windows</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">True or False</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="../index.html" title="previous chapter">Welcome to deluge&#8217;s documentation!</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="config.html" title="next chapter"><tt class="docutils literal"><span class="pre">deluge.config</span></tt></a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/modules/common.txt">Show Source</a></li>
</ul>
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" size="18" /> <input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="config.html" title="deluge.config"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../index.html" title="Welcome to deluge&#8217;s documentation!"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2008, Andrew Resch.
Last updated on Nov 06, 2008.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
</body>
</html>

View File

@ -1,290 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>deluge.config &mdash; deluge v1.1.0 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '1.1.0',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: ''
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/interface.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="contents" title="Global table of contents" href="../contents.html" />
<link rel="index" title="Global index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="deluge v1.1.0 documentation" href="../index.html" />
<link rel="prev" title="deluge.common" href="common.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="common.html" title="deluge.common"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section">
<h1 id="module-deluge.config"><tt class="xref docutils literal"><span class="pre">deluge.config</span></tt><a class="headerlink" href="#module-deluge.config" title="Permalink to this headline"></a></h1>
<p>Deluge Config Module</p>
<dl class="class">
<dt id="deluge.config.Config">
<!--[deluge.config.Config]-->class <tt class="descclassname">deluge.config.</tt><tt class="descname">Config</tt><big>(</big><em>filename</em>, <em>defaults=None</em>, <em>config_dir=None</em><big>)</big><a class="headerlink" href="#deluge.config.Config" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref docutils literal"><span class="pre">object</span></tt></p>
<p>This class is used to access/create/modify config files</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>filename</em> &#8211; the name of the config file</li>
<li><em>defaults</em> &#8211; dictionary of default values</li>
<li><em>config_dir</em> &#8211; the path to the config directory</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="deluge.config.Config.__setitem__">
<!--[deluge.config.Config.__setitem__]--><tt class="descname">__setitem__</tt><big>(</big><em>key</em>, <em>value</em><big>)</big><a class="headerlink" href="#deluge.config.Config.__setitem__" title="Permalink to this definition"></a></dt>
<dd>See
<a title="deluge.config.Config.set_item" class="reference" href="#deluge.config.Config.set_item"><tt class="xref docutils literal"><span class="pre">set_item()</span></tt></a></dd></dl>
<dl class="method">
<dt id="deluge.config.Config.__getitem__">
<!--[deluge.config.Config.__getitem__]--><tt class="descname">__getitem__</tt><big>(</big><em>key</em><big>)</big><a class="headerlink" href="#deluge.config.Config.__getitem__" title="Permalink to this definition"></a></dt>
<dd>See
<a title="deluge.config.Config.get_item" class="reference" href="#deluge.config.Config.get_item"><tt class="xref docutils literal"><span class="pre">get_item()</span></tt></a></dd></dl>
<dl class="method">
<dt id="deluge.config.Config.apply_all">
<!--[deluge.config.Config.apply_all]--><tt class="descname">apply_all</tt><big>(</big><big>)</big><a class="headerlink" href="#deluge.config.Config.apply_all" title="Permalink to this definition"></a></dt>
<dd><p>Calls all set functions</p>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">config</span> <span class="o">=</span> <span class="n">Config</span><span class="p">(</span><span class="s">&quot;test.conf&quot;</span><span class="p">,</span> <span class="n">defaults</span><span class="o">=</span><span class="p">{</span><span class="s">&quot;test&quot;</span><span class="p">:</span> <span class="mf">5</span><span class="p">})</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">cb</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="gp">... </span> <span class="k">print</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span>
<span class="gp">...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">config</span><span class="o">.</span><span class="n">register_set_function</span><span class="p">(</span><span class="s">&quot;test&quot;</span><span class="p">,</span> <span class="n">cb</span><span class="p">,</span> <span class="n">apply_now</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">config</span><span class="o">.</span><span class="n">apply_all</span><span class="p">()</span>
<span class="go">test 5</span>
</pre></div>
</dd></dl>
<dl class="attribute">
<dt id="deluge.config.Config.config">
<!--[deluge.config.Config.config]--><tt class="descname">config</tt><a class="headerlink" href="#deluge.config.Config.config" title="Permalink to this definition"></a></dt>
<dd>The config dictionary</dd></dl>
<dl class="method">
<dt id="deluge.config.Config.get_item">
<!--[deluge.config.Config.get_item]--><tt class="descname">get_item</tt><big>(</big><em>key</em><big>)</big><a class="headerlink" href="#deluge.config.Config.get_item" title="Permalink to this definition"></a></dt>
<dd><p>Gets the value of item &#8216;key&#8217;</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>key</em> &#8211; the item for which you want it&#8217;s value</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">the value of item &#8216;key&#8217;</p>
</td>
</tr>
<tr class="field"><th class="field-name" colspan="2">Raises KeyError:</th></tr>
<tr><td>&nbsp;</td><td class="field-body"><p class="first last">if &#8216;key&#8217; is not in the config dictionary</p>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">config</span> <span class="o">=</span> <span class="n">Config</span><span class="p">(</span><span class="s">&quot;test.conf&quot;</span><span class="p">,</span> <span class="n">defaults</span><span class="o">=</span><span class="p">{</span><span class="s">&quot;test&quot;</span><span class="p">:</span> <span class="mf">5</span><span class="p">})</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">config</span><span class="p">[</span><span class="s">&quot;test&quot;</span><span class="p">]</span>
<span class="go">5</span>
</pre></div>
</dd></dl>
<dl class="method">
<dt id="deluge.config.Config.load">
<!--[deluge.config.Config.load]--><tt class="descname">load</tt><big>(</big><em>filename=None</em><big>)</big><a class="headerlink" href="#deluge.config.Config.load" title="Permalink to this definition"></a></dt>
<dd><p>Load a config file</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>filename</em> &#8211; if None, uses filename set in object initialization</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="deluge.config.Config.register_change_callback">
<!--[deluge.config.Config.register_change_callback]--><tt class="descname">register_change_callback</tt><big>(</big><em>callback</em><big>)</big><a class="headerlink" href="#deluge.config.Config.register_change_callback" title="Permalink to this definition"></a></dt>
<dd><p>Registers a callback function that will be called when a value is changed in the config dictionary</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>callback</em> &#8211; the function, callback(key, value)</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">config</span> <span class="o">=</span> <span class="n">Config</span><span class="p">(</span><span class="s">&quot;test.conf&quot;</span><span class="p">,</span> <span class="n">defaults</span><span class="o">=</span><span class="p">{</span><span class="s">&quot;test&quot;</span><span class="p">:</span> <span class="mf">5</span><span class="p">})</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">cb</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="gp">... </span> <span class="k">print</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span>
<span class="gp">...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">config</span><span class="o">.</span><span class="n">register_change_callback</span><span class="p">(</span><span class="n">cb</span><span class="p">)</span>
</pre></div>
</dd></dl>
<dl class="method">
<dt id="deluge.config.Config.register_set_function">
<!--[deluge.config.Config.register_set_function]--><tt class="descname">register_set_function</tt><big>(</big><em>key</em>, <em>function</em>, <em>apply_now=True</em><big>)</big><a class="headerlink" href="#deluge.config.Config.register_set_function" title="Permalink to this definition"></a></dt>
<dd><p>Register a function to be called when a config value changes</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>key</em> &#8211; the item to monitor for change</li>
<li><em>function</em> &#8211; the function to call when the value changes, f(key, value)</li>
<li><em>apply_now</em> &#8211; if True, the function will be called after it&#8217;s registered</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">config</span> <span class="o">=</span> <span class="n">Config</span><span class="p">(</span><span class="s">&quot;test.conf&quot;</span><span class="p">,</span> <span class="n">defaults</span><span class="o">=</span><span class="p">{</span><span class="s">&quot;test&quot;</span><span class="p">:</span> <span class="mf">5</span><span class="p">})</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">cb</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="gp">... </span> <span class="k">print</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span>
<span class="gp">...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">config</span><span class="o">.</span><span class="n">register_set_function</span><span class="p">(</span><span class="s">&quot;test&quot;</span><span class="p">,</span> <span class="n">cb</span><span class="p">,</span> <span class="n">apply_now</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="go">test 5</span>
</pre></div>
</dd></dl>
<dl class="method">
<dt id="deluge.config.Config.save">
<!--[deluge.config.Config.save]--><tt class="descname">save</tt><big>(</big><em>filename=None</em><big>)</big><a class="headerlink" href="#deluge.config.Config.save" title="Permalink to this definition"></a></dt>
<dd><p>Save configuration to disk</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>filename</em> &#8211; if None, uses filename set in object initiliazation</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="deluge.config.Config.set_item">
<!--[deluge.config.Config.set_item]--><tt class="descname">set_item</tt><big>(</big><em>key</em>, <em>value</em><big>)</big><a class="headerlink" href="#deluge.config.Config.set_item" title="Permalink to this definition"></a></dt>
<dd><p>Sets item &#8216;key&#8217; to &#8216;value&#8217; in the config dictionary, but does not allow
changing the item&#8217;s type unless it is None</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>key</em> &#8211; string, item to change to change</li>
<li><em>value</em> &#8211; the value to change item to, must be same type as what is currently in the config</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name" colspan="2">Raises ValueError:</th></tr>
<tr><td>&nbsp;</td><td class="field-body"><p class="first last">raised when the type of value is not the same as what is currently in the config</p>
</td>
</tr>
</tbody>
</table>
<p><strong>Usage</strong></p>
<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">config</span> <span class="o">=</span> <span class="n">Config</span><span class="p">(</span><span class="s">&quot;test.conf&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">config</span><span class="p">[</span><span class="s">&quot;test&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">5</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">config</span><span class="p">[</span><span class="s">&quot;test&quot;</span><span class="p">]</span>
<span class="go">5</span>
</pre></div>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="common.html" title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">deluge.common</span></tt></a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/modules/config.txt">Show Source</a></li>
</ul>
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" size="18" /> <input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="common.html" title="deluge.common"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2008, Andrew Resch.
Last updated on Nov 06, 2008.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
</body>
</html>

View File

@ -1,87 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &mdash; deluge v1.1.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.1.0',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: ''
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/interface.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="contents" title="Global table of contents" href="contents.html" />
<link rel="index" title="Global index" href="genindex.html" />
<link rel="search" title="Search" href="" />
<link rel="top" title="deluge v1.1.0 documentation" href="index.html" />
<script type="text/javascript" src="_static/searchtools.js"></script>
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="index.html">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<h1 id="search-documentation">Search</h1>
<p>
From here you can search these documents. Enter your search
words into the box below and click "search". Note that the search
function will automatically search for all of the words. Pages
containing less words won't appear in the result list.
</p>
<form action="" method="get">
<input type="text" name="q" value="" />
<input type="submit" value="search" />
</form>
<div id="search-results">
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="index.html">deluge v1.1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2008, Andrew Resch.
Last updated on Nov 06, 2008.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
</body>
</html>

View File

@ -1 +0,0 @@
[["index","modules/config","modules/common"],["Welcome to deluge&#8217;s documentation!","<tt class=\"docutils literal docutils literal\"><span class=\"pre\">deluge.config</span></tt>","<tt class=\"docutils literal docutils literal\"><span class=\"pre\">deluge.common</span></tt>"],{"is_ip":[2],"all":[1],"mib":[2],"0":[2],"get_pixmap":[2],"show":[2],"is":[1,2],"when":[1],"fpeer":[2],"invalid":[],"human":[2],"config":[0,1,2],"disk":[1],"dbu":[],"paramet":[1,2],"24":[0],"pixmap":[2],"onli":[2],"btih":[2],"ratio":[2],"monitor":[1],"easi":[2],"common":[0,2],"with":[2],"tt":[1,2],"configur":[1,2],"readabl":[2],"set_item":[1],"should":[0],"to":[0,1,2],"window":[2],"program":[2],"register_change_callback":[1],"4":[0],"bittorr":[2],"folder":[2],"save":[1],"modul":[0,1],"ip":[2],"then":[2],"file":[0,1,2],"liter":[1,2],"return":[1,2],"string":[1,2],"__getitem__":[1],"format":[2],"python":[],"show_other_dialog":[],"pixbuf":[],"initi":[1],"yy":[2],"print":[1],"if":[1,2],"127":[2],"not":[1,2],"nov":[0],"get_item":[1],"mod":[],"register_set_funct":[1],"like":[0],"docutil":[1,2],"list":[2],"magnet":[2],"mm":[2],"form":[2],"either":[],"contain":[0],"x":[2],"get_previous_config":[],"refer":[],"page":[0],"the":[0,1,2],"set":[1],"direct":[0],"percentag":[2],"displai":[2],"fspeed":[2],"delug":[0,1,2],"connect":[2],"toctre":[0],"download":[2],"logo":[],"5":[1],"config_dir":[1],"index":[0],"what":[1],"total":[2],"06":[0],"for":[1,2],"space":[2],"is_url":[2],"per":[2],"18":[0],"current":[1,2],"version":[2],"ftime":[2],"adapt":[0],"total_p":[2],"get_default_config_dir":[2],"content":[0],"su5225urmtueqldxqwrb2eqwn6kltykn":[2],"sphinx":[0],"speed":[2],"metadata":[2],"be":[1,2],"after":[1],"run":[],"kei":[1],"vista_check":[2],"usag":[1,2],"infin":[2],"free":[2],"by":[0],"__setitem__":[1],"base":[1,2],"bp":[2],"dictionari":[1],"peer":[2],"20":[2],"byte":[2],"modifi":[1],"tue":[0],"valu":[1,2],"open_url_in_brows":[2],"search":[0],"create_magnet_uri":[2],"last":[],"43134":[2],"of":[1,2],"valid":[2],"greater":[2],"fetch":[2],"prior":[],"s":[0,1,2],"109":[2],"place":[2],"data":[2],"osx_check":[2],"unknown":[2],"desktop":[2],"chang":[1],"timezon":[2],"infohash":[2],"or":[2],"load":[1],"and":[0,2],"rang":[2],"decim":[2],"within":[2],"cb":[1],"into":[2],"float":[2],"number":[2],"8217":[0],"two":[2],"filenam":[1,2],"initiliaz":[1],"num_peer":[2],"construct":[],"path":[1,2],"announc":[2],"open":[2],"your":[0],"xt":[2],"size":[2],"regex":[2],"avail":[2],"given":[2],"fetch_url":[2],"span":[1,2],"describ":[],"platform":[2],"transfer":[2],"42":[2],"regist":[1],"system":[2],"least":[0],"sinc":[2],"23011":[2],"master":[0],"9311":[2],"basic":[],"var":[],"call":[1],"type":[1,2],"valueerror":[1],"entir":[],"includ":[2],"function":[1,2],"svn":[2],"from":[2],"option":[2],"name":[1,2],"that":[1],"6h":[2],"fsize_b":[2],"6":[2],"keyerror":[1],"but":[0,1],"back":[],"part":[2],"link":[],"translat":[],"apply_al":[1],"93":[2],"an":[],"true":[1,2],"than":[2],"must":[1],"info":[2],"10":[2],"none":[1,2],"look":[2],"is_magnet":[2],"f":[1],"provid":[2],"free_spac":[2],"access":[1,2],"second":[2],"us":[1,2],"windows_check":[2],"will":[1,2],"url":[2],"fpcnt":[2],"can":[0],"fdate":[2],"dec":[2],"root":[0],"torrent":[2],"def":[1],"browser":[2],"pre":[1,2],"files":[2],"gib":[2],"hash":[2],"quickstart":[0],"creat":[0,1,2],"item":[1],"int":[2],"get_default_download_dir":[2],"dure":[],"tabl":[0],"it":[0,1,2],"indic":[0],"repres":[2],"unit":[2],"exist":[2],"at":[0,2],"conf":[1],"in":[1,2],"revis":[2],"check":[2],"as":[1],"get_vers":[2],"11":[2],"vista":[2],"variou":[2],"want":[1],"filepath":[2],"allow":[1],"get":[1,2],"fsize":[2],"same":[1],"get_revis":[2],"1":[2],"fals":[1,2],"epoch":[2],"other":[],"bool":[2],"build":[2],"fname":[2],"test":[1,2],"you":[0,1],"tracker":[2],"simpl":[2],"dd":[2],"complet":[0],"week":[2],"23m":[2],"http":[2],"dialog":[],"see":[1,2],"default":[1,2],"org":[2],"object":[1],"get_logo":[],"mac":[2],"get_config":[],"specifi":[],"thi":[0,1],"date":[2],"kib":[2],"on":[0,2],"unless":[1],"class":[1,2],"shown":[2],"welcom":[0],"a":[1,2],"util":[2],"open_fil":[2],"directori":[1,2],"os":[2],"urn":[2],"no":[],"uri":[2],"rais":[1],"doe":[1,2],"callback":[1],"which":[1],"u":[],"112245":[2],"determin":[2],"time":[2],"apply_now":[1],"2008":[0],"egg":[2],"get_path_s":[2],"document":[0]}]

View File

@ -19,16 +19,32 @@
# 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.
#
#
class DelugeError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
pass
class NoCoreError(DelugeError):
pass
class DaemonRunningError(DelugeError):
pass
class InvalidTorrentError(DelugeError):
pass
class InvalidPathError(DelugeError):
pass

243
deluge/event.py Normal file
View File

@ -0,0 +1,243 @@
#
# event.py
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may 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.
#
# deluge 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 deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# 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.
#
#
"""
Event module.
This module describes the types of events that can be generated by the daemon
and subsequently emitted to the clients.
"""
known_events = {}
class DelugeEventMetaClass(type):
"""
This metaclass simply keeps a list of all events classes created.
"""
def __init__(cls, name, bases, dct):
super(DelugeEventMetaClass, cls).__init__(name, bases, dct)
if name != "DelugeEvent":
known_events[name] = cls
class DelugeEvent(object):
"""
The base class for all events.
:prop name: this is the name of the class which is in-turn the event name
:prop args: a list of the attribute values
"""
__metaclass__ = DelugeEventMetaClass
def _get_name(self):
return self.__class__.__name__
def _get_args(self):
if not hasattr(self, "_args"):
return []
return self._args
name = property(fget=_get_name)
args = property(fget=_get_args)
class TorrentAddedEvent(DelugeEvent):
"""
Emitted when a new torrent is successfully added to the session.
"""
def __init__(self, torrent_id):
"""
:param torrent_id: str, the torrent_id of the torrent that was added
"""
self._args = [torrent_id]
class TorrentRemovedEvent(DelugeEvent):
"""
Emitted when a torrent has been removed from the session.
"""
def __init__(self, torrent_id):
"""
:param torrent_id: str, the torrent_id
"""
self._args = [torrent_id]
class PreTorrentRemovedEvent(DelugeEvent):
"""
Emitted when a torrent is about to be removed from the session.
"""
def __init__(self, torrent_id):
"""
:param torrent_id: str, the torrent_id
"""
self._args = [torrent_id]
class TorrentStateChangedEvent(DelugeEvent):
"""
Emitted when a torrent changes state.
"""
def __init__(self, torrent_id, state):
"""
:param torrent_id: str, the torrent_id
:param state: str, the new state
"""
self._args = [torrent_id, state]
class TorrentQueueChangedEvent(DelugeEvent):
"""
Emitted when the queue order has changed.
"""
pass
class TorrentFolderRenamedEvent(DelugeEvent):
"""
Emitted when a folder within a torrent has been renamed.
"""
def __init__(self, torrent_id, old, new):
"""
:param torrent_id: str, the torrent_id
:param old: str, the old folder name
:param new: str, the new folder name
"""
self._args = [torrent_id, old, new]
class TorrentFileRenamedEvent(DelugeEvent):
"""
Emitted when a file within a torrent has been renamed.
"""
def __init__(self, torrent_id, index, name):
"""
:param torrent_id: str, the torrent_id
:param index: int, the index of the file
:param name: str, the new filename
"""
self._args = [torrent_id, index, name]
class TorrentFinishedEvent(DelugeEvent):
"""
Emitted when a torrent finishes downloading.
"""
def __init__(self, torrent_id):
"""
:param torrent_id: str, the torrent_id
"""
self._args = [torrent_id]
class TorrentResumedEvent(DelugeEvent):
"""
Emitted when a torrent resumes from a paused state.
"""
def __init__(self, torrent_id):
"""
:param torrent_id: str, the torrent_id
"""
self._args = [torrent_id]
class TorrentFileCompletedEvent(DelugeEvent):
"""
Emitted when a file completes.
This will only work with libtorrent 0.15 or greater.
"""
def __init__(self, torrent_id, index):
"""
:param torrent_id: the torrent_id
:type torrent_id: string
:param index: the file index
:type index: int
"""
self._args = [torrent_id, index]
class NewVersionAvailableEvent(DelugeEvent):
"""
Emitted when a more recent version of Deluge is available.
"""
def __init__(self, new_release):
"""
:param new_release: str, the new version that is available
"""
self._args = [new_release]
class SessionStartedEvent(DelugeEvent):
"""
Emitted when a session has started. This typically only happens once when
the daemon is initially started.
"""
pass
class SessionPausedEvent(DelugeEvent):
"""
Emitted when the session has been paused.
"""
pass
class SessionResumedEvent(DelugeEvent):
"""
Emitted when the session has been resumed.
"""
pass
class ConfigValueChangedEvent(DelugeEvent):
"""
Emitted when a config value changes in the Core.
"""
def __init__(self, key, value):
"""
:param key: str, the key that changed
:param value: the new value of the `:param:key`
"""
self._args = [key, value]
class PluginEnabledEvent(DelugeEvent):
"""
Emitted when a plugin is enabled in the Core.
"""
def __init__(self, name):
"""
:param name: the plugin name
:type name: string
"""
self._args = [name]
class PluginDisabledEvent(DelugeEvent):
"""
Emitted when a plugin is disabled in the Core.
"""
def __init__(self, name):
"""
:param name: the plugin name
:type name: string
"""
self._args = [name]

203
deluge/httpdownloader.py Normal file
View File

@ -0,0 +1,203 @@
#
# httpdownloader.py
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may 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.
#
# deluge 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 deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# 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.
#
from twisted.web import client, http
from twisted.web.error import PageRedirect
from twisted.python.failure import Failure
from twisted.internet import reactor
from deluge.log import setupLogger, LOG as log
from common import get_version
import os.path
import zlib
class HTTPDownloader(client.HTTPDownloader):
"""
Factory class for downloading files and keeping track of progress.
"""
def __init__(self, url, filename, part_callback=None, headers=None, force_filename=False, allow_compression=True):
"""
:param url: the url to download from
:type url: string
:param filename: the filename to save the file as
:type filename: string
:param force_filename: forces use of the supplied filename, regardless of header content
:type force_filename: bool
:param part_callback: a function to be called when a part of data
is received, it's signature should be: func(data, current_length, total_length)
:type part_callback: function
:param headers: any optional headers to send
:type headers: dictionary
"""
self.part_callback = part_callback
self.current_length = 0
self.decoder = None
self.value = filename
self.force_filename = force_filename
self.allow_compression = allow_compression
agent = "Deluge/%s (http://deluge-torrent.org)" % get_version()
client.HTTPDownloader.__init__(self, url, filename, headers=headers, agent=agent)
def gotStatus(self, version, status, message):
self.code = int(status)
client.HTTPDownloader.gotStatus(self, version, status, message)
def gotHeaders(self, headers):
if self.code == http.OK:
if "content-length" in headers:
self.total_length = int(headers["content-length"][0])
else:
self.total_length = 0
if self.allow_compression and "content-encoding" in headers and \
headers["content-encoding"][0] in ("gzip", "x-gzip", "deflate"):
# Adding 32 to the wbits enables gzip & zlib decoding (with automatic header detection)
# Adding 16 just enables gzip decoding (no zlib)
self.decoder = zlib.decompressobj(zlib.MAX_WBITS + 32)
if "content-disposition" in headers and not self.force_filename:
new_file_name = str(headers["content-disposition"][0]).split(";")[1].split("=")[1]
new_file_name = sanitise_filename(new_file_name)
new_file_name = os.path.join(os.path.split(self.fileName)[0], new_file_name)
count = 1
fileroot = os.path.splitext(new_file_name)[0]
fileext = os.path.splitext(new_file_name)[1]
while os.path.isfile(new_file_name):
# Increment filename if already exists
new_file_name = "%s-%s%s" % (fileroot, count, fileext)
count += 1
self.fileName = new_file_name
self.value = new_file_name
elif self.code in (http.MOVED_PERMANENTLY, http.FOUND, http.SEE_OTHER, http.TEMPORARY_REDIRECT):
location = headers["location"][0]
error = PageRedirect(self.code, location=location)
self.noPage(Failure(error))
return client.HTTPDownloader.gotHeaders(self, headers)
def pagePart(self, data):
if self.code == http.OK:
self.current_length += len(data)
if self.decoder:
data = self.decoder.decompress(data)
if self.part_callback:
self.part_callback(data, self.current_length, self.total_length)
return client.HTTPDownloader.pagePart(self, data)
def pageEnd(self):
if self.decoder:
data = self.decoder.flush()
self.current_length -= len(data)
self.decoder = None
self.pagePart(data)
return client.HTTPDownloader.pageEnd(self)
def sanitise_filename(filename):
"""
Sanitises a filename to use as a download destination file.
Logs any filenames that could be considered malicious.
:param filename: the filename to sanitise
:type filename: string
:returns: the sanitised filename
:rtype: string
"""
# Remove any quotes
filename = filename.strip("'\"")
if os.path.basename(filename) != filename:
# Dodgy server, log it
log.warning("Potentially malicious server: trying to write to file '%s'" % filename)
# Only use the basename
filename = os.path.basename(filename)
filename = filename.strip()
if filename.startswith(".") or ";" in filename or "|" in filename:
# Dodgy server, log it
log.warning("Potentially malicious server: trying to write to file '%s'" % filename)
return filename
def download_file(url, filename, callback=None, headers=None, force_filename=False, allow_compression=True):
"""
Downloads a file from a specific URL and returns a Deferred. You can also
specify a callback function to be called as parts are received.
:param url: the url to download from
:type url: string
:param filename: the filename to save the file as
:type filename: string
:param callback: a function to be called when a part of data is received,
it's signature should be: func(data, current_length, total_length)
:type callback: function
:param headers: any optional headers to send
:type headers: dictionary
:param force_filename: force us to use the filename specified rather than
one the server may suggest
:type force_filename: boolean
:param allow_compression: allows gzip & deflate decoding
:type allow_compression: boolean
:returns: the filename of the downloaded file
:rtype: Deferred
:raises t.w.e.PageRedirect: when server responds with a temporary redirect
or permanently moved.
:raises t.w.e.Error: for all other HTTP response errors (besides OK)
"""
url = str(url)
filename = str(filename)
if headers:
for key, value in headers.items():
headers[str(key)] = str(value)
if allow_compression:
if not headers:
headers = {}
headers["accept-encoding"] = "deflate, gzip, x-gzip"
scheme, host, port, path = client._parse(url)
factory = HTTPDownloader(url, filename, callback, headers, force_filename, allow_compression)
if scheme == "https":
from twisted.internet import ssl
reactor.connectSSL(host, port, factory, ssl.ClientContextFactory())
else:
reactor.connectTCP(host, port, factory)
return factory.deferred

View File

@ -1,214 +0,0 @@
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
deluge/ui/gtkui/glade/remove_torrent_dialog.glade
deluge/ui/gtkui/glade/preferences_dialog.glade
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
deluge/ui/gtkui/glade/main_window.glade
deluge/bencode.py
deluge/docs/source/conf.py
deluge/core/autoadd.py
deluge/core/preferencesmanager.py
deluge/core/filtermanager.py
deluge/core/signalmanager.py
deluge/core/torrentmanager.py
deluge/core/daemon.py
deluge/core/torrent.py
deluge/core/pluginmanager.py
deluge/core/oldstateupgrader.py
deluge/core/__init__.py
deluge/core/core.py
deluge/core/alertmanager.py
deluge/core/rpcserver.py
deluge/config.py
deluge/metafile.py
deluge/pluginmanagerbase.py
deluge/SimpleXMLRPCServer.py
deluge/plugins/label/label/webui.py
deluge/plugins/label/label/test.py
deluge/plugins/label/label/gtkui/label_config.py
deluge/plugins/label/label/gtkui/sidebar_menu.py
deluge/plugins/label/label/gtkui/submenu.py
deluge/plugins/label/label/gtkui/ui.py
deluge/plugins/label/label/gtkui/__init__.py
deluge/plugins/label/label/__init__.py
deluge/plugins/label/label/core.py
deluge/plugins/label/setup.py
deluge/plugins/corepluginbase.py
deluge/plugins/init.py
deluge/plugins/blocklist/setup.py
deluge/plugins/blocklist/blocklist/webui.py
deluge/plugins/blocklist/blocklist/gtkui.py
deluge/plugins/blocklist/blocklist/ui.py
deluge/plugins/blocklist/blocklist/text.py
deluge/plugins/blocklist/blocklist/peerguardian.py
deluge/plugins/blocklist/blocklist/__init__.py
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
deluge/ui/ui.py
deluge/ui/console/mapping.py
deluge/ui/console/colors.py
deluge/ui/console/commands/resume.py
deluge/ui/console/commands/config.py
deluge/ui/console/commands/halt.py
deluge/ui/console/commands/debug.py
deluge/ui/console/commands/__init__.py
deluge/ui/console/commands/quit.py
deluge/ui/console/commands/connect.py
deluge/ui/console/commands/pause.py
deluge/ui/console/commands/add.py
deluge/ui/console/commands/rm.py
deluge/ui/console/commands/info.py
deluge/ui/console/commands/help.py
deluge/ui/console/main.py
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/addtorrentdialog.py
deluge/ui/gtkui/coreconfig.py
deluge/ui/gtkui/sidebar.py
deluge/ui/gtkui/gtkui.py
deluge/ui/gtkui/aboutdialog.py
deluge/ui/gtkui/systemtray.py
deluge/ui/gtkui/dbusinterface.py
deluge/ui/gtkui/files_tab.py
deluge/ui/gtkui/menubar.py
deluge/ui/gtkui/peers_tab.py
deluge/ui/gtkui/notification.py
deluge/ui/gtkui/toolbar.py
deluge/ui/gtkui/ipcinterface.py
deluge/ui/gtkui/filtertreeview.py
deluge/ui/gtkui/queuedtorrents.py
deluge/ui/gtkui/pluginmanager.py
deluge/ui/gtkui/mainwindow.py
deluge/ui/gtkui/removetorrentdialog.py
deluge/ui/gtkui/common.py
deluge/ui/gtkui/signals.py
deluge/ui/gtkui/torrentdetails.py
deluge/ui/gtkui/__init__.py
deluge/ui/gtkui/edittrackersdialog.py
deluge/ui/gtkui/preferences.py
deluge/ui/gtkui/torrentview.py
deluge/ui/gtkui/new_release_dialog.py
deluge/ui/gtkui/connectionmanager.py
deluge/ui/gtkui/createtorrentdialog.py
deluge/ui/gtkui/details_tab.py
deluge/ui/signalreceiver.py
deluge/ui/common.py
deluge/ui/__init__.py
deluge/ui/webui/components.py
deluge/ui/webui/render.py
deluge/ui/webui/page_decorators.py
deluge/ui/webui/webui.py
deluge/ui/webui/debugerror.py
deluge/ui/webui/webserver_common.py
deluge/ui/webui/config_forms.py
deluge/ui/webui/deluge_webserver.py
deluge/ui/webui/json_api.py
deluge/ui/webui/register_menu.py
deluge/ui/webui/config_tabs_deluge.py
deluge/ui/webui/lib/webpy022/request.py
deluge/ui/webui/lib/webpy022/wsgiserver/__init__.py
deluge/ui/webui/lib/webpy022/db.py
deluge/ui/webui/lib/webpy022/template.py
deluge/ui/webui/lib/webpy022/cheetah.py
deluge/ui/webui/lib/webpy022/debugerror.py
deluge/ui/webui/lib/webpy022/http.py
deluge/ui/webui/lib/webpy022/httpserver.py
deluge/ui/webui/lib/webpy022/utils.py
deluge/ui/webui/lib/webpy022/__init__.py
deluge/ui/webui/lib/webpy022/net.py
deluge/ui/webui/lib/webpy022/wsgi.py
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
deluge/ui/webui/lib/web.py
deluge/ui/webui/lib/newforms_portable/django/core/__init__.py
deluge/ui/webui/lib/newforms_portable/django/core/exceptions.py
deluge/ui/webui/lib/newforms_portable/django/utils/html.py
deluge/ui/webui/lib/newforms_portable/django/utils/http.py
deluge/ui/webui/lib/newforms_portable/django/utils/encoding.py
deluge/ui/webui/lib/newforms_portable/django/utils/translation.py
deluge/ui/webui/lib/newforms_portable/django/utils/safestring.py
deluge/ui/webui/lib/newforms_portable/django/utils/__init__.py
deluge/ui/webui/lib/newforms_portable/django/utils/datastructures.py
deluge/ui/webui/lib/newforms_portable/django/utils/functional.py
deluge/ui/webui/lib/newforms_portable/django/__init__.py
deluge/ui/webui/lib/newforms_portable/forms.py
deluge/ui/webui/lib/newforms_portable/models.py
deluge/ui/webui/lib/newforms_portable/widgets.py
deluge/ui/webui/lib/newforms_portable/fields.py
deluge/ui/webui/lib/newforms_portable/__init__.py
deluge/ui/webui/lib/newforms_portable/util.py
deluge/ui/webui/lib/egg_handler.py
deluge/ui/webui/utils.py
deluge/ui/webui/pages.py
deluge/ui/webui/__init__.py
deluge/ui/webui/tests/test_all.py
deluge/ui/webui/apache.py
deluge/ui/webui/web.py
deluge/ui/webui/torrent_move.py
deluge/ui/webui/config_tabs_webui.py
deluge/ui/webui/torrent_options.py
deluge/ui/webui/torrent_add.py
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
deluge/error.py
deluge/__init__.py
deluge/tests/test_signalreceiver.py
deluge/tests/test_filters.py
deluge/tests/test_plugin_metadata.py
deluge/tests/test_tracker_icons.py
deluge/tests/test_stats.py
deluge/tests/test_client.py
deluge/log.py
deluge/xmlrpclib.py
deluge/scripts/deluge_remote.py
deluge/scripts/wiki_docgen.py
deluge/scripts/create_plugin.py
deluge/scripts/state_upgrade.py

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3830
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

3753
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

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

Some files were not shown because too many files have changed in this diff Show More