Compare commits

...

5540 Commits

Author SHA1 Message Date
2a945de069 [CI] Fix tests stalling/timing out
GitHub pytest runner stalling with the following error:

    [Errno 2] No such file or directory: '/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/deluge/plugins'

This is related to the editable install of Deluge via pip

    pip install -e .

and the custom resource_filename in deluge.common is the source of the
problem where a DistInfoDistribution returns a different path to
EggInfoDistribution.

Working egg-info install

    >>> pkg_resources.get_distribution('Deluge')
    deluge 2.1.1.dev8 (/home/user/deluge)

    >>> type(pkg_resources.get_distribution('Deluge'))
    <class 'pkg_resources.EggInfoDistribution'>

    >>> pkg_resources.resource_filename('deluge', 'plugins')
    '/home/user/deluge/deluge/plugins'

This can identified by the `deluge.egg-info` directory in source
directory.

Broken dist-info install

    >>> pkg_resources.get_distribution('Deluge')
    deluge 2.1.1.dev8 (/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages)

    >>> type(pkg_resources.get_distribution('Deluge'))
    <class 'pkg_resources.DistInfoDistribution'>

    >>> pkg_resources.resource_filename('deluge', 'plugins')
    '/home/user/deluge/deluge/plugins'

This can be worked around by setting an env var that enables legacy mode
but long-term need to replace the custom resource_filename and replace
usage of pkg_resources.

https://setuptools.pypa.io/en/latest/userguide/development_mode.html#legacy-behavior
https://setuptools.pypa.io/en/latest/pkg_resources.html
2022-12-01 22:39:10 +00:00
d0acd3e06e [CI] Fix installing enchant for github docs workflow
The enchant package was renamed for version 2 to enchant-2 and original
enchant package removed in Ubuntu 22.04 so docs workflow failed

Fixed by using latest package and specifying ubuntu version to avoid
unexpected failures in future.
2022-12-01 13:11:53 +00:00
3565a9a817 [WebUI] Fix TypeError in DelugeWeb constructor
In `twisted 22.10`, a check new for passing the `path` variable as
`bytes` in the `putChild` method.
We were enforcing this on every other place but the `__init__` of
`DelugeWeb` itself.

Ref: https://github.com/twisted/twisted/pull/11718
Closes: https://dev.deluge-torrent.org/ticket/3566
2022-12-01 12:52:00 +00:00
b3d1fd79a8 Update changelog from 2.1.1 release 2022-07-10 14:06:34 +01:00
b64084d248 [Docs] Update changelog and install details 2022-07-08 09:04:57 +01:00
e120536d87 Fix parsing magnet with tracker tiers
Magnets with trackers specified with tr.x param were not being unquoted
so unusable raw tracker string was being set.

Fixed by unquoting tracker and adding test

See-also: https://dev.deluge-torrent.org/ticket/2716
2022-07-08 08:34:29 +01:00
f52cf760e4 Fix missing trackers adding magnets
The changes to remove deprecated lt methods didn't account for magnet
trackers so magnets are missing trackers when added.

Previously the addition of trackers was handled by libtorrent when a url
was passed in add_torrent_params. The url parameter is deprecated so
instead we need to add both the info_hash and trackers.

Trac: https://dev.deluge-torrent.org/ticket/3530
2022-07-05 08:03:33 +01:00
94d790c159 [CI] Bump ifaddr to 0.2.0
With release of ifaddr 0.2.0 no longer need to pin to github commit to
resolve Windows decoding issues.
2022-06-30 21:47:06 +01:00
f78506161d [CI] Fix failing Windows Python 3.10 tests
A recent dependency change caused the tests running on GitHub Actions
under Python 3.10.5 on Windows to fail when starting pytest run:

    ...
    INTERNALERROR>   File "<frozen importlib._bootstrap>", line 123, in acquire
    INTERNALERROR> KeyError: xxxx

The cause seems to have been a newer version of chardet package released
recently.

* Fixed by pinning chardet to v4
* Also pin Windows version to 2019 to match packaging workflow

See-also: https://github.com/deluge-torrent/deluge/actions/runs/2578427588
Issue: https://github.com/chardet/chardet/issues/265
2022-06-29 15:07:23 +01:00
592b05cd87 back to development 2022-06-28 22:11:29 +01:00
6c8f9ce756 Release 2.1.0 2022-06-28 22:07:35 +01:00
19dba297ef [Docs] Fix ReadTheDocs theme rendering issue
Fix rendering issues in ReadTheDocs by specifying latest version of
sphinx-rtd-theme. Normally not an issue to install this latest
dependency from doc/requirement.txt but RTD installs in the env an older
version (<0.5) before running requirements file install
thus sphinx-rtd-theme is not upgraded unless a version is specified.

See-also: https://github.com/readthedocs/sphinx_rtd_theme/issues/1115
2022-06-28 19:45:21 +01:00
cbacaf0545 [Core] Fix typo in AUTH_LEVEL_MAPPING
Closes: https://github.com/deluge-torrent/deluge/pull/387
2022-06-19 19:02:11 +01:00
75db47fc1f Update Changelog entries 2022-06-19 08:30:54 +01:00
f1ec68704d [CD] Cleanup pip cache in Win builds
- Use the more reliable setup-python cache
- Move the pip install to GTK install step for consistency
- Don't update pip to ensure consistent version
2022-06-13 19:37:41 +01:00
ae3fbcca77 [Packaging] Pinned Pyinstaller to v4.10 and readme update
Pin Pyinstaller to latest v4.x until issue of aborting upon missing typelibs for various unbuilt gst-modules can be properly investigated and resolved. Specific error for one of the modules being:

`36738 INFO: Loading module hook 'hook-gi.repository.Gst.py' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\PyInstaller\\hooks'...
Traceback (most recent call last):
  File "<string>", line 7, in <module>
gi.repository.GLib.GError: g-irepository-error-quark: Typelib file for namespace 'Gst', version '1.0' not found (0)
36870 ERROR: gi repository 'GIRepository 2.0' not found. Please make sure corresponding package is installed.
Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\gi\__init__.py", line 139, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gst not available`

Added `--no-index` to ensure pip doesn't install from Pypi

Closes: https://github.com/deluge-torrent/deluge/pull/386
2022-06-13 19:31:54 +01:00
6a10e8f3cd [Packaging] Bump Win dependencies
* Update Twisted and libtorrent to latest releases
* Update to v3 github actions that now use node 16
2022-06-12 20:05:04 +01:00
b0dba97fec [Web] Accept charset in content-type for json messages
Trac: https://dev.deluge-torrent.org/ticket/3521
Closes: https://github.com/deluge-torrent/deluge/pull/385
2022-06-12 16:08:36 +01:00
d7c520c85e [WebUI] Fixed 'Complete Seen' and 'Completed' sorting
Closes: https://github.com/deluge-torrent/deluge/pull/384
2022-05-17 22:45:37 +01:00
ee3180fd94 [Notifications] Fix UnicodeEncodeError upon non-ascii torrent name
smtplib.SMTP.sendmail expects 'msg' in string of ascii chars or bytes,
where the former gets encoded to bytes through ascii codec, hence
raising said error, but now fixed by encoding to bytes ourself through
utf-8

Closes: https://github.com/deluge-torrent/deluge/pull/383
2022-05-17 22:42:05 +01:00
47e548fdb5 [Core] Refactor prefetch_metadata for more clarity
Just trying to clean up some of the more complicated callback logic.

Notable changes:

* The test was awaiting a DeferredList. By default that will eat
exceptions and just add them to the result list (including test
assertion exceptions.) Added fireOnOneErrback=True to make sure that
wasn't happening.  * Moved the logic for multiple calls to await the
same response into torrentmanager from core, so no matter where the
prefetch is called from it will wait for the original call.
* Implemented the multiple calls with an explicit queue of waiting
callbacks, rather than a callback callback chain.  * Moved to one inline
async function rather than split into a main and callback after alert
function.
* Added some more type hints to the stuff I changed.

Adjusted test since we are using prefetch as an async function now
we have to schedule the alert to come after we start awaiting the
prefetch call.

Closes: https://github.com/deluge-torrent/deluge/pull/368
2022-05-17 22:15:55 +01:00
cd63efd935 [Console] Fix curses.init_pair raise ValueError on Py3.10
Fix ValueError crash for console users with Python 3.10

Trac: https://dev.deluge-torrent.org/ticket/3518
See-also: https://docs.python.org/3/whatsnew/3.10.html#curses
2022-05-01 21:09:41 +01:00
7f0a380576 [Core] Cleanup temp files in add_torrent_url
Temporary torrent files are not deleted by add_torrent_url. Not as big a
problem as with tracker icons pages but should be removed after use.

Fixed by updating the method to use async and a try..finally cleanup
block.

Perhaps could be refactored to not require temporary files and instead
store the downloaded torrent as object for passing to add_torrent_file.

Trac: https://dev.deluge-torrent.org/ticket/3167
2022-05-01 20:38:09 +01:00
68c75ccc05 [TrackerIcons] Cleanup tmp files created by downloading page
Temporary files created while download host html page are no cleaned up
if the download fails.

Fixed by adding a 'finally' step in the callback chain to delete any
created temporary files.

Added tests to ensure the temporary files are deleted, using a fixture
that creates a known filename for the test.

Trac: https://dev.deluge-torrent.org/ticket/3167
2022-05-01 20:35:28 +01:00
96a0825add [TrackerIcon] Use httpdownloader page redirect handling
User reported infinite redirecting when attempting to fetch tracker
icon.

Fixed by allowing httpdownloader and RedirectAgent to handle page
redirects including catching infinite redirects

Trac: https://dev.deluge-torrent.org/ticket/3167
See-also: https://github.com/twisted/twisted/blob/5c24e9/src/twisted/web/client.py#L168
2022-05-01 20:35:28 +01:00
61a83bbd20 [Tests] Remove winreg interface name check
GitHub CI tests on Windows failing for get_windows_interface_name so
remove the fragile tests since not a requirement to be this specific
with testing whether name exists for these methods relying on standard
lib or 3rd-party libs.
2022-05-01 20:32:57 +01:00
bc6611fc0d [AutoAdd] Verify torrent decode and errors cleanly if invalid
Watch folder was disabled in AutoAdd and torrent filename is unchanged
if an invalid torrent was added.

Trac: https://dev.deluge-torrent.org/ticket/3515
Closes: https://github.com/deluge-torrent/deluge/pull/381
2022-05-01 18:34:19 +01:00
970a0ae240 [lint] update black package
Previous version (22.1.0) didn't support `click` version 8.1.0.
Updating to 22.3.0 to resolve.

See: https://github.com/psf/black/issues/2964
Closes: https://github.com/deluge-torrent/deluge/pull/382
2022-05-01 18:31:12 +01:00
5acb57b5af [CI] Use setup-python action pip cache
Replace custom pip cache that didn't work correctly on Windows with
option to use pip cache in setup-python action
2022-03-02 13:08:02 +00:00
7fa0af3446 [Core] Fixed KeyError in sessionproxy after torrent delete
When several torrents are being removed from session, an exception was
being raised in a callback function `on_status` with the `torrent_id` of
one (or more) of the removed torrents.
Now we will catch when the torrent does not exist anymore and print a
debug log about it.

Closes: https://dev.deluge-torrent.org/ticket/3498
Closes: https://github.com/deluge-torrent/deluge/pull/341
2022-03-02 13:00:45 +00:00
a954348567 [CI] Use libtorrent pypi install
Up until now, the linux installation source of libtorrent was launchpad,
because there was no other source, and we wanted a debug version of lt.

With pypi wheel versions now available use lt in the requirements.txt
file.

Closes: https://github.com/deluge-torrent/deluge/pull/364
2022-03-02 12:55:19 +00:00
13be64d355 [CI] Changed tested python version to 3.7 and 3.10
We cannot add python 3.6 because there is no precompiled version of it to used.
Therefor, will be using 3.7 as the minimum version in CI.
In addition, dropped version limits from pytest.
2022-03-02 12:53:29 +00:00
11fe22e4cd [Tests] Remove reference to Twisted Trial
With the move to pytest remove remainings documentation or comments that
refer to Trial.
2022-03-02 12:45:15 +00:00
a683b7e830 [Tests] Skip SNI icon test
The SNI icon test is failing due to seo.com removing their favicon.

A new test to replace it would be needed to check SNI support. Ideally
new tests would not rely on external sites.
2022-03-02 12:18:05 +00:00
b0f80f9654 [Console] Swap j and k key's behavior to fit vim mode
There is a problem in the Deluge's Console UI. This UI supports the j
and k keys as up and down, but for some reason they are inverted. This
commit inverts back the behaviour of j and k in several places.

Resolves: https://dev.deluge-torrent.org/ticket/3483
Closes: https://github.com/deluge-torrent/deluge/pull/377
2022-03-02 11:38:36 +00:00
f9ca3932a8 [GTK] Remove unneeded glade icon activatable False property
This propery cause issue with added extra space in the entries, likely a
minor GTK bug and property being leftover from GTK2 migration. The
default is True and should have no effect since no icon is shown.
2022-03-02 11:29:17 +00:00
5ec5271fdd [GTK] Refactor Connection Manager Add Host dialog
Replace table with grid and use single column for entries.
2022-03-02 11:09:30 +00:00
e15731fcd4 [GTK] Fix obscured port number in Connection Manager Add Host
A visual problem with the port spin button meant that the port number
was not fully visible in the entry field.

The problem is related to icon activatable property value set to False
when default is True. Although no icon is used is creates a left-hand
5px space in the entry which narrows the available text space and the
entry does not expand to account for this.

Fixed by removing primary_icon_activatable and
secondary_icon_activatable properies so that default values of True is
used.
2022-03-02 11:02:26 +00:00
2962f7cd2c [Packaging] Add systemd user services
Files should be installed into /usr/lib/systemd/user/

Unlike the existing service file, this one configures deluge to run as a
desktop session user. The difference between the services files is the
use of multi-user.target in system service which does not exist for user
services so requires default.target.

Including the Slice indicates to the service manager that this is a
background service. This can be used to handle OOM situations, or
prioritising foreground processes. There's no equivalent for system
services.

Refs: https://dev.deluge-torrent.org/ticket/2034
Closes: https://github.com/deluge-torrent/deluge/pull/380
2022-03-02 09:26:23 +00:00
c89a366dfb [Hostlist] Support IPv6 in host lists
socket.gethostbyname does not support IPv6 name resolution, and
getaddrinfo() should be used instead for IPv4/v6 dual stack support.

Closes: https://github.com/deluge-torrent/deluge/pull/376
2022-02-18 23:05:12 +00:00
5f8acabb81 [Console] Fix torrent details status error
The torrent status num_peers and num_seeds was replaced for session
status keys by accident as part of replacing deprecated session keys
so revert those changes

Ref: 2bd095e5bf
2022-02-17 20:30:05 +00:00
055a84bb15 [Core] Fix Twisted fromCoroutine AttrError
Users with older versions of Twisted <= 21.2 were encoutering the
following error:

    File "/home/calum/projects/deluge/deluge/decorators.py", line 191, in activate
      d = defer.Deferred.fromCoroutine(self.coro)

    builtins.AttributeError: type object 'Deferred' has no attribute 'fromCoroutine'

Fixed by falling back to ensureDeferred since fromCoroutine was
introduced in Twisted 21.2 as a saner name for handling of coroutines.

Ref: https://twistedmatrix.com/trac/ticket/9825
2022-02-16 16:20:54 +00:00
03938839e0 [Docs] Add permanent discord invite link
Default discord invites expire after 7 days so replace with non-expiring
invite
2022-02-15 15:30:08 +00:00
8ff4683780 Automatically refresh and expire the torrent status cache.
Stop at ratio was not working when no clients were connected, because
it was using a cached version of the torrent status, and never calling
for a refresh. When a client connected, it called for the refresh and
started working properly.

Closes: https://dev.deluge-torrent.org/ticket/3497
Closes: https://github.com/deluge-torrent/deluge/pull/369
2022-02-15 15:14:40 +00:00
62a4052178 [Docs] Remove custom mock to fix autodoc typing errors
If a libtorrent return type was specified e.g.

   def get_lt_status(self) -> 'lt.torrent_status'

Even as a string autodoc_typehints module would raise and error:

    Handler <function process_docstring at 0x7f6c16c8ec10> for event 'autodoc-process-docstring' threw an exception (exception: getattr(): attribute name must be string)

This was a result of using a custom mock in Sphinx autodoc config and
this Mock object name or qualname returns an object instead of str.

Testing with putting modules in autodoc_mock_imports again showed no
issues so removing custom mock

Ref: https://github.com/tox-dev/sphinx-autodoc-typehints/issues/220
2022-02-15 11:49:54 +00:00
8ece036770 [WebUI] Move HTML entity encoding to client
We should not be mangling the torrent data in the JSON API since this
can have unintended consquences with names and filepaths that can be
edited. If we escape those symbols in the JSON API then the data no
longer matches that stored by core. Therefore shift the encoding to the
client and consider dealing separetely with these entities when the user
first adds a torrent.

* Created a modified htmlEncode in Deluge Formatter based on extjs
method that also encodes single quotes.
* Removed renderers in ListViews since only templates specified via tpl
are used and any render attribute specified was a no-op.
* Removed old buggy escapeHtml

Resolves: https://dev.deluge-torrent.org/ticket/3459
Ref: https://docs.sencha.com/extjs/6.5.3/modern/src/String.js.html#Ext.String-method-htmlEncode
Ref: https://docs.sencha.com/extjs/3.4.0/source/Format.html#Ext-util-Format-method-htmlEncode
2022-02-14 18:44:19 +00:00
a5503c0c60 [WebUI] Fix encoding HTML entities for torrent attributes
Ensure all torrent attributes that might contain malicious HTML entities
are encoded.

By allowing HTML entities to be rendered it enable malicious torrent
files to perform XSS attacks.

Resolves: https://dev.deluge-torrent.org/ticket/3459
2022-02-14 18:43:20 +00:00
f754882498 [GTK] Increase connection mgr default height
Could not see more than one host when connection manager opens so need to
scroll or resize window

Increased default height to now show three hosts when first opens

Closes: https://dev.deluge-torrent.org/ticket/3431
2022-02-13 14:45:29 +00:00
191549074c [GTK] Fix ui logic/bug of checked move_completed
if move_completed is checked/True, options should be updated, not the
other way round

The path was updated the first time the move_completed option is selected
and then ignored on further updated to the path.

Fixed by checking instead if the path has changed.

Closes: https://github.com/deluge-torrent/deluge/pull/374
2022-02-13 13:55:54 +00:00
2ec6e10c8e [Lint] Update linter version and fix issues
Notable changes:

* Prettier >=2.3 with more consistent js assignments
* Black now formats docstrings
* Added isort to list of autoformaters
* Update flake8 config for v4

Ref: https://prettier.io/blog/2021/05/09/2.3.0.html
2022-02-13 13:38:27 +00:00
2bd095e5bf [Core] Stopped using libtorrent deprecated functions
As part of the process of adding support to LT 2.0, we should stop using
all deprecated function, as some (if not all) were removed.
For this process, we should use the LT 1.2 upgrade (guide)[1].

The change includes:
* stop using file entries directly
* start using the torrent handle's set/unset flags
* stop using url key in add_torrent_params (for magnet)
* stop accessing resume_data from save_resume_data_alert
* stop using deprecated session status keys in UI

[1] https://libtorrent.org/upgrade_to_1.2-ref.html
Closes: https://dev.deluge-torrent.org/ticket/3499
Closes: https://github.com/deluge-torrent/deluge/pull/342
2022-02-13 11:36:04 +00:00
513d5f06e5 [lt] Upgraded libtorrent minimum version to 1.2
As part of the preparations for libtorrent 2.0, we should stop supporting
lower versions of it.
2022-02-13 11:32:30 +00:00
a1da2058bc [Core] Enable file_completed_alert handling.
Without adding file_progress to the alert mask, the
TorrentFileCompletedEvent would never fire.

Closes: https://dev.deluge-torrent.org/ticket/3421
Closes: https://github.com/deluge-torrent/deluge/pull/370
Ref: https://libtorrent.org/upgrade_to_1.2-ref.html
2022-02-13 11:25:45 +00:00
af26fdfb37 [GTK] Fix adding daemon accounts
Errors were raised when trying to add a new daemon account due to dialog
being destroyed before looking up widget values.

Fixed by saving widget values before destroying.

Refactored code to be simplified with a named tuple for the account
details instead of separate attributes and modernized the preferences
dialog creation and account saving by replacing callback functions.
2022-02-12 23:40:00 +00:00
66b5a2fc40 [Console] Fix incorrect test for when a host is online
The tests in connectionmanager for when a host is online are broken
and always considers a host as online.

When an error occurs in e.g. in _on_connect_fail, report_message()
in PopupsHandler expects the message to be string, not a Twisted Failure.
Fix by checking if message is string and log a warning before converting
to string.

Closes: https://github.com/deluge-torrent/deluge/pull/277
2022-02-12 19:03:52 +00:00
29f0789223 [plugins] Add dev links script for Windows
Currently, when creating a new plugin, a script for creating
the dev links was created for *NIX systems only.
Now, it will detect the system type and create the correct
script:
Windows: create_dev_links.bat
*NIX: create_dev_links.sh

Closes: https://github.com/deluge-torrent/deluge/pull/257
2022-02-12 17:59:37 +00:00
f8f997a6eb [Config] Fix callLater func missing args
In a6840296, a refactor to the `config` class was introduced.
The change included an internal wrapper for `reactor.callLater`, for lazy
import, but didn't wrap it correctly and therefor, no args/kwargs were
passed to the wrapped method.
Furthermore, the exception was silently ignored.
This caused changes to be ignored and not applied, including
`preferencesmanager._on_config_value_change` callback.

Closes: https://github.com/deluge-torrent/deluge/pull/372
2022-02-12 17:14:19 +00:00
374997a8d7 [Tests] Make file priority test more consistent.
Our file priority test was using time.sleep to wait until libtorrent
had processed the command. This was sometimes not long enough and the
test would fail. On libtorrent 2.0.3+ there is an alert when the
process has finished, switch to waiting for that in this test to make
the test more consistent. On older libtorrent, make the delay a bit
longer, to try to make the test more consistent there as well.

Closes: https://github.com/deluge-torrent/deluge/pull/373
2022-02-12 17:12:05 +00:00
dabb505376 [Core] Document all exported core methods with type hints
Standardize docstrings in core.py to google standard.
Remove type hints in docstrings in favor of the ones in method signatures.

Use function signature type hints in autodoc generated docs.

Change Deferred type hints to strings.

Older versions of twisted (<21.7) don't
support generic Deferred type hinting,
this prevents crashes on those versions.

Closes: https://github.com/deluge-torrent/deluge/pull/359
2022-02-11 08:48:58 +00:00
aa74261d50 [GtkUI] Fix ETA being copied to neighboring empty cells
An optimization that avoided re-rendering treeview cells sometimes
went wrong, and rendered a value from the wrong row when moving
the mouse around the torrentview window.

Closes: https://dev.deluge-torrent.org/ticket/3500
Closes: https://github.com/deluge-torrent/deluge/pull/371
2022-02-11 08:31:03 +00:00
b29829f571 [CI] Fix package build error
Not all dependencies were installed due to adding a comment in the
middle of the pip install command

Also need to specify Twisted extras to match requirement.txt
2022-02-09 20:39:48 +00:00
d559f67ab9 [Packaging] Fix pyinstaller to find installed deluge package data
Instead of relying on the source code paths use the pip installed Deluge
package data.
2022-02-09 19:53:17 +00:00
d4f8775f44 [CI] Use working dir to shorten commands
Making the workflows more readable
2022-02-09 19:53:17 +00:00
50647ab3a5 [CI] Replace custom twisted package with pre-release
Fix for Windows simulate error has been merged and in 22.2.0rc

Ref: https://github.com/twisted/twisted/pull/1679
2022-02-09 19:53:17 +00:00
90744dc2e6 [GTK] Workaround crash on Windows with ico or gif icons
A problem with GdkPixbuf loaders on Windows causes a hard crash when
attempting to load ico or gif tracker icons.

Added a workaround by skipping these icon types until a more permanent
solution is found.

Ref: https://dev.deluge-torrent.org/ticket/3501
2022-02-09 19:53:17 +00:00
24a3987c3a [GTK] Refactor out get_pixbuf_at_size
The functionality of get_pixbuf and get_pixbuf_at_size is almost
identical so reuse get_pixbuf with an optional size arg.
2022-02-09 19:53:15 +00:00
e87236514d [Build] Fix entry point build errors
Fixed a mistake settings entry points in setup.py. Replaced with simpler
logic since gui_scripts only affect Windows.

Fixed entry point changes affecting pyinstaller build

Corrected deluge-web.exe to have no console instead of
deluge-web-debug.exe
2022-02-06 21:02:43 +00:00
2fb41341c9 [Core] Convert inlineCallbacks to maybe_coroutine
Make logging functions synchronous.

They were not calling any async functions, and wrapping them in
maybe_coroutine caused reactor to be imported before gtkui could
install the gtk reactor.

Closes: https://github.com/deluge-torrent/deluge/pull/353
2022-02-06 16:45:37 +00:00
b76f2c0f20 [Decorators] Add maybe_coroutine decorator
- Clean up callback hell by making more code inline
- Use async/await syntax as it has more modern niceties than inlineCallbacks
  - Also gets us closer if we want to transition to asyncio in the future
  - `await` is usable in places that `yield` is not. e.g. `return await thething` `func(await thething, 'otherparam')`
  - IDEs know async semantics of async/await syntax to help more than with `inlineCallbacks`
- `maybe_coroutine` decorator has nice property (over `ensureDeferred`) that when used in a chain of other coroutines, they won't be wrapped in deferreds on each level, and so traceback will show each `await` call leading to the error.
- All async functions wrapped in `maybe_coroutine` are 100% backwards compatible with a regular Deferred returning function. Whether called from a coroutine or not.
- Use Deferred type hints as strings since older versions of twisted
(<21.7) don't support generic Deferred type hinting.
2022-02-06 16:42:13 +00:00
bd88f78af6 [Plugins] Fix namespace deprecation warning
The plugin namespace was changed from deluge.plugins to deluge_
in 535b13b5f1 but deprecation warning was not updated.
2022-02-06 16:27:47 +00:00
bf97bec994 [Config] Add mask_funcs to help mask passwords in logs
Added a new Config class parameter `log_mask_funcs` to enable config
instances hide sensitive information that would normally appear in
config debug logs.

Added mask password function to hostlist to replace passwords with '*'s
in logs.

Closes: https://github.com/deluge-torrent/deluge/pull/363
2022-02-06 16:15:34 +00:00
a27a77f8c1 [Windows] Use gui_scripts for web and daemon entry points
Hide the console cmd popup when using deluge-web.exe ordeluged.exe on
Windows.

By using gui_scripts it will disable stdin and stdout for these
executable but there are `-debug` versions available if that is
required.

Ref: https://packaging.python.org/en/latest/specifications/entry-points/#use-for-scripts
2022-02-06 15:15:25 +00:00
e8fd07e5e3 [Console] Add the torrent label to info command
Closes: https://dev.deluge-torrent.org/ticket/1556
Closes: https://github.com/deluge-torrent/deluge/pull/356
2022-02-06 15:11:29 +00:00
1089adb844 Revert "[Core] Document all exported core methods with type hints"
Typing is broken with older versions of Twisted e.g. with v21.2

    deluge/deluge/core/core.py", line 404, in Core
        ) -> defer.Deferred[str]:
    TypeError: 'type' object is not subscriptable

Also it might not be compatible with Python 3.6 or 3.7 with use of
certain types such as dict rather than Dict

This reverts commit 4096cdfdfe.

Ref: https://twistedmatrix.com/trac/ticket/9816
2022-02-05 17:50:54 +00:00
4096cdfdfe [Core] Document all exported core methods with type hints
Standardize docstrings in core.py to google standard.
Remove type hints in docstrings in favor of the ones in method signatures.

Use function signature type hints in autodoc generated docs.

Closes: https://github.com/deluge-torrent/deluge/pull/359
2022-02-05 17:23:50 +00:00
099077fe20 [Config] Replace custom property decorator 2022-02-05 16:13:10 +00:00
a684029602 [Config] Refactor config class
* Refactored duplication with setting config key and logging
* Simplified lazy importing reactor for callLater. This lazy importing
is required for testing and also prevents Gtk UI lockup if reactor
imported in Config.
* Fixed saving config to file when setting a key that doesn't exist yet.
This was due to returning early in the set_item method.
* Added a `default` arg to set_item to prevent saving to file when only
setting a default value for a key in init.
* Moved casting value to existing key type from set_item to dedicated
function.
2022-02-05 16:01:22 +00:00
8b0c8392b6 [Log] Fix crash logging to Windows protected folder
Have the log dir be a protected windows folder and Deluge crashes.
Windows blocks access to the dir and so it fails. It will fail trying to write
to any protected folder. Should probably just pass on the error maybe
and maybe log to stdout and log a message saying access was blocked or
something.

    .\deluge-debug -L debug -l E:\Documents\deluge.log
    ...
    Failed to execute script 'deluge-debug-script' due to unhandled exception!

Closes: https://dev.deluge-torrent.org/ticket/3502
Closes: https://github.com/deluge-torrent/deluge/pull/358
2022-02-03 22:46:33 +00:00
222aeed2f3 Remove legacy PY2 sys.argv unicode handling
Fixed crash when sys.stdout was None

When using pythonw on windows, sys.stdout and stdin are None. We had a
legacy unicode_argv handler that was crashing in this instance. Just
removed that, since sys.argv is always unicode on python 3 to fix the
crash.

Closes: https://github.com/deluge-torrent/deluge/pull/361
2022-02-03 22:38:37 +00:00
ece31cf3cf [Tests] Transition tests to pure pytest
Convert all the twisted.trial tests to pytest_twisted. Also move off of unittest.TestCase as well. Seems there were several tests which weren't actually testing what they should, and also some code that wasn't doing what the broken test said it should.

Goals:

    Remove twisted.trial tests
    Move to pytest fixtures, rather than many classess and subclasses with setup and teardown functions
    Move away from self.assertX to assert style tests
    FIx broken tests

Going forward I think these should be the goals when adding/modifying tests:

* Don't use BaseTest or set_up tear_down methods any more. Fixtures should be used either in the test module/class, or make/improve the ones available in conftest.py
* For sure don't use unittest or twisted.trial, they mess up the pytest stuff.
* Prefer pytest_twisted.ensureDeferred with an async function over inlineCallbacks.
  - I think the async function syntax is nicer, and it helps catch silly mistakes, e.g. await None is invalid, but yield None isn't, so if some function returns an unexpected thing we try to await on, it will be caught earlier. (I struggled debugging a test for quite a while, then caught it immediately when switching to the new syntax)
  - Once the maybe_coroutine PR goes in, using the async syntax can also improve tracebacks when debugging tests.

Things that should probably be cleaned up going forward:

* Remove BaseTestCase
* Remove the subclasses like DaemonBase in favor of new fixtures.
  * I think there are some other utility subclasses that could be removed too
* Perhaps use parameterization in the ui_entry tests, rather that the weird combination of subclasses and the set_var fixture I mixed in.
* Convert some of the callback stuff to pytest_twisted.ensureDeferred tests, just for nicer readability

Details relating to pytest fixtures conftest.py in root dir:
 * https://github.com/pytest-dev/pytest/issues/5822#issuecomment-697331920
 * https://docs.pytest.org/en/latest/deprecations.html#pytest-plugins-in-non-top-level-conftest-files

Closes: https://github.com/deluge-torrent/deluge/pull/354
2022-02-03 22:29:32 +00:00
0fbb3882f2 [CI] Fix checkout action missing fetch depth
Need a fetch depth greater than 1 to find latest tag.
2022-02-01 06:45:10 +00:00
73394f1fc5 [CI] Fix run manual packaging workflow for tag
To allow packaging any commit the workflow needs to separately checkout
the source code from the current code containing the packaging scripts.
2022-01-30 17:42:15 +00:00
9b043cf2c1 [CI] Allow manual specifying tag in packaging workflow 2022-01-30 17:03:33 +00:00
1cd005c272 [Gtk] Fixed edit torrents dialogs windows close issues
Up until now, when closing the Add or Edit dialogs, of the `Edit Torrents`, using the top-right X
button or using the Escape key, they were being destroyed without any way to reopening them, and
it was breaking the `Edit Torrents` window itself.
Now both dialogs have the right handlers for handing the closing process without breaking anything.

Closes: deluge-torrent/deluge#324
Closes: https://dev.deluge-torrent.org/ticket/2434
2022-01-30 16:26:44 +00:00
4107bf8f25 [Blocklist] Add frequency unit to interval label
Closes: https://dev.deluge-torrent.org/ticket/3492
Closes: https://github.com/deluge-torrent/deluge/pull/322
2022-01-30 16:21:39 +00:00
49bedda956 [Docs] Add discord link to readme
Closes: https://github.com/deluge-torrent/deluge/pull/350
2022-01-30 16:17:05 +00:00
540d557cb2 [Common] Add is_interface to validate network interfaces
Libtorrent now supports interface names instead of just IP address so
add new common functions to validate user input.

* Added is_interface that will verify if a libtorrent interface of name
or IP address.
* Added is_interface_name to verify that the name supplied is a valid
network interface name in the operating system.
  On Windows sock.if_nameindex() is only supported on 3.8+ and does not
return a uuid (required by libtorrent) so use ifaddr package. Using git
commit version for ifaddr due to adapter name decode bug in v0.1.7.
On other OSes attempt to use stdlib and fallback to ifaddr if installed
otherwiser return True.
* Added tests for is_interface & is_interface_name
* Updated UIs with change from address to interface
* Updated is_ipv6 and is_ipv4 to used inet_pton; now supported on
Windows.

Ref: https://github.com/pydron/ifaddr/pull/32
Closes: https://github.com/deluge-torrent/deluge/pull/338
2022-01-30 16:13:27 +00:00
d8acadb085 [Tests] fix/enable most ui tests on Windows
Closes: https://github.com/deluge-torrent/deluge/pull/348
2022-01-26 18:44:54 +00:00
932c3c123f [Tests] fix torrentview tests (new default column was added) 2022-01-26 18:44:48 +00:00
986375fa86 [Tests] Make sure to return exit code still when ending test daemon
Use a separate Client instance to call test daemon shutdown
2022-01-26 18:44:48 +00:00
4497c9bbcc [Tests] Escape backslashes in filename in webserver test 2022-01-26 18:44:47 +00:00
23f7c4dd6e [Tests] Change example files in files tab test to sort the same on linux/windows 2022-01-26 18:44:47 +00:00
a41f950d09 [Tests] Enable more tests that now work on Windows 2022-01-26 18:44:47 +00:00
209716f7cd [Tests] Shutdown test daemon cleanly using rpc. (needed for Windows)
Escape backslashes in config path for test daemon startup.
2022-01-26 18:44:47 +00:00
3dca30343f [Tests] Make failure message more clear when test daemon doesn't shut down cleanly 2022-01-26 18:44:47 +00:00
71cde7c05e [Tests] Enable unicode path test on Windows 2022-01-26 18:44:47 +00:00
dbf3495c4e [Tests] Fix erroneous windows line endings in test state file 2022-01-26 18:44:47 +00:00
fffc6ab7d7 [Tests] Enable metafile test on Windows 2022-01-26 18:44:46 +00:00
a73e01f89f [Tests] Fix maketorrent test on Windows 2022-01-26 18:44:46 +00:00
87ec04af16 Fix crash when logging errors initializing gettext 2022-01-26 18:44:46 +00:00
d8746a8852 [Core] Return plugin keys with get_torrents_status
When requesting all keys, get_torrents_status was missing plugin added keys
This commit brings the behavior in line with get_torrent_status, and deluge 1.3

Closes: https://dev.deluge-torrent.org/ticket/3357
Closes: https://github.com/deluge-torrent/deluge/pull/347
2022-01-26 18:40:16 +00:00
7c9a542006 [GTK] Hide account password length in log
We should not let anyone know the account's password length,
as it can help to crack it.
Instead, we will print a constant amount (10) of asterisks.

Closes: https://github.com/deluge-torrent/deluge/pull/346
2022-01-23 16:39:24 +00:00
e75ef7e31f [Packaging] Simplify PyInstaller spec file
This makes the process of editing the file much more pleasant and
removes duplicate code.

Fixed collecting twisted package which brings both build speed
improvements but also decreases package size, as it stops PyInstaller
from bundling tests (actually, some tests might even execute during
import and break build if they're designed to throw!) used by
PyInstaller

Closes: https://github.com/deluge-torrent/deluge/pull/342
2022-01-23 16:04:33 +00:00
4f87612a0f [Common] Replace distro.linux_distribution function
As of distro (1.6.0)[1], this function is marked as deprecated.
Instead, we will use the underlying functions directly, as explained in the (docs)[2].

[1] https://github.com/python-distro/distro/issues/263#issuecomment-927098357
[2] https://distro.readthedocs.io/en/latest/#distro.linux_distribution

Closes: https://github.com/deluge-torrent/deluge/pull/345
2022-01-22 12:06:38 +00:00
2cad0f46f2 [CI] Add pygame to windows package build/spec file
pygame is required by notification plugin for sounds
2022-01-21 13:12:23 +00:00
5931d0cc0b [CI] Fix package job not running with PR label
The job would only run when the PR was labeled since
`github.event.label.name` only available when `labeled` type event
recieved
2022-01-21 12:53:54 +00:00
9d4ca77ef7 [CI] Cleanup packaging dependencies 2022-01-21 12:53:54 +00:00
ad27a278fd [GTK UI]About Dialog Update year 2022-01-21 12:53:54 +00:00
4f17fc41a5 [Packaging] Disable GTK CSD by default on Windows
CirnoT reported how they felt that GTK3 is not reliable on Windows.
Seeing some weird issues where clicking Deluge icon on taskbar does
bring window to front but doing so again does not minimize it as one
would expect. By using GTK_CSD=0 this would reduce these problems.

> If changed to 0, this disables the default use of client-side
decorations on GTK windows, thus making the window manager responsible
for drawing the decorations of windows that do not have a custom
titlebar widget.

This can be overridden by a global env var.

Ref: https://github.com/deluge-torrent/deluge/pull/331#issuecomment-1012311605
Ref: https://docs.gtk.org/gtk3/running.html
2022-01-21 12:53:54 +00:00
15d2d27a53 [CI] Specify github windows server version
To ensure builds don't break avoid using windows-latest

Refs: https://github.com/actions/virtual-environments/issues/4856
2022-01-21 10:16:15 +00:00
65e5010e7f [Core] Add pygeoip dependency support
Provide support for the pure-python pygeoip as compiled GeoIP is not
always available.

Ref: https://dev.deluge-torrent.org/ticket/3271
2022-01-21 10:02:18 +00:00
9b97c74025 [GTK] Added a torrent menu option for magnet copy
this will lined-up with the WebUI, which already have this option.
in addition, it will not open the Add Torrent URL dialog after copied,
which happens automatically when there is torrent/magnet URIs in the clipboard.

Closes: deluge-torrent/deluge#328
Closes: https://dev.deluge-torrent.org/ticket/3489
2022-01-21 09:41:59 +00:00
d62362d6ae [CI] Improve packaging workflow
Include arch in artifacts so they can be downloaded separately

Added libtorrent 2.0 to matrix since users often request latest
libtorrent.

Renamed workflow to make it's purpose clearer
2022-01-20 15:31:15 +00:00
1a9affbbac [Build] Add missing setuptools to requirements
Although likely to already be installed this is a runtime requirement
for Deluge
2022-01-20 14:49:53 +00:00
2316088f5c [CI] Remove PR specified branch
This branch name is the head name not the base name so prevents the job
running unless submitted has branch name that matches
2022-01-14 13:07:22 +00:00
d14310078b [CI] Fix typo in CD 2022-01-13 22:46:02 +00:00
1696c69776 [CI] Fix windows build tag exclude
Fixes error:

    you may only define one of `tags` and `tags-ignore` for a single event
2022-01-13 22:36:56 +00:00
5f96ea4217 [CI] Restrict creating Windows installer
Limit the running of this job by only running on develop, tags and pull
requests that have label 'windows'
2022-01-13 22:23:25 +00:00
491a20cb08 Fix Execute and Extractor Plugins
Include missing twisted requirements resulting in errors:

    ModuleNotFoundError: No module named 'twisted.internet.utils'
2022-01-13 22:23:25 +00:00
490fb898af Build With Patched Twisted Build
Fixes TypeError in simulate call

Ref: https://twistedmatrix.com/trac/ticket/9660
Ref: https://github.com/twisted/twisted/pull/1679
2022-01-13 22:23:25 +00:00
560a52a443 Fix OpenSSL For Libtorrent
libtorrent + pyinstaller requires a lib(ssl/crypto)-1_1.dll and
lib(ssl/crypto)-1_1-x64.dll odd quirk but solveable by just having
two copies. Maybe later compiling our own libtorrent.
2022-01-13 22:23:25 +00:00
b9a208f18f Update Windows Packaging
* Rename instances of win32 to generic win or the appropriate bit where applicable
* Remove files used in GTK2
* Add spec file for use with PyInstaller
* Remove Python bbfreeze Script
* Add Github Action To Build Releases
* Add Modified script to make files used by NSIS
* Update Readme

Closes: https://github.com/deluge-torrent/deluge/pull/331
2022-01-13 22:23:08 +00:00
6da4c4bf66 Restore PY2 for 3rd-party plugins
Restored PY2 to avoid breaking compatibility with plugins that imported
PY2 from common.

Ref: https://bitbucket.org/bendikro/deluge-yarss-plugin/issues/67/deluge-210-removed-all-py2-support
2022-01-13 19:48:53 +00:00
d2390cd247 [i18n] Fix load_libintl error
Fixed libintl being undefined if no library was found
2022-01-12 20:19:56 +00:00
c3cd7f5e5c [Plugins] Fix missing description with metadata 2.1
Changes to the metadata specs in v2.1 meant that Description field
might appear in the body of the message instead of as a header key.

Replaced custom parser with email parser (as outlined in the document
using compat32 policy) to simplify extracting the message header and
body.

Ref: https://dev.deluge-torrent.org/ticket/3476
Ref: https://packaging.python.org/en/latest/specifications/core-metadata/#description
2022-01-12 20:12:02 +00:00
2351d65844 [Plugins] Fix and refactor get_plugin_info method
A new metadata version 2.1 has optional Description that is causing an
TypeError when looking up the key in plugin_info since clients are
assuming values are always strings but the default is None.

Fixed TypeError by ensuring that the info dict has a default empty
string set for all keys.

Separated the parsing of the pkg_info into static method to make it
easier to test.

Changed the missing plugin info to only set the Name and Version as
'not available' since all other fields are optional.

Ref: https://dev.deluge-torrent.org/ticket/3476
Ref: https://packaging.python.org/en/latest/specifications/core-metadata/#description
2022-01-12 19:19:39 +00:00
e50927f575 [GTK] Fix unable to prefetch magnet in thinclient
A UnicodeDecodeError is raised in transfer module when attempting to
prefetch a magnet.

This is result of passing a Python dict containing text bytes and raw
bytes that cannot be decoded as utf-8 in rencode when recieving the
message. This could be handled in rencode by returning raw bytes if
decoding fails (perhaps with a strict mode?) however better to follow
convention of encoding raw bytes in base64 in API calls.

Fixed by retaining bencoding and encoding with base64 when sending
result.

Resolves: https://github.com/deluge-torrent/deluge/pull/334
2022-01-08 19:43:40 +00:00
79b7e6093f Fix is_url and is_infohash error with None value
Encountered a TypeError with None value passed to is_infohash function
so add guard clause.
2022-01-08 13:56:05 +00:00
4f0c786649 [AutoAdd] Fixed error dialog not being shown on error
This happened due to the removal of `exception_msg` attribute, which was
removed with the changes to `RPC` protocol in commit 9b812a4.
Now we access the message using the `message` attribute.

Closes: deluge-torrent/deluge#332
Closes: https://dev.deluge-torrent.org/ticket/3069
2022-01-06 10:06:03 +00:00
fca08cf583 [TrackerIcon] Fixed old-large icon removal
After downloading and resizing the new icon, we try to remove the downloaded
file, which is larger, but it fails because it tries to do so when the file
is still open, and therefor locked.
On close of the UI, we got `PermissionError` exceptions for each new icon.
2022-01-06 10:04:22 +00:00
517b2c653b [TrackerIcon] Fixed parse error on UTF-8 sites with non-english chars
When parsing the site's page in search for the FAVICON, the page gets opens.
The default file encoding in dependent on the running OS, and might not
be `UTF-8` on Windows.
Therefor, some trackers might not get their icon downloaded at all because of
an error:
`UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 2158: character maps to <undefined>`.
This fix adds a detection of file encoding using the optional `chardet` dependency, and also a test.

Closes: deluge-torrent/deluge#333
Closes: https://dev.deluge-torrent.org/ticket/3479
2022-01-06 10:04:19 +00:00
44dcbee5f4 [GTK] Make combobox_window expand to width
This makes the download location entry textbox resizable which is very
useful for entering long paths.

Closes: deluge-torrent/deluge#295
2022-01-03 22:17:00 +00:00
efc9f465f0 [WebUI] Define foreground and background colors
There is no promise that default bg is white and default fg is black so
define in deluge.css

Ref: https://dev.deluge-torrent.org/ticket/3435
Closes: deluge-torrent/deluge#330
2022-01-03 22:07:11 +00:00
5321d24f2a [GTK] Use GtkSpinner when testing open port
this switched was motivated by an error which happened each time the check
port button was clicked, and was caused by the GtkImage when loading the
loading.gif file on Windows:

    cannot register existing type 'GdkPixbufGdipAnim'

Closes: deluge-torrent/deluge#329
2022-01-03 22:02:53 +00:00
f30f7f4629 [UI] Add Keywords property to desktop file
Deluge fails to appear in some app launchers (GNOME app search, Albert launcher) when searching for just "torrent" or other keywords, rather than "bittorrent". This is due to the lack of a Keywords header/property in its desktop entry file. Adding this line should solve the issue.

I don't know if the underscore "_" is actually necessary for this line, I just copied the appearance of the lines above it when inserting. Please check that this comes out without the underscore in the final file after processing.

Closes: deluge-torrent/deluge#323
2021-12-29 21:54:00 +00:00
ec0bcc11f5 Upgrade codebase with pyupgrade (>=py3.6)
Added pyupgrade utility with manual stage to pre-commit and run on all
files.

Ref: https://github.com/asottile/pyupgrade
Closes: deluge-torrent/deluge#326
2021-12-29 21:51:07 +00:00
16895b4a49 [Docs] Fix spinx-contrib-spelling build error
CI docs build was failing with the following error when using latest
sphinx-contrib-spelling 7.3.1

    error: option -j not recognized

Fixed by pinning to previous version.

GitHub-ref: https://github.com/sphinx-contrib/spelling/issues/142
2021-12-29 21:43:03 +00:00
f3784723ae [UI] Add SVG support for tracker icons
SVG files are supported by all browsers so need to support it as well,
according to https://www.w3schools.com/html/html_favicon.asp

Also, it appears as SEO.com site, which was dropped because of a cert issue,
has only SVG icon. So enabled it again.

Lastly, from python 3.2, `os.path.samefile` is supported on Windows.
So Windows will now test TrackerIcons as well.
2021-12-29 21:38:55 +00:00
7f5857296e [CI] Upgrade Windows python version to 3.8 (same as linux) 2021-12-29 20:06:10 +02:00
897955f0a1 Remove all Python 2 support
* Removed all __future__ imports from code
* Removed all six dependencies
* Removed all future_builtins imports
* Removed all Python 2 related code

Closes: deluge-torrent/deluge#325
2021-12-28 19:26:38 +00:00
ff309ea4c5 [GtkUI] Fix ETA sorting to match WebUI
The sort for Ascending was putting longest eta first but seems more
intuitive that the smallest time to wait should be first. The WebUI
in previous commit swapped this behaviour so updating GtkUI.
2021-12-22 23:17:14 +00:00
3b11613cc7 [WebUI] Fixed ETA sorting in WebUI
When sorting the according to ETA values, all torrents with infinite value were being
considered a lower value (INF -> 12 -> 32) instead of largest (12 -> 32 -> INF).
This is due to the fact that the INF symbol is placed to lower value (<= 0).
Now the lower values are being treated as the largest JS number when sorting.

Closes: https://dev.deluge-torrent.org/ticket/3413
Closes: https://github.com/deluge-torrent/deluge/pull/321
2021-12-22 22:04:24 +00:00
a2d0cb7141 [Console] Removed Core dependency from Console UI
UIs should not depend on core directly, so removing the dependency in ConsoleUI.
This is done by adding a hard-coded variable.

Closes https://dev.deluge-torrent.org/ticket/3491
Closes: https://github.com/deluge-torrent/deluge/pull/320
2021-12-22 21:53:17 +00:00
88ffd1b843 [Servers] Moved check_ssl_keys and generate_ssl_keys to crypto_utils.py
With this change, we drop a core dependency from the UI. This will help group together
all related functionality in one place, i.e. all security related functions.

Also updated testssl.sh version to 3.0.6 (SECURITY_TEST)

Closes: deluge-torrent/deluge#288
2021-12-20 22:09:08 +00:00
6a10e57f7e back to development 2021-12-15 19:43:39 +00:00
612e0061ed Release 2.0.5 2021-12-15 18:48:16 +00:00
2eee7453cb Update Changelog 2021-12-15 18:45:25 +00:00
58cc278145 [i18n] Fix set_language error with empty lang string
The Web server config for language was set to an empty string which
resulted in an warning logged by i18n set_language.

* Changed set_language to ignore empty language string and do nothing.
We don't want to override the user's system language unless actually
specified by the user.
* Improved the translation warning message.
2021-12-15 18:35:50 +00:00
a03e649da6 [Build] Fix WebUI js minifying error
Some users encoutered a bug where WebUI in browser show a white screen,
which indicates a problem with loading javascript files. The problem was
due to closure minifying failure leaving a zero-length deluge-all.js
file which broke the usual fallback mechanism to debug files.

* Fixed usage of ES6 const declaration breaking closure minifying.
* Cleanup minified files upon errors so no zero length files left
* Replaced broken and unmaintained slimit with rjsmin.
* Fixed unable to set dev or debug query args due to request args
requiring bytes.
2021-12-15 09:37:55 +00:00
073bbbc09d [Packaging] Start replacing deprecated distutils
Working towards removing distutils

> direct usage of distutils is now actively discouraged,
with setuptools being the preferred replacement.

Ref: https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html
2021-12-13 23:57:09 +00:00
bca0aa3532 [CI] Replace pypi deluge-libtorrent with libtorrent
* Remove certifi since included in requirements.txt
* Remove old travis config
2021-12-12 21:49:31 +00:00
cb588d0205 [Docs] Update release checklist page 2021-12-12 21:43:54 +00:00
2b20e9689b back to development 2021-12-12 19:35:54 +00:00
65f7cf0d83 Release 2.0.4 2021-12-12 18:57:38 +00:00
5ac8f4c81b Update changelog 2021-12-12 18:55:41 +00:00
c33c9082d9 [Docs] Add Flatpak install links 2021-12-12 18:39:41 +00:00
62ae0f5ef6 [Docs] Update install guide
Rewrite install instructions to include more details on Deluge 2.0
install.

* Added other Linux distros
* Added stable PPA details
* Added link to forum for Windows and macOS community packages

Co-authored-by: Sergio M <sergio@example.com>
Co-authored-by: Ofry Linkovsky <15746116+OfryL@users.noreply.github.com>
Closes: deluge-torrent/deluge#296
Closes: deluge-torrent/deluge#310
2021-12-12 18:27:05 +00:00
24aa48187e [Docs] Replace recommonmark with MyST parser
We used recommonmark so that we can use markdown in sphinx but it is
buggy and now so switch to better supported MyST-parser.

* Fixed incorrect heading warnings in markdown.
* Added sphinx toctree to markdown using directive as required by MyST.
* Upgraded Sphinx to 4.3

Ref: https://myst-parser.readthedocs.io
2021-12-12 18:16:21 +00:00
342cca4367 [GTKUI] Open tracker edit with double click
Closes #2434
Closes: deluge-torrent/deluge#253
2021-11-26 07:29:34 +00:00
9194092d7b [GTKUI] Support using the Ayatana fork of indicators.
As this fork is maintained in Debian, and as of Impish/21.10 is the supported
variant in Ubuntu as well.

Closes: deluge-torrent/deluge#317
2021-11-24 19:49:49 +00:00
5f6f65a065 [GTKUI] Add "Last Transfer" column
Closes: deluge-torrent/deluge#255
2021-11-23 20:45:09 +00:00
967537a409 [GTK3UI] Allow escape key to close Create Torrent dialog 2021-11-23 20:07:44 +00:00
f74163489c [Packaging] Fix gtk3 glade path in MANIFEST
Missed path update when moving from gtk2 to gtk3
2021-11-23 20:07:33 +00:00
7a110bd60f [Plugins] Fix allow enabling any plugin Python version
Properly fix allow enabling any plugin Python version, first attempted
in previous commit 3433a91

Closes: deluge-torrent/deluge#316
2021-11-08 19:27:24 +00:00
d56636426e [GTKUI] Added detection of torrent URL on GTK UI focus
In case deluge GTK gets focus with a new torrent URL on the clipboard,
the "Add Torrent from URL" dialog will pop up automatically

Closes: deluge-torrent/deluge#306
2021-10-03 19:34:09 +01:00
de4fbd2e82 [Core] Workaround torrent file_progress lt 2.0 error
Workaround lt 2.0 python bindings error when calling a torrent handle
file_progress:

```
Boost.Python.ArgumentError: Python argument types in
    torrent_handle.file_progress(torrent_handle)
did not match C++ signature:
    file_progress(libtorrent::torrent_handle {lvalue}, libtorrent:🎏:bitfield_flag<unsigned char, libtorrent::file_progress_flags_tag, void> flags=0)
```

Should be fixed in 2.0.5 release: https://github.com/arvidn/libtorrent/commit/3feba04e6d
2021-10-03 18:53:31 +01:00
9c3982d4ff [GTKUI] Fix piecesbar crashing when enabled
When enabled in preferences the piecesbar was crashing the application.

This was narrowed down to an issue with text_font property and there was a
suggestion that the PangoFontDescription should be freed after getting
the result from get_style_context.

Fixed by creating a copy of the PangoFontDescription

Refs:

 * https://trac.wxwidgets.org/ticket/15697#comment:1
2021-10-03 17:20:22 +01:00
88fc21e993 [Stats] Fix cairo error and failing tests
Fixed the Stats GTKUI test not updated to the new GTK3 dir layout.

Fixed pygobject cairo ImageSurface error:

    AttributeError: 'gi.repository.cairo' object has no attribute 'ImageSurface'

The documentation seems to suggest that using `import cairo` is the correct
usage and this fixed the issue, along with adding suggested gi.require_foreign
call.

References:

https://pygobject.readthedocs.io/en/latest/guide/cairo_integration.html
2021-10-03 14:22:11 +01:00
54674576db [UI] Remove num_blocks_cache_hits usage for stats
Removed in libtorrent v2: https://github.com/arvidn/libtorrent/commit/569d4
2021-10-03 14:19:40 +01:00
89189adb24 [Core] Stop using removed disk.num_blocks_cache_hits stat
Removed in libtorrent v2.0.0:
569d47c391
2021-10-03 14:19:17 +01:00
a5a7da4a1a [Core] Use external_address in external_ip alert handler
Unit tests are segfaulting and this is a result of a subsequent call to
pop_alert creating a dangling pointer to alert.message method.

Replace alert.message call with correct external_address property that
doesn't require any parsing and wonder trigger segfault to expired
pointer.

https://github.com/arvidn/libtorrent/issues/6437
2021-10-03 14:16:57 +01:00
1e6cc03946 [Lint] Fix spelling mistakes
A quick fix of some of the mistakes caught by codespell.
Updated readme with new IRC server

Useful to add it as part of linting checks.
2021-09-21 21:43:53 +01:00
d8526ba653 [UI] Add magnet icons for copy and add actions
Added new magnet icons with a consistent naming scheme
Run script to update all icons

Co-authored-by: Matias Wilkman <matias.wilkman@gmail.com>
2021-09-21 20:38:08 +01:00
c38f913948 [WebUI] Add menu option to copy magnet URI 2021-09-21 20:35:24 +01:00
0659fe4641 [Core] Export torrent get_magnet_uri method
Returns a generated magnet uri from torrent info
2021-09-21 20:27:38 +01:00
10501db63d [i18n] Update translation PO files from Launchpad 2021-09-14 22:02:56 +01:00
2a312159b9 [GTKUI] Fix unhandled error with empty clipboard
If the primary clipboard was empty the fallback resulted in an unhandled
error due to missing arguments.

Fixed by using SELECTION_PRIMARY as fallback clipboard
2021-09-14 21:56:03 +01:00
cb75192df4 [CI] Add core dump capture to GH job
Add further debugging to trace segfaults with lt 1.2
2021-09-10 19:06:21 +01:00
588f600ba2 [#3310|Core] Change logging invalid session status key to debug
Users were complaining about logs being flooded with `Session status key not valid`
which was a result of the Stats plugin using the wrong status keys.

Fixed by changing to debug log level since not useful in warning level
if spamming.
2021-08-29 16:07:53 +01:00
ea609cd3e0 [#3310|Stats] Fix constant session status key warnings
Fixed logs flooded with:

    [WARNING ][deluge.core.core              :655 ] Session status key not valid: num_connections
    [WARNING ][deluge.core.core              :655 ] Session status key not valid: dht_cache_nodes
2021-08-29 16:05:36 +01:00
4b6c7d01b2 [#3478|Core] Fix loading magnet with resume_data and no metadata
Since libtorrent 1.2.10 magnets save resume_data even with metadata not
yet downloaded. Unfortunately when using the deprecated
add_torrent_params key resume_data results in an error  "missing
info-hash from URI"

The problem is due to lt session requiring an info_hash in
add_torrent_params but resume_data does not set or override this key and
resume_data overrides the add_torrent_params.url with an empty string.

The workaround is to specify the info_hash in add_torrent_params. We
require sha1_hash object or bytes and use of bytearray to maintain
python2 compatability.

https://dev.deluge-torrent.org/ticket/3478
2021-08-29 15:58:48 +01:00
b89b2c45b1 [Console] Fix using windows-curses on Windows
The console tests are still failing on Windows due to an issue where the
sys args are not being correctly replaced in the tests so the pytest
args are being passed to console.
2021-08-01 08:48:27 +01:00
e38f1173cf [Notifications] Fix email KeyError with status name
Fix user reported error:

    Notification failure using email:
    [Failure instance: Traceback: <class 'KeyError'>: 'name'

This was due to using empty dict used with get_status where a list of
keys is now required or the all_keys parameter is used.

Fixes: #3303
2021-08-01 08:43:37 +01:00
e1e0999de6 [Tests] Fix skipping torrent test for libtorrent >= 1.2
Test is still failing with libtorrent 2 so also skip.
2021-08-01 08:35:17 +01:00
5c9378ac5e [Tests] Fix incorrent twisted defer import
With the release Twisted 21.7.0 there was an import error running the
tests due to defer incorrectly imported via twisted.internet.tasks module.
2021-07-31 22:08:23 +01:00
f075f391cb [CI] Add catchsegv to get a backtrace for segfaults
Encountering random libtorrent segfault with GitHub action so add
catchsegv when running tests to get more information.
2021-07-31 22:08:23 +01:00
8fb25f71f3 [Install] Update and fix python optional requirements
* Added required dependency setuptools to install_requires
* Remove optional dependency ipaddress from install_requires
* Created extras_require in setup.py. The optional dependencies should
not be included in install_requires so that users can either install
forked dependencies or remove problematic ones. Updated documentation to
detail how to install these optional dependencies.
* Fixed README badge

Refs:
 * https://dev.deluge-torrent.org/ticket/3470
 * https://dev.deluge-torrent.org/ticket/3282
 * https://dev.deluge-torrent.org/ticket/3353
2021-07-31 22:08:23 +01:00
a3332079db [GTKUI] Remove deprecated GTK attributes 2021-07-25 17:42:05 +01:00
0d6eec7a33 [i18n] Refactor loading libintl library
Handle different names for libintl library on MacOS and Windows with
fallback.
2021-07-25 16:47:14 +01:00
f16afc59ba Ignore TypeError with custom Twisted logging
The modification of Python logging _findCaller args in Python 3.8 raises
TypeError in our custom Twisted Logger with Twisted <= 19 versions.

The actual issue for the custom logger was fixed in 18.9 so added a
version check to avoid usage.

Refs:
 - https://twistedmatrix.com/trac/ticket/7927
 - 6b894744e4
2021-07-25 13:28:18 +01:00
e5388048a9 [CI/CD] Add github actions to replace Travis
Due to new limitations for open-source projects on Travis we are
switching to GitHub actions.

* Notes about system site-packages

We had many problems with accessing system python packages on Travis for
libtorrent and GTK and the problems are harder on Github since there is
no more access. For now copying the python libtorrent binary into the
deluge source is the workaround. There is a pip package that could be
used in future.

Fixed failing tests with libtorrent 1.2 which required a non-zero length
file in torrent and workarounds for async alert delay.
2021-07-25 13:27:26 +01:00
5374d237a7 [AutoAdd|3295] Correctly fix auto-adding magnets
Properly fix adding magnets, first attempted in previous commit 2e466101fc

add_torrent_magnet does not return a deferred so wrap in maybeDeferred.

Fixed broken test due to new deluge website icon
2021-07-24 11:25:25 +01:00
2e466101fc [AutoAdd] Fix magnet missing applied labels
The autoadd function does not apply labels to torrents that are added via magnet files.
Those magnet files are also renamed ".Magnet.Invalid".

Here are two threads discussing the issue, which still exists.

    https://forum.deluge-torrent.org/viewtopic.php?t=55539
    https://dev.deluge-torrent.org/ticket/3295

Here is what Deluged.log shows when the problem occurs:

21:51:38 [ERROR   ][deluge_autoadd.core           :333 ] Cannot Autoadd magnet: /Torrents/TorrentFiles/FileName.magnet: Torrent already in session (e1e0f33b656cb74532dcddc04f2ec52771ef1c26).
21:56:38 [ERROR   ][deluge_autoadd.core           :333 ] Cannot Autoadd magnet: /Torrents/TorrentFiles/FileName2.magnet: Torrent already in session (ef839d84d113cc35719b6fd616a4d8e220de7d32).

After looking at the code, what appears to be happening is the magnet link is added, but then a second scan of the folder occurs. Since the magnet file was never renamed, it will attempt to add it again, error out, then rename the file "magnet.invalid".

The only difference between the torrents working properly and magnets having the issue is the two lines I copy-pasted into the magnet IF statement. This should resolve the issue.
2021-04-17 17:24:58 +01:00
8676a0d2a0 [Core] Improve on_alert_tracker_error for lt >= 1.2
libtorrent 1.2 added endpoint struct to each tracker, to prevent false
updates we will need to verify that at least one endpoint to the errored
tracker is working.  if there is at least one working, it will not set
the tracker status to
error and set it to `Announce OK`. otherwise, it will use the error
message from the alert.

Refs: https://dev.deluge-torrent.org/ticket/3384
2021-04-17 16:55:54 +01:00
3ec23ad96b [#3388|WebUI] Fix md5sums in torrent files breaking file listing
Torrents containing md5sum optional hashes are not being decoded and so
causes errors in the json_api when the TorrentInfo is returned:

    Object of type bytes is not JSON serializable

Fixed by removing all optional hashes from the paths returned from
TorrentInfo and only including the required path keys. The optional
hashes are unused by Deluge so simplify by removing.

Fixed Windows path issue in TorrentInfo by ensuring conversion to posix paths.

Refs:

http://wiki.bitcomet.com/inside_bitcomet
http://wiki.depthstrike.com/index.php/P2P:Protocol:Specifications:Optional_Hashes
https://wiki.theory.org/index.php/BitTorrentSpecification
2021-03-24 10:26:08 +00:00
dcd3918f36 [WebUI] Add test for torrent files containing md5sums
Some torrent files built with py3createtorrent fail to produce a
file listing in the WebUI when uploading them.
This made it impossible to add such files.
Specifically this is caused by the additional metadata when using
py3createtorrent with the `--md5` flag.
2021-03-24 10:26:08 +00:00
08c7f1960f [CI/CD] Fix Tox SSL error in Windows Travis job
The tox sdist-make step failed with SSL: CERTIFICATE_VERIFY_FAILED so
fix by install certifi to ensure updated SSL certificates are available.
2021-03-24 10:25:30 +00:00
8a4ec493c0 [CI/CD] Add Travis windows build
* Added APPDATA to tox passenv so it is available to common module.
* Fixed windows path issue in httpdownloader tests
* Skipped torrentmanager test due to the following error from loading a
Linux pickled state file with a different line ending.
    ModuleNotFoundError: No module named 'deluge.core.torrentmanager\r'
* Removed appveyor build
2021-02-23 10:41:46 +00:00
4d970754a4 [#3440] Fix httpdownloader reencoding torrent file downloads
Torrent downloads from rutracker responds with the header:

    Content-Type: application/x-bittorrent; charset=Windows-1251

The problem is that httpdownloader was using the charset to re-encode
the downloaded file, corrupting the binary torrent file download.

Fixed by only re-encoding text content types, since it is very rare
that non-text content types would actually have a non-utf8 codeset and
if there is a requirement we would need to determine it on a type by
type basis.
2021-02-20 21:18:32 +00:00
f331b6c754 [GTKUI] Fix torrentdetails tab bar position not saving
The GTKUI tests were failing and the saved config for the tab bar
position was not being restored.

Fixed by moving the setting of notebook.tabs_pos to TorrentDetail init.

Replaced more deprecated methods that were showing up in tests.
2021-02-20 17:29:36 +00:00
1022448e4f [#3441|GTKUI] Add a torrentdetails tabs position menu
The tabs placement for the torrentdetails notebook might not be to
everyone's liking so add a menu item to configure it.

Default the position back to top.
2021-02-20 15:22:08 +00:00
291540b601 Hide pygame community banner in console
Notifications plugin uses pygame for sound notifications however pygame
show a console message "Hello from the pygame community." whenever
starting deluge from console.

Refs: https://stackoverflow.com/a/55769463/175584
2021-02-20 14:11:14 +00:00
092d07b68e [#3337|Core] Fix lt listen_interfaces not comma-separated
A typo meant that the interfaces supplied to libtorrent were not
comma-separated.

Refs: https://github.com/arvidn/libtorrent/blob/RC_1_1/include/libtorrent/string_util.hpp#L70
2021-02-06 17:26:30 +00:00
da5d5bee20 [#3325|Core] Fix unable to remove magnet with delete_copies enabled
Users were encountering the following error while attempting to delete
magnet torrents and had the config 'Delete copy of torrent file'
enabled. This was due to removing a magnet before the metadata was
downloaded and the torrent.filename was still set to None so raises
exceptions when string operations are performed with it.

  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 1317, in delete_torrentfile
    os.path.join(self.config['torrentfiles_location'], self.filename)
  ...
  TypeError: join() argument must be str or bytes, not 'NoneType'

Fixed by both setting a default empty string for self.filename and only
deleting the torrent file copy if filename is set.
2021-02-05 20:33:19 +00:00
6d9dc9bd42 [WebUI] Add country flag alt/title for accessibility
This allows viewing the country in textual form by hovering the flag
image and displays it if the image couldn't be loaded.
2021-01-29 18:49:24 +00:00
937afd921c [Tests] Fix console tests sometimes failing due to hard coded port
The tests in ConsoleUIWithDaemonBaseTestCase could fail to the hard coded
port 58900 being busy.
Fix by using the proper port found in self.listen_port

Also convert unnecessary use of assertTrue where more appropriate
assert functions should be used, such as assertEqual and assertIn
2021-01-29 18:46:42 +00:00
EFS
a4da8d29f8 [WebUI] Fix tracker icon download error
Encoutering an error when webui attempts to download tracker icon:

    Error occurred downloading file from "http://b'acg.rip'/": invalid
    hostname: b'acg.rip'

Fixed by ensuring the request.tracker_name is decoded from bytes before
looking up the icon name.
2021-01-29 18:31:52 +00:00
8ec5ca9d08 [Console] Fix setting 'Skip' priority on console
Selecting priorities 'Low' and 'Skip' on console will both set the
actual priority to 'Low'.

Fixed typo in previous commit 6655fe67c3
2021-01-29 18:26:35 +00:00
9c90136f57 [#3439] Execute plugin fails to run on Windows
Fixed TypeError: a bytes-like object is required, not 'str'
2021-01-29 18:17:35 +00:00
610a1bb313 [Lint] Update pre-commit hook and isort versions
* Fixed black hook requiring Py3.6 to installed locally. Will now assume
Py3.6+ in installed.
 * Added isort traceback in pre-commit flake8 hook fails
 * Updated versions of Black, Prettier and isort
 * Keep Flake8 at 3.7.9 due to E402 issue: https://gitlab.com/pycqa/flake8/-/issues/638
 * New pyproject config for isort v5 with fixes for Python 2 imports.
 * Fixed travis config to run Python 3.6 for lint run. Replaced the
virtualenv with_system_site_packages config with Travis specific Python
config value so lint run doesn't attempt to append with_system_site_packages
to Python 3.6 command.
2021-01-24 20:40:20 +00:00
23a48dd01c [#3309|GTK] Fix cmp function for None types
Comparisons on Python 3 are much stricter resulting in the following
error comparing with None:

    TypeError: '>' not supported between instances of 'NoneType' and 'str'

Fix this by getting the type of the other value and getting it's default
value.
2020-04-30 14:30:37 +01:00
d02fa72e80 [Console] Fix hostlist status lookup errors
If a host in hostlist failed DNS lookup or other issue it was returning
a tuple instead of deferred. Fix this in hostlist by returning a
defer.succeed.

A race condition with BaseMode was also encountered when
update_hosts_status calls update_select_host_popup and
ConnectionManager does not have a rows attribute. Fix this by init
BaseMode before update_hosts_status and remove already called
update_select_host_popup.
2020-04-27 16:24:33 +01:00
62d8749e74 [#3348] Fix TypeError adding peers to torrents
Python3 has stricter type checking and passing a port as string results
in libtorrent raising a TypeError.

Fixed by casting port to int, along with refactoring to ensure ipv6 is
correctly parsing and a useful error is output to user with invalid ip
or port details.

https://dev.deluge-torrent.org/ticket/3348
2020-04-25 13:16:04 +01:00
76f0bf2e04 Ctl+Q to quit Deluge GTK without killing daemon 2020-04-25 13:08:54 +01:00
635f6d970d [Config] Fix loading config with double-quotes in string
If a password or other string contained a double-quote then the config
would fail to be loaded on startup and reset.

This occurred due to fixing a similar issue with curly braces for #3079
in commit 33e9545cd4 and the checking for double-quotes had unforseen
consequences.

To resolve both these issues the code to check for json objects in
config files was simplified and utilises the json module raw_decode
method to ensure the extracted string indexes are json objects.
2020-04-25 10:49:08 +01:00
672e3c42a8 [Tests] Add pytest markers to tox.ini
Remove pytest warnings due to unknown markers
2020-04-23 17:19:37 +01:00
c1110e4ef3 [Tests] Fix tests failing when deluged fails to listen
Commit b32c5d824 changed the logged message in deluge/core/daemon_entry.py
when libtorrent fails to listen on the given port, without updating the
trigger expression in deluge/tests/common.py:start_core to match the new output.

Fix by updating the trigger match expressions to match the new log output
2020-04-23 17:19:37 +01:00
742c8a941a [Tests] Fix PytestDeprecationWarning from pytest
Accessing pytest.config is deprecated and produces:
PytestDeprecationWarning: the pytest.config global is deprecated. Please use
request.config or pytest_configure (if you're a pytest plugin) instead.

Fix by using a pytest.fixture
2020-04-23 17:19:37 +01:00
3427ae4b90 [GTK] Remove PyGIWarning in gtk3/files_tab.py
Remove warning: PyGIWarning: Gtk was imported without specifying a version first
2020-04-23 17:17:20 +01:00
034db27936 [GTK] Add more width to outgoing ports spinbuttons in network preferences
The spinbuttons would sometimes be truncated.
Fix by increasing the width
2020-04-23 17:17:20 +01:00
1e3c624613 [GTK] Destroy the dialog before running the callback
Currently, the dialog window is displayed until after the callback has returned.
The result is that if a new dialog is opened from the callback, the first dialog
is still displayed until the new dialog is destroyed.

Fix by destroying the dialog before running the callback.
2020-04-23 17:17:20 +01:00
3519f341d4 [GTK] Fix showing correct error on libtorrent import error
The exception string "No module named libtorrent" was changed to
"No module named 'libtorrent'" in python 3.3, which results in a
"unknown Import Error" message being displayed instead of the
message meant for libtorrent import error.

Change to raising LibtorrentImportError in _libtorrent.py and
catch this error to display libtorrent specific import errors.
2020-04-23 17:17:20 +01:00
d6c96d6291 Fix warning related to gettext 2020-04-23 17:14:24 +01:00
15c250e152 Fix template config.ui naming in create_plugin script. 2020-04-20 00:01:16 -07:00
eb57412601 [Tests] Fix tox, pytest and travis issues
* Error occurring with Pytest 5.4 so pin to below that version.
 * Fix minor issues with Travis config.
 * Use full command-switches for pytest in tox config.
 * Remove pin for pip as issue with pip-wheel-metadata was fixed in 19.3
 * Remove tox-venv as causing issues of incompatible packages installed.
   The latest versions of the virtualenv package should handle these
   duties.
2020-04-12 17:37:42 +01:00
2f1c008a26 [Console] Fix AttributeError setting config values
GitHub user JohnDoee reported that config settings are not decoded
correctly, this error can be reproduced with a command like

    deluge-console -c /config/ "config --set download_location /downloads"

    > AttributeError: 'str' object has no attribute 'decode'

The tokenize code was using 'string-escape' to decode strings but there
is no direct replacement in Python 3 but also unnecessary. However the
tokenize code is complex and buggy and not really suitable for the task
of evaluating config values.

A better alternative is to evaluate the config values using the json
decoder with some additional logic to allow for previous syntax usage,
such as parentheses.

Added a comprehensive set of tests to check for potential config values
passed in from command line.
2019-11-28 12:38:02 +00:00
5e06aee5c8 [Logging] Fix findCaller with unknown source
In case no source was found, a 3-tuple was returned instead of a 4-tuple
in Python 3
2019-11-19 17:44:48 +01:00
351664ec07 [Logging] Fix Python 3.8 compatibility
Deluge's logger class extends Python's `logging.Logger`. Since Python
3.8, it takes an additional argument `stacklevel`.
The implementation in Deluge does not support that. Work around the
problem by ignoring additional arguments.
2019-11-19 17:44:47 +01:00
5f1eada3ea [Tests] Skip buggy pytest 5.2.3
Plugins test fails due to:

https://github.com/pytest-dev/pytest/issues/6194
2019-11-15 20:55:22 +00:00
bde4e4443e [Lint] Fix Black and Flake8 issues
For a single element unpack black now also encloses with parentheses to
make it clearer: https://github.com/psf/black/issues/1108

Fix flake8 warnings
2019-11-13 15:44:46 +00:00
ed4bc5fa17 [Core] Fix potential "dictionary changed size during iteration" on shutdown 2019-11-12 15:40:38 +00:00
20afc31f3c [Docs] Fix changlog symlink and markdown issue 2019-11-12 15:37:12 +00:00
9232a52fd6 [Docs] Update dev environment instructions
I'm going through these instructions on a clean Ubuntu 19.04 VM

These are the changes I needed to make to get Deluge to build/run
2019-11-12 15:36:52 +00:00
23b3f144fc [#3298|Core] Fix pickle loading non-ascii state error
When trying to load a torrents.state from version 1.3 users were
encountering the following error:

    UnicodeDecodeError: 'ascii' codec can't decode byte

This was due to the way that Python 2 was pickling state with torrent
filenames that contained non-ascii characters and Python 3 was
unpickling the state using ascii encoding and failing. The fix is to
specify utf-8 encoding when loading torrents.state.
2019-11-12 15:21:56 +00:00
89d62eb509 [GTK] Remove orphaned code
Changes were made to sidebar theming in commit 5a6f202 and this code was
forgotten to be removed.
2019-10-31 10:56:08 +00:00
00176ee2cd [Docs] Typo corrections in testing.md 2019-10-31 10:04:30 +00:00
8737005b82 [GTK] Fix typo in preferences language label 2019-10-31 10:01:40 +00:00
d08c3f72e9 Fix privilege dropping when setting process ownership
`os.setgid()` should be called to set the GID, and it should be called
before `os.setuid()` to prevent reinstatement of privileges.
2019-10-31 09:57:33 +00:00
40ebdf3f39 [GTK] Add missing translation markup
Found some text needing marked for translation.
2019-10-31 09:40:59 +00:00
eeeb7fb69b [GTK] Fix Status tab download speed and uploaded
Previous work on the status tab caused these labels to not be in the
correct position so this commit swaps them back..
2019-10-31 09:38:37 +00:00
3f9ae33793 [Label] Fix Options/Add windows not reopening
When a user clicked ESC key or X button, the Options and Add windows
didn't open again. This happened because the windows were closed and
not hidden, which deleted the instance of those windows.

This fix changed the behavior of the close action to 'hide'.
2019-06-25 11:51:59 +01:00
0c7f53e305 [WebUI] Fix class-header for Deluge.EditTrackersWindow 2019-06-25 11:51:59 +01:00
63a4301a8b [Notifications] Fix unhandled TypeErrors on Python 3
- Notify requires GLib.Variant for set_hint
- Twisted defer.fail only accepts Exceptions.

Fixes: #3267
2019-06-25 10:44:51 +01:00
1b4ac88ce7 [Common] Fix creation of pidfile via command option
Python 3 raises a TypeError for binary file mode and writing text string.

Fixes: #3278
2019-06-25 10:39:49 +01:00
4b29436cd5 [Core] Fix for peer.client UnicodeDecodeError
Some users have been reporting unhandled UnicodeDecodeErrors and the
traces show it occuring in the call to `peer.client`. Although unable to
replicate it seems prudent to put a try..except around the call to
ensure it does not break the UIs.

Refs: https://github.com/arvidn/libtorrent/issues/3858

Closes: #3279
2019-06-24 16:34:15 +01:00
833b5a1f30 [Common] Fix show_file unhandled dbus error
If dbus org.freedesktop.FileManager1 service is missing then show_file
raised an unhandled exception. The service is not available on certain
desktop environments e.g. i3wm.

The solution is to fallback to xdg-open.

Fixes: #3272
2019-06-24 11:44:29 +01:00
24b094a04a [WebUI] Handle torrent add failures
Closes #2253.
2019-06-21 09:09:12 +03:00
3365201011 [Docs] Fixes for spelling
Running on Ubuntu Xenial results in spelling warnings so update wordlist.
2019-06-18 09:07:48 +01:00
c1ba403d4e [Docs] Add service how-tos 2019-06-18 09:07:48 +01:00
8b62e50eb8 [Docs] Add spellchecking with pyenchant
- Use sphinxcontrib.spelling with custom wordlist.
- Skip the checking of the modules documents as they raise
false-positives.
- Add a setup.py spellcheck_docs command.
- Fix spelling and other issues.
- Add a doc favicon.
2019-06-15 21:06:27 +01:00
5b315e90c5 [Docs] Cleanup updating plugin page 2019-06-15 21:01:04 +01:00
b711cd258a Release 2.0.3 2019-06-12 18:47:11 +01:00
e1c4069a72 [Gtk] Refactor presenting window
Include the correct usage for other display servers.

Still not sure how to get the proper timestamp for Wayland or Quartz but
I read that using 0 equals the GDK_CURRENT_TIME which suffices for now.
2019-06-12 16:57:48 +01:00
a2dee79439 [GTK] Improve detecting X11 display server
GdkX11 still imports on Wayland so check display server is X11 before
importing.
2019-06-12 16:05:15 +01:00
7a54db3179 [Docs] Fix typo and url for Windows install 2019-06-12 14:56:21 +01:00
03e7952d26 [GTK] Only import wnck on X11 display
Wnck is only supported on X11 and raises errors in Wayland so only load
it when X11 present.

Fixes: #3265
2019-06-12 10:21:23 +01:00
7ee8750be4 [GTK] Fix peers tab flag tooltip error
Hovering over a country flag resulted in an AttributeError.

This is due to get_tooltip_context now returning a bool value instead of
the tooltip object.

Fixes: #3219
2019-06-12 09:40:51 +01:00
f61001a15d [GTK] Fix missing argument for GtkMenu.popup()
Missed while converting from pygtk to Gtk3

Fixes: #3266
2019-06-12 09:40:14 +01:00
86ddadacf7 [Extractor] Fix startup error
On Python 3 need to create a copy of the dict to iterate

Fixes: #3264
2019-06-12 09:40:14 +01:00
632089940c [Web] Fix unable to change password
The hashlib update method requires bytes and raised a TypeError for salt
passed as text.

Added a test for auth change_password

Fixes: #3262
2019-06-11 20:14:11 +01:00
5d7db3e727 [Web] Change request.base path encoding to utf-8
A user reported a problem with setting base path resulting in this error:

    encoding with 'idna' codec failed (UnicodeError: label too long)

It is likely the base path is longer than 63 chars, which is unusual,
however the idna codec is for domain name not paths so switch to utf-8.

Fixes: #3261
2019-06-11 20:14:11 +01:00
4dd1f63b8b [Web] Fix TypeError with reverse proxy x-deluge-base header
The request header needs decoded otherwise string comparisons fail.

Fixes: #3260
2019-06-11 20:14:11 +01:00
fc134cdffb [Docs] Add more info to release notes 2019-06-11 20:14:11 +01:00
36cb4c5a4f [Docs] Updates to release checklist 2019-06-11 20:14:11 +01:00
676bdb26e0 [Docs] Remove incomplete Windows install instructions
The instructions are in-progress and missing steps so instead point to
the issue ticket for now.
2019-06-11 12:35:04 +01:00
dff778ceeb [i18n] Try loading intl.dll on Windows 2019-06-11 12:35:04 +01:00
bdadd2b515 Fix typo in install instructions for macOS 2019-06-11 12:35:04 +01:00
a34543100c [Web] Fix peers tab failing to set flag location
The request.country returns bytes not a string so decode.
2019-06-11 12:35:04 +01:00
b8b044f451 [lint] Fix pre-commit config key name 2019-06-10 14:24:47 +01:00
2d87cde887 Make a 2.0.2 release 2019-06-08 21:34:27 +01:00
212efc4f52 [Packaging] Move user out of systemd files and add to tarball
With the `deluge` user specified in the unit files it ties it to
that user and makes it unavailable for re-use by systemd user instance.

Remove the user and group from the unit files and put them in a separate
`user.conf` file that should be installed as an override file e.g. for
deluged.service this would be placed as follows:

    /etc/systemd/service/deluge.service.d/user.conf

Add the systemd files to the tarball for package maintainers.

Closes: #2034
2019-06-08 21:31:49 +01:00
879a397215 [Packaging] Add updated launchd scripts
Copy from Trac UserGuide and updated with proper naming and deluge-web
version.

The bin location is default for brew with pip install.

Closes: #3073
2019-06-08 21:31:49 +01:00
957cd5dd9c [Core] Fix SimpleNamespace on Python2 2019-06-08 21:31:49 +01:00
25087d3f2d [Docs] Add release notes and update pages 2019-06-08 16:42:25 +01:00
d24109f0a2 Update Changelog for 2.0.1 2019-06-07 20:27:02 +01:00
647baebcf0 [Docs] Update release checklist 2019-06-07 14:47:49 +01:00
98ce3cd385 [Packaging] Create tar.gz with sdist for PyPi
PyPi does not accept `tar.xz` source tarballs!
2019-06-07 14:47:02 +01:00
0c87d9bd7d [Packaging] Fix get_version with no git command
An unhandled FileNotFoundError was encounted if git command was not available.
2019-06-07 14:45:49 +01:00
aa35247e95 Back to dev 2019-06-06 17:27:49 +01:00
0dc4e18ac4 Updates for 2.0.0 release 2019-06-06 17:12:58 +01:00
d4185505d1 [Docs] Cleanup changelog and docs 2019-06-06 17:12:58 +01:00
04e58659fe Update translation files 2019-06-06 16:50:16 +01:00
5e738cf73a Simplify the get_version method
Use post segment instead of dev for non-dev tags.
Default to 'deluge-' and '.dev0' to simplify getting version.
Refactor to use subprocess.check_output
Use deluge.common.get_version as fallback in docs conf.
2019-06-06 11:30:45 +01:00
ce8595e8dd [Tests] Remove python2 from tox config 2019-06-06 11:30:45 +01:00
be74d96c6a [Core] Copy lt alerts to avoid segfaults
Changes in libtorrent 1.1 mean that alerts are no longer allowed to be
accessed after the next call to pop_alerts.

> It is safe to call pop_alerts from multiple different threads, as
long as the alerts themselves are not accessed once another thread
calls pop_alerts. Doing this requires manual synchronization between
the popping threads.

The solution is to copy the alert attributes and pass that to the
handlers.

Refs: https://github.com/arvidn/libtorrent/issues/2779
      #3159
2019-06-05 15:10:35 +01:00
4212bd6800 [Travis] Add unit test for libtorrent 1.2
Skip test_torrent_error_resume_original_state on libtorrent 1.2 as it
is failing for an unknown reason.

Refs: #3255
2019-06-05 15:09:40 +01:00
d40d40af31 [Core] Update to support libtorrent 1.2
Some changes between lt 1.1 and 1.2 require updates to core code.
 - Switch from proxy_type to proxy_type_t
 - Replace hardcoded flag value with add_torrent_params_flags_t since
   1.2 uses different flag values.
 - add_torrent_params requires flags set instead of dict values.

Refs: #3255
2019-06-05 15:09:00 +01:00
cbf9ee8978 fix blurry icons in gnome
Fixed blurry icon by changing "StartupWMClass" value from "Deluge" to "deluge" in "deluge.desktop".
2019-06-04 17:39:06 +01:00
7abeb4ee0f [packaging] sdist use xztar and exclude .mo files 2019-05-24 11:21:35 +01:00
bd4a3cba38 [Docs] Update install details and add more pages 2019-05-23 15:41:58 +01:00
3cfa39a2ad [macOS] Fix GTK windowing issues
On macOS the Quartz windowing is used instead of X11 so make ensure
that the X11 window calls are optional.

Also if gtkosx_application is not available then don't create osxapp.

It would be useful to find out how to pass window timestamps on Quartz.
2019-05-23 13:00:02 +01:00
a3b6d8d8e5 [Appveyor] Switch to Python 3.6
- Change build from Python 2.7 to 3.6 64-bit.
 - Specify py36 for tox since using py3 will choose latest py3 e.g. 3.7!
 - Use python 3.6 libtorrent.pyd build
 - Use pre-installed OpenSSL 1.1 (matches libtorrent build)
 - Add python version output to tox.ini for debugging.
2019-05-23 00:15:49 +01:00
7e3692bb5a [Docs] Fix missing path in RTD config 2019-05-22 18:01:05 +01:00
aa3a9a15cc [Docs] Update readthedocs config
- Add the missing package install so pkg_resources can find version.
2019-05-22 17:48:33 +01:00
0f92ea401f [Travis] Remove Python2 tests 2019-05-22 14:14:44 +01:00
260d55aeae [Travis] Fix getting version from git tags
Travis clones the git repo with a shallow depth and the git describe
command cannot find the version tag. Setting depth to 1000 should be
enough but can be increased if required.

Refs:
  https://docs.travis-ci.com/user/customizing-the-build/#git-clone-depth
  https://stackoverflow.com/a/51727114/175584
2019-05-22 12:12:54 +01:00
a9609a197d [Docs] Fix ReadTheDocs config path 2019-05-22 11:39:37 +01:00
a8fac1381b [Packaging] Cleanup README for Pypi
- Set a minimal Python version 3.5 and remove universal wheels.
- Tidy up the README
- Add Project URL for issues and docs.
2019-05-22 11:15:32 +01:00
65f6ede8b2 [Docs] Updates and fixes to build on Python 3
- Updates to the sphinx conf
  - Applied Mock fixes to build on Python 3.
  - Group patches at bottom of conf file.
  - Use just a major.minor for version.
  - Specify Sphinx 2.0 version requirement.
- Move requirements.txt to docs dir.
- Add readthedocs config
- Fix docstring code block rst formatting issue.
2019-05-21 15:23:45 +01:00
515dbcc5d9 Minor updates to log.py 2019-05-20 21:23:20 +01:00
827987fe7d [GTK] Fix drag and drop files in files_tab
Encoutered an error reordering files by dragging in the files tab:
   TypeError: can't pickle TreePath objects

The issue was get_selected_row  now returns a list of TreePath objects which
cannot be pickled. Also the set_text method only accept unicode text to
pickled bytes cannot be used.

The fix is to convert the TreePaths to strings and use json to encode
the list of strings for set_text.
2019-05-20 21:14:42 +01:00
1357ca7582 [i18n] Ignore non-translation dirs in get_languages
The `__pycache__` dir was showing up in list of available languages so
ensure only those directories with languages are returned.
2019-05-20 21:02:13 +01:00
72d363968e [Logging] Fix line numbers missing on Python 3
The findCaller method returns a 4-element tuple on Python 3 whereas it
was a 3-element tuple on Python 2.
2019-05-20 16:49:49 +01:00
c6b6902e9f [Core] Fix prefetch magnets missing trackers
When adding magnets that have been prefetched the tracker details were
lost. A result of returning only the lt.torrent_info.metadata which
does not contain full torrent details, such as trackers.

- Modified torrentmanager prefetch_metadata to return dict instead of
  base64 encoded bencoded metadata dict...
  - Used a namedtuple to ease identifying tuple contents.
  - Updated tests to reflect changes with mock trackers added to
    test_torrent.file.torrent.

- Refactor TorrentInfo to accept dict instead of bytes and add
  a class method to accept metadata dict with lists of trackers.
  - Rename class arg from metainfo to torrent_file, matching
    lt.torrent_info.
  - Rename metadata property to correct name; metainfo.
  - Simplify class variable naming with _filedata and _metainfo for
    torrent file contents encoded and decoded respectively.

- Update GTK Add torrent dialog to pass trackers to TorrentInfo.
2019-05-20 16:49:25 +01:00
6a5bb44d5b [Core] Write torrent file with full magnet metainfo
The use of torrent_info.metadata misses saves trackers and other torrent
metainfo fields so use lt.create_torrent generate method to create this
data.
2019-05-18 16:15:27 +01:00
cbcf8eb863 [GTK] Fix missing magnet trackers with Add dialog (non-prefetch)
When adding magnets (without prefetch) the trackers were missing.

The issue was that the magnet uri was being xml escaped twice so that
the ampersand was still escaped when passed to core and everything after
the magnet info_hash was ignored.

Also found unneeded call to core.add_torrent_files when only adding
magnets with core.add_torrent_magnet so check torrents_to_add before
calling.
2019-05-18 16:15:27 +01:00
09cfd9b89e [bencode] Fix unhandled TypeError with string
Passing a non-bencoded dict to bdecode resulted in an unhandled
TypeError.

- Catch TypeError in decode_func.
- Add bdecode tests.
- Replace KeyError and IndexError with base LookupError.
2019-05-18 16:15:27 +01:00
b961e11df6 [GTK] Fix handling failed magnet prefetching in Add dialog
If a torrent already exists when trying to prefetch magnet metadata the
exception is not handled and dialog does not update correctly.
2019-05-18 16:12:08 +01:00
2ca683e8fe [Daemon] Fix showing translation warning messages
Disable the warn_msg in daemon_entry since the argparse option are all
marked for translation and warnings are being output. The original
intent of this warn_msg was to identify anything in core code that was
incorrectly marked for translation.
2019-05-17 10:32:07 +01:00
fd20addead Raise Twisted minimum version to 17.1
The use of CertificateOptions with raiseMinimumTo requires this new
minimum version so update requirements and documents.
2019-05-17 10:08:48 +01:00
535b13b5f1 [Plugins] Convert plugins to deluge_ module prefix convention
This commit reverts namespace for the plugins and uses a module prefix
"deluge_" in it's place. The distribution package name remains the same
for now but will also be considered to use a prefix to help find the
third-party plugins e.g. Deluge-{Plugin} and the pluginmanager will
strip the prefix for displaying.

The change is a result of problems trying to package Deluge with
pyinstaller and the pkg_resources namespaces is not compatible.
Testing alternatives to using the pkgutil or PEP420 (native) namespaces
did not yield any joy either as importing eggs with namespaces does not
work. [1]

At this point importable eggs are considered deprecated but there is no
viable alternative yet. [2]

[1] https://github.com/pypa/packaging-problems/issues/212
[2] https://github.com/pypa/packaging-problems/issues/244
2019-05-15 19:20:08 +01:00
d6a0276a78 Update gitignore file
- pip install creates dist-info directories
- add __pycache__ for compelteness and other byte compiled file types.
2019-05-14 11:48:58 +01:00
9c0325b129 [Plugins] Remove stray unneeded init files 2019-05-13 18:55:35 +01:00
f885edd7fc [Console] Add move completed option to add torrent command
- Added a -m|--move-completed option for specifying a move completed
  path when adding a torrent.
- Re-used existing console test and renamed for generic usage.
- Moved setup_translation to tests.__init__ so it is always setup
  instead of relying on tests.common import.

Closes #2847

Co-authored-by: Calum Lind <calumlind+deluge@gmail.com>
2019-05-11 22:33:18 +01:00
2b171e58a3 [Web] Fix missing deregister_object
pluginbase has the complementary deregister_object but the actual
method was missing in JSON component.
2019-05-11 21:04:34 +01:00
d417c4b0f9 [Core] Refactor the base argparser and translation code.
- Move baseargparser out of deluge/ui since it is also used by the
  Daemon and could cause packaging issues if UI code is not available.
  - Renamed baseargparser to argparserbase to follow existing Deluge
    naming.
  - Renamed get_version to distinguish from deluge.common.get_version.
- Translation code is usable by more than just the UIs so also move it
  to Deluge namespace and re-use i18n directory and make it a package.
  - Renamed setup_translations to singular as it felt more correct.
  - Renamed set_dummy_trans to be more descriptive.

Closes: #3081
2019-05-11 20:40:20 +01:00
653f80eac8 [#3250|Console] Fix errors dispaying magnets with no files
Trying to display the files for magnet that has no metadata and thus no
files resulted in `'NoneType' object is not iterable` errors.

Only call file prio update method if we have a list of files.
2019-05-11 19:09:44 +01:00
76b89a7943 [#3250|Console] Fix unable to remove torrent
Trying to remove a torrent had no effect and resulted in the following
error: `'TorrentList' object has no attribute 'clear_marked'`

 * The clear_marked call needs to be made with torrentview instead.
 * Ensure the popup dialog is closed upon deleting the torrent.
2019-05-11 19:05:42 +01:00
6ff7a5400f Remove detox development requirement
As of tox 3.7, detox is no longer needed as tox added a native
parallel environment execution.
2019-05-09 12:02:59 +01:00
db021b9f41 [#3244|Web] Add support for accept-encoding header
* Use EncodingResourceWrapper to replace compress function so that the
proper checks for accept-encoding header are made.
* Ensure only text is compressed and images are left uncompressed.
2019-05-09 11:41:00 +01:00
ab4661f6fd [Packaging] Remove distro from setuptool requirements
The distro package is only available for Ubuntu 18.04 onwards so don't
require it as it will runtime error about missing module.
2019-05-09 09:20:29 +01:00
396cadefda [Tests] Fix console test fail on AppVeyor
Curses is not available on Windows so skip AppVeyor test that errors
with:

    E       NameError: global name 'curses' is not defined
2019-05-08 21:41:28 +01:00
2296906ed3 [Common] Replace platform.linux_distribution function
As of python 3.5, this function is marked as deprecated.
So, [distro][1] is the one we will use (this package is listed at the
example package in the python's [docs][2]).

[1] https://pypi.org/project/distro/
[2] https://docs.python.org/3/library/platform.html#platform.dist
2019-05-08 21:24:45 +01:00
1a134cab1b [#3248|Console] Fix not accepting input under Python3
On Python 3 the chr function returns unicode so trying to decode will
result in an error. Applied a workaround to assign without decoding.
2019-05-08 21:02:09 +01:00
7d67792493 [Lint] Update pre-commit linter versions
- Default to python3.
- Needed to add six to isort config.
2019-05-03 17:50:42 +01:00
3c18e890e8 [Tests] Fix AttributeError in test_core with Twisted 19
Should be setting header contents to string not ints and latest version
of Twisted raised an error encountering int. Also correct the header
name for setting length.
2019-05-03 15:35:32 +01:00
615500e6e6 [Plugins] Fix missing deregister for JSON 2019-05-03 14:57:30 +01:00
1425fe5413 [Tox] Pin pip version to fix PEP517 issues
* Using pyproject.toml for black config pip version 19.1 errors out
   about using editable install with pyproject.toml.
   Workaround is to not use pip 19.1 in tox.
 * Pin to 18.1 to avoid pip-wheel-metadata-folder creation

Ref:
 - https://github.com/pypa/pip/issues/6434
 - https://github.com/pypa/pip/issues/6213
2019-05-03 14:53:34 +01:00
84643fb6f7 [GTK] Remove running reactor in Gdk thread
The Gdk threading code is causing issue on Windows and this method
of moving the main loop to a thread has been deprecated and advised
against so removing without adding replacement as it currently
only creates one main thread and should still be fine.

If a blocking operation occures and needs solving, see the pygobject
guide for recommened way to use threads in Gtk:

https://pygobject.readthedocs.io/en/latest/guide/threading.html
2019-03-29 15:13:02 +00:00
c8b621172e [Lint] Fix flake8 3.7 warnings
- Fix new flake8 warnings from latest version.
  Note: The `addSlash` variable was orphaned with no reference in
        Twisted or Deluge code so removed.

- Update pre-commit config
  - New pinned versions.
  - Fix prettier output.
  - Use new flake8 hook config and add naming plugin.
2019-03-29 14:27:30 +00:00
02e07dda2a [Docs] Fix recommonmark monkey patch and pin version
The refactored patch did not work so revert it.

A new release of recommonmark breaks the docs build so pin it to working version.
2019-03-29 14:27:18 +00:00
b2e19561e6 [GTK] Fix file manager window popup behind Deluge
Added 'TIMESTAMP' key to startup-id string for dbus method. Unsure if
this is the correct way to specify startup id but it seems to work.

Recreate the dbus session with each call since if there is an error
with the dbus method then it will crash and subsequent calls will fail
with a cryptic message:

   dbus error the name was not provided by any .service files
2018-11-17 14:36:38 +00:00
389f4167b2 [i18n] Fix incorrect GB translation 2018-11-17 12:17:30 +00:00
63cc745f5b [Core|Py3] Fix fastresume data not being loaded
Decode the resume_data dict keys to fix lookups with torrent_id strings
not finding resume_data.
2018-11-17 12:12:55 +00:00
1a4ac93fbb [Lint] Bump prettier version to 1.15.2 2018-11-16 15:06:30 +00:00
582f60ea0b [Tests] Fix failing tracker_icons test
Disable the testing with seo.com as the site certificate has expired.

Ideally should not be testing against live sites and instead use request
replay tool such as VCR.py.
2018-11-16 15:06:30 +00:00
157f6ff62a [WebUI] Catch unhandled 'Bad host id' exception
The bad host id error usually occurs on webui when the 'default_daemon'
key in web.conf does not exist in hostlist.conf.

Added a errback method to output a more useful log message.
2018-11-16 15:06:30 +00:00
bf4244e8b2 [GTK] Fix adding non-ascii torrents and paths on Py2
Added decode_bytes to all widgets returning text to ensure unicode on
Python 2.
2018-11-16 15:06:30 +00:00
25cfd58792 [GTK] Refactor deluge.common usage 2018-11-16 15:06:30 +00:00
09d04aaac0 [Core] Fix showing incorrect file priorities
Removed previous workaround to ensure sync of file priorities with
libtorrent. This did not work when loading torrents as the status is
called before setting the file priorites and resets them to default.

Removed the call to set_file_priorities when writing the torrent file
to disk as it resets the options to default so although the torrent
file priorities do not change, the priorities for UIs is incorrect.
2018-11-16 15:06:30 +00:00
27b4e2d891 [Docs] Fix formatting of exported docstrings 2018-11-16 15:06:30 +00:00
043344b986 Modify the transfer protocol in a couple ways.
Replace the 'D' header with an unsigned byte that indicates the protocol version. This will allow easier changes to protocol in the future.
Replace the signed integer used for message length with an unsigned 32-bit integer. There is no need for a signed value here as a message length must always be positive. This also doubles the max message length.
2018-11-12 19:44:00 -08:00
3b8f71613b [Packaging] Fix deps for win32
- Fixed trying to install py2-ipaddress breaking on Python3.
- Add wheel universal option so Py2 and Py3 wheel built.
2018-11-12 10:10:41 +00:00
10fcbecc04 [Common] Fix win32 set env issue on Python 3
- On Python 3 find_msvcrt returns None and _wputenv should be used with
unicode strings.
- Removed the alternative msvcrt set env since `cdll.msvcrt` should suffice.
- Removed the broad exception catching.
2018-11-12 10:05:45 +00:00
ab7f19fbb8 [GTK] Fix no torrent selected on startup 2018-11-09 10:41:08 +00:00
b665a4a6f7 [#3211|Packaging] Fix missing tray icon
Fixed not including deluge-panel.png in the packaging install.
2018-11-09 10:40:03 +00:00
2c45e59900 Fix UnicodeDecodeErrors with files containing non-ascii chars
The main issue here is a user trying to start deluge and the XDG
`user-dirs.dirs` file contains dir names with non-ascii chars causing
a UnicodeDecodeError when comparing with unicode chars since Py2
default encoding is ascii.

The solution is to use io.open as used elsewhere in code with
encoding set to utf8. Applied to all usage of open in common.
2018-11-08 22:37:26 +00:00
89868cc944 [GTK] Fix needing bytes with hashlib on Py3 2018-11-07 15:52:26 +00:00
841cb889aa [Execute] Fix Glade layout and Py3 bytes issue 2018-11-07 15:52:26 +00:00
6b2f14e51e [GTK] Fix windows not showing topmost on desktop
When showing the main_window, Add dialog or file manager windows they
would not appear at the top of the display stack, always one below.

This is due to needing the windowing timestamp to be passed when making
these calls. The recommended Gtk solution to use present_with_time and
use an event.time timestamp. However, this does not always work so
instead used the lower level Gdk set_user_time and fetch timestamp from
X11 server.

Notes:
- Using int(time.time()) for timestamp is not correct as the
  windowing timestamp is different.
- Gtk.get_current_event_time only works when there is an event being
  processed.
- It might be useful for non-X11 windowing systems to store event
  timestamps so that we have a value to use instead of 0.
2018-11-07 15:52:26 +00:00
7e2192e875 [GTK] Fix showing sidebar and tabsbar
- Fixed the sidebar position not being restored by applying the config
  value in main_window first_show and updating config in position
  callback.
- Renamed the main_window vpaned and hpaned widgets to aid identifying
  purpose.
- Fixed filtertreeview KeyError when not conneted and hiding tabsbar.
- Fixed the tabsbar notebook not being hidden on restart by adding a
  new config value.
2018-11-07 15:52:26 +00:00
f11a42b9bf [GTK] Remove old builtin notification config values 2018-11-06 18:15:23 +00:00
845204178b [AutoAdd] Fix GTK3 AttributeErrors 2018-11-06 14:57:55 +00:00
d937a323fb [GTK] Replace all deprecated VBox and HBox
Use the recommended Gtk.Box.new() signature to match the GTK usage.
2018-11-06 14:57:55 +00:00
d7c48d27d8 [Label] Fix mnemonic labels
Remove the icons to simplify code since ImageMenuItem is deprecated.
2018-11-06 14:57:23 +00:00
1bc766213c Remove stray debug logging lines 2018-11-06 14:57:12 +00:00
775aef5f9b [WebUI] Fix creating icon on GTK3 prefs page 2018-11-06 11:38:21 +00:00
83cac4978a [GTK] Fix and cleanup storing window position 2018-11-06 11:19:00 +00:00
2bb9a8e71c [GTK] Fix tray preferences greyed out
When not connected the tray preferences should still be available.

There is no need to have the `is_connected` applied to widget
sensitivity here as that is set elsewhere in the code.
2018-11-06 11:16:20 +00:00
39783c7703 [GTK] Fix systray popup TypeError
An incorrect number of arguments supplied to GtkMenu.popup
2018-11-06 10:47:17 +00:00
9f9f564e62 [GTK] Fix unicode warnings on Python 2
GTK3 on Python 2 returns bytes so decode before comparisons.
2018-11-05 16:47:58 +00:00
ab1b2bcf14 [Exceute] Fix GTK3 pack_start missing paramters 2018-11-05 16:47:06 +00:00
bb0c61bb3f [GTK3] Replace deprecated set_data with attribute assignment 2018-11-05 08:38:54 +00:00
a7dcf39a32 [GTK3] Fix pathcombo getting folder name on wrong widget 2018-11-05 08:26:23 +00:00
e43796ae51 [GTK] Fix missing sidebar tracker icons
The filename for tracker_icons is an absolute path so check the
path before calling get_pixmap which is for relative ui/data paths.
2018-11-05 08:26:23 +00:00
6655fe67c3 [UI|Core] Fix problems with file priorities
- Fixed the core not correctly settings the current file_priority
settings and added a test.
- Fixed the console not setting file priorities.
- Change the label for not downloading of a file to 'Skip'.
2018-11-05 08:26:23 +00:00
2104b9831c [Core] Fix file_renamed alert returning method
Fixed a typo that resulted in the new_name method being emitted
instead of the string.
2018-11-02 09:00:42 +00:00
e7127637cf [Dependency] Remove bundled rencode 2018-11-02 08:47:57 +00:00
6233e5c844 [Blocklist] Fix detecting compression type on Py3
The magic number is in bytes so ensure bytes in COMPRESSION_TYPES
2018-11-02 08:47:57 +00:00
a01481b26f [Plugins] Update create script and add GTK3 how-to doc
- Updated create_plugin script to create a GTK3 plugin.
- Added a document for updating a 1.3 plugin to be compatible with
  2.0.
2018-11-02 08:47:57 +00:00
3d24998577 [Docs] Fix duplicate description warnings 2018-11-02 08:47:57 +00:00
f24e9d152c [Common] Remove oldest archive if too many exist
Prevents the archive folder bloating.
2018-11-02 08:47:57 +00:00
f47089ae7d [Core] Archive corrupt torrent.state on load
If the torrent.state was corrupted then loading would create a new
state with no backup to examine.

The solution is to use the archive function to save a copy of the
torrent.state.

Added a message argument to archive_files so that the error message
with a reason for archiving can be included in the tarball.
2018-11-02 08:47:57 +00:00
d70abd2986 [Plugins] Refactor plugin scan code
Simplify adding entries to the working_set.
Also fixes adding files rather than just dirs to working_set.
2018-11-02 08:47:57 +00:00
7d998a45f2 Shorten code to declare namespace
This is the recommened way of declaring namespace.

Also remove unneeded unicode_literals import.
2018-11-02 08:47:57 +00:00
3433a911cc [Plugins] Allow enabling any plugin Python version
Users encounter issues when trying to install plugins with differing
python versions. If the plugin was built with Py2.6 but they are using
Py2.7 the plugin would not load. With the move to Python 3 this could
become more of an issue. The workaround is to let the plugin manager
to try to load the deluge plugin regardless of the python version it
was built with.

This will put the onus on plugin author to keep the plugin code
compatible with more Python versions.
2018-11-02 08:47:57 +00:00
967606fa0f [Tests] Fix str/bytes issue on Python 3
- argparser does not accept bytes and raised an error with encoded vars.
2018-11-02 08:47:57 +00:00
97e7d95dd3 Cleanup tox configuration
There were issues with dependencies and tox environments under Python 3
so refactored the tox configuration to be more consistent and clearer.

- Moved travis to default to Python 3 for linting and tests.
- Fixed missing mock for cairo in sphinx config.
- Collated the base deps sections to improve readability.
- Added PYTEST_ADDOPTS env to override pytest verbosity in just tox
  tests as this was a common option being used.
- Renamed env 'testcoverage' to the more concise 'coverage' and moved
  html creation under single env as handy to have this output as well
  as report.
- Cleaned up the isort config for gtk3.
- Added `bad-continuation` to pylint config as conflcts with black
  formatting.
- Fix isort issue with bbfreeze script. This will likely be removed
  in future so just skip sorting it.
2018-11-02 08:47:57 +00:00
26c28445a5 [GTK3] Fix showing piecesbar 2018-11-02 08:45:40 +00:00
74a459274c [GTK3] Cleanup widget placement and spacing 2018-11-02 08:45:40 +00:00
bb6e290bf8 [GTK3] Fix UnicodeWarning in row comparison on Python 2 2018-11-02 08:45:40 +00:00
4a79e1f100 [GTK3] Save ui files with Glade 3.22
To ensure properties are updated this is a simple open and save with the
glade designer. Always a bit messy with the diff but should not
change functionality.
2018-11-02 08:45:40 +00:00
bff93bb162 [Appveyor] Remove PyGTK and disable win32 packaging 2018-11-02 08:45:40 +00:00
bffd091429 Update DEPENDS for GTK3 2018-11-02 08:45:40 +00:00
70d5931622 [GTK3] Fix column header right-click menu popup
The popup_at_pointer method is only available in GTK >=3.22 so for
compatibility restore using popup method.

Right-clicking on column headers popped-up torrent menu so only show
this menu when in torrentview.
2018-11-02 08:45:39 +00:00
ce49cde49d [GTK3] Fix cmp sorting on Python 3 2018-11-02 08:45:39 +00:00
a3bd2e547a [UI] Use Pillow for .ico icons
Pillow added the code in Win32IconImagePlugin to v2.1 (in 2013) so we can remove it.
Refactored the tracker_icons code to reflect this change.
2018-11-02 08:45:39 +00:00
64710ad226 [GTK3] Disconnect after editing host in connection manager 2018-11-02 08:45:39 +00:00
cd6bad0e35 [UI] Fix passing bytes config path to subprocess on Python 3
The % substitution was causing the bytes prefix to become part of the
string and created a `b'/` prefixed config directory. Ensure the config
arg is byte prefixed too.
2018-11-02 08:45:39 +00:00
1310645f55 [GTK3] Translate daemon status in connection manager
- Added a tooltip to show text status which also required translation
  so created a new liststore column for the translated text to ensure
  status is parsed correctly.
- Forced the status to lowercase to avoid translation issues and
  simplify comparisons.
2018-11-02 08:45:39 +00:00
e6a7119595 [GTK3] Replace stock icon and text usage 2018-11-02 08:45:39 +00:00
0b39b529dd [PY3] Fix tray password encoding issue
The tray password need to be in bytes but GTK on Py3 returns unicode.

Use decode_bytes and then encode to ensure Py2/3 compatibility.
2018-11-02 08:45:39 +00:00
1d0e40c66b fix move_completed sensitivity 2018-11-02 08:45:39 +00:00
bcc89c73dd [GTK3] Fix statusbar clicking issues 2018-11-02 08:45:39 +00:00
a6b47e18c9 Fix package_data namespace in setup.py 2018-11-02 08:45:39 +00:00
5183c92543 [GTK3] Migrate to AppIndicator3
Replace the old appindicator imports with AppIndicator3.

- Only few changes required due to Enum renaming.
- Updated the preference import to include require_version and set a bool.
- The password preference needs to be encoded for hashlib on Python3 but
also need to keep Python 2 support so attempt decode then encode.
2018-11-02 08:45:39 +00:00
7c1c3f62d1 [Tests] Ensure GTKUI tests are skipped upon import errors
Need to catch any issues with importing GTK modules to ensure
GTKUI tests are skipped in non-GTK environments.
2018-11-02 08:45:39 +00:00
729f062ea1 [GTK3] Fix RadioMenuItem group error
Fixes a difference from GTK2->3 where the group can no longer be passed
as a RadioMenuItem so use get_group method to set group.
2018-11-02 08:45:39 +00:00
d879ee06a3 [Notifications] Migrate to GTK3
- Switch from pynotify to gi libnotify binding.
  - Ideally would drop libnotify for [GNotification] but requires more
    work with the desktop file needing renamed to DNS format.
    e.g. `org.deluge-torrent.deluge`

[GNotification]: https://developer.gnome.org/GNotification/

Co-authored-by: Calum Lind calumlind+deluge@gmail.com
2018-11-02 08:45:39 +00:00
ed1b2a50fa [Scheduler] Migrate plugin code to GTK3
- Added new svg icons for cleaner look.
- Use widget get_allocated_width and get_allocated_height instead of window size.
- Tweaked margins to fix spacing issues.
- Removed yellow background from 'slow settings' and applied only to label.

Co-authored-by: Calum Lind <calumlind+deluge@gmail.com>
2018-11-02 08:45:39 +00:00
c51e01ac46 [GTK3] Migrate plugins to GTK3
Add a new Gtk3PluginBase to prevent problems with Gtk2 plugins.
2018-11-02 08:45:39 +00:00
4df5bd05ec [GTK3] Replace stock icons for named icons 2018-11-02 08:45:39 +00:00
cf4012bb60 [GTK3] Fix and remove FIXME comments
- Several of the FIXME comments seem to be outdated so removed.
- The status_icon comment was resolved by fixing the arguments supplied to
tray_menu.popup().
- The TreePath no longer returns a tuple so cast path to int.
- Fix an error with Pixbuf signature.
2018-11-02 08:45:39 +00:00
bbcebe1306 [Tests] Fix use get_iter_first for treestore 2018-11-02 08:45:39 +00:00
bcaaeac852 [GTK3] Use explicitly named functions for creating menuitems
See https://wiki.gnome.org/Projects/PyGObject/InitializerDeprecations
2018-11-02 08:45:39 +00:00
4111f94597 [GTK3] Fix GError required attr id for GtkTreeSelection 2018-11-02 08:45:39 +00:00
dd7cc31918 [GTK3] Fix catching Wnck not available 2018-11-02 08:45:39 +00:00
d8d094cab6 [Travis] Fix missing pygi gtk3 packages 2018-11-02 08:45:39 +00:00
dc6e93541b [Docs] Fix mocking external modules
With move to GTK3 needed to update the mocking of external modules.

There is a new autodoc option `autodoc_mock_imports` so use this instead
of the custom mock class.

There are some build warnings output using autodoc mock:

    TypeError: unsupported operand type(s) for |: '_MockObject' and '_MockObject'

Will resolve these later as the build passes.
2018-11-02 08:45:39 +00:00
f6ffb940ab [Tests] Update tests for GTK3 new paths 2018-11-02 08:45:39 +00:00
6fbb1bb370 [GTK3] Fix ui_entry tests for gtk3 2018-11-02 08:45:39 +00:00
8285b226eb [GTK3] Fix Python 3 issues
In Python 3 builtin next function instead of the next method.

Unpickling with translated strings in state file causes ascii decode
error so ensure UTF-8 encoding is specified.
2018-11-02 08:45:39 +00:00
194129c027 [GTK3] Fix create torrent dialog warning
The ui liststore had an extra blank value causing a GTK value type
warning.

Also set the default value displayed to be 128 KiB.
2018-11-02 08:45:39 +00:00
7d5a429466 [GTK3] Fix column lookup not i18n-ised 2018-11-02 08:45:39 +00:00
ac5db1b262 [GTK3] Fix gettext translation code
Add translation setup for Gtk.Builder ui files.

Refactor and cleanup up the translations_util:
- Remove old gtk.glade code.
- Add macos libintl support.
- Remove unneeded setup_translations parameters.
2018-11-02 08:45:39 +00:00
a2857a318d [GTK3] Remove unneeded code in path chooser
Not sure the reason for the added introspection code but originated in
GTK3 changes so remove as path chooser doesn't appear to need it.
2018-11-02 08:45:39 +00:00
13e1fa355d [GTK3] Fix path chooser warnings and errors 2018-11-02 08:45:39 +00:00
2e88fa1dfc [GTK3] Remove listview orphaned code
Not sure why/where this originated from but seems to serve no purpose so
removing it.
2018-11-02 08:45:39 +00:00
366b10f07b [GTK3] Fix displaying column popup menu
Right-clicking on column header resulted in this error:

    TypeError: could not convert type EventButton to GdkEvent required for parameter 0

The following fixes and cleans up the issue:
- Move the signal creation to the class, using the __gsignals__ dict.
- Replace `Event` with `object` since we are passing an EventButton as
Gtk3 no longer accepts it as an Event.
- Replace deprecated menu `popup()` with `popup_at_pointer()` which also
fixes a critical gdk error when using `popup()`.
2018-11-02 08:45:39 +00:00
92a048625a [GTK3] Fix the transient parent for PathChooser
The filechooser dialog was wrongly transient to the main window causing
weird behaviour, namely the main window moving but dialog remaining in
place when attempting to move the child dialog.

The solution is to pass the parent dialog to PathChooser so it can be
properly set the filechooser dialog transient property.

Fixed the Preferences dialog not being set to be modal to main window.
2018-11-02 08:45:39 +00:00
8199928160 [GTK3] Use a non-CSD filechooser dialog for PathChooser
My personal feeling is that GTK client-side decoration (CSD) putting
main dialog buttons in the titlebar is wrong so create a non-CSD dialog.

There was no simple way of changing GtkFileChooserDialog to play nice
with non-CSD buttons and resulting in these GTK warnings:
    Gtk-WARNING : Content added to the action area of a dialog using header bars

There is an unwanted dialog border with this custom filechooser dialog
with no apparent way to remove them. Would require switching to a
GtkWindow implementation.
2018-11-02 08:45:39 +00:00
545aca9a4c [GTK3] Fix piecesbar Pango methods
Fixes 'Context' object has no attribute 'create_layout'
Fix the gi cairo import warning
2018-11-02 08:45:39 +00:00
9f113eab23 [GTK3] Fix ImportError has no attribute message
Python 3 exception objects now use `msg` but casting with `str()` is
better.
2018-11-02 08:45:39 +00:00
bc6bc017cb [GTK3] Fix TextBuffer.get_text() arguments
This fixes an error that it takes exactly 4 arguments (3 given)
2018-11-02 08:45:39 +00:00
535fda90e3 [GTK3] Use core.pause_torrents with list of torrents
Use the new api method.
2018-11-02 08:45:39 +00:00
0ace086de4 [GTK3] Fix About 'MainWindow' object has no attribute 'get_window' 2018-11-02 08:45:39 +00:00
bbb1b44a23 [GTK3] Fix piecesbar window attribute error
Fixes the error: object has no attribute window
2018-11-02 08:45:39 +00:00
dfed17ac0d [GTK3] Fix import and attribute warnings
Fixes:
- warning import GConf
- Gtk is not defined
- 'ResponseType' has no attribute 'Yes'
- selection.data should be selection.get_data
2018-11-02 08:45:39 +00:00
2f879c33f3 [GTK3] Fix path_combo_chooser warnings
Fixes
 - Please remove the widget from its existing container first
 - object has no attribute 'height'
2018-11-02 08:45:39 +00:00
14b6ba10cf [GTK3] Use decode_bytes from method returns
Python3 PyGObject automatically encodes/decodes strings to and from
methods. This does not happen on Python 2 so for compatibility use
decode_bytes.
2018-11-02 08:45:39 +00:00
ae0b072b75 [GTK3] Fix config default_load_path keyerror 2018-11-02 08:45:39 +00:00
250afa6e0b [GTK3][OSX] Restore windowing lookup for quartz 2018-11-02 08:45:39 +00:00
b29b6fe69f [GTK3] Restore and update expand_row code 2018-11-02 08:45:39 +00:00
f160d6312f [GTK3] Fix piecesbar warnings
Fixes:
- get_style to get_style_context
- use str with gsignals
2018-11-02 08:45:39 +00:00
a8d01fd52f [GTK3] Fix GObject deprecation warnings
GObject.idle_add is deprecated using GLib.idle_add instead
GObject.timeout_add is deprecated using GLib.timeout_add instead
GObject.SIGNAL_RUN_LAST is deprecated; use GObject.SignalFlags.RUN_LAST instead
GObject.GError is deprecated; use GLib.GError instead
GObject.timeout_add is deprecated use GLib.timeout_add instead.
ListStore(str, str) using unicode_literals get_value return utf8.
2018-11-02 08:45:39 +00:00
3a5ec4f5f4 [GTK3] Fix Glade ui margins and spacing 2018-11-02 08:45:39 +00:00
eebb93d4ee [GTK3] Cleanup Glade UI deprecated widgets and properties
- VBox is Box(vertical);
- HBox is Box;
- HButtonBox is ButtonBox;
- HSeparator is Separator;
- VPaned is Paned(vertical);
- Table is Grid;
- use_action_appearance is purged;
- yalign is purged;
- xalign is purged;
- xoptions are purged;
- yoptions are purged;
- add some align: start;
2018-11-02 08:45:39 +00:00
01fafd4fe0 [GTK3] Change module structure from ui/gtkui to ui/gtk3
This moves the directory structure so that there is no conflict with the
old gtk2 UI. Also changes the conf and state files being loaded.
2018-11-02 08:45:39 +00:00
ca0db4d1a7 [GTK3] Save ui files with Glade 3 2018-11-02 08:45:39 +00:00
ea72164798 [GTK3] Large rename/modify code for GTK3 2018-11-02 08:45:39 +00:00
e2ba980299 [GTK3] Marked FIXME code changes for GTK3 2018-11-02 08:45:39 +00:00
98051bdea2 [Docs] Move apidoc command to Sphinx config
The apidoc modules were not being generated on ReadTheDocs because
there is no way to run sphinx-apidoc manually.

Moved the running of sphinx-apidoc into conf.py.

Added zope.interface minimum version to fix Readthedocs warning.
2018-11-02 00:21:50 +00:00
20431cc771 [Docs] Fix build errors getting Deluge version
The use of pkg_resource.require caused an unwanted requirements lookup
that errored out the sphinx build when no dependencies are installed.

This is fixed by switching to pkg_resources.get_distribution.

Also changed the tox docs env to not install Deluge as the setup.py
now contains install_requires which is unwanted.
2018-11-01 23:18:05 +00:00
82ecf8a416 [Docs] Reorganise and add sections from wiki
- Change the layout and contents of docs to be better organised and
  follow ideas from: https://www.divio.com/blog/documentation/
- Use markdown for non-technical documents to speed up writing.
- Added new sections and imported documents from Trac wiki.

Build fixes:

- Added a patch to fix recommonmark 0.4 and doc referencing:
    https://github.com/rtfd/recommonmark/issues/93
- Set docs build in tox to Py2.7 since there are problems with autodoc
  mocking multiple inheritance on Python 3 resulting in metaclass errors.
- Supressed warning about `modules.rst` not in the toctree by creating
  a static `modules.rst` with `:orphan:` file directive and add to git.
  Also skip creating this toc file with sphinx-apidoc in setup and tox.
- Simplified finding exported RPC and JSON API methods by adding an
  autodoc custom class directive. Removed unneeded __rpcapi.py.
2018-11-01 17:38:10 +00:00
9dcd90056d [Lint] Fix flake8 warnings
- Use six to silence flake8 undefined Python 2 names on Python 3.
- Fix W605 invalid escape sequence.
- Cleanup unused exception variables.
2018-10-25 15:14:19 +01:00
e2c7716ce2 [#1903|UI] Add super seeding option to interfaces
- Fix applying the setting to libtorrent, passing the value without
  modification so it decide when to enable it.
- Enable super_seeding option when adding torrents to core.
- Update UIs with option in tabs and add dialogs.
2018-10-25 15:14:07 +01:00
e6c61c3f8c [Core] Fix potential renaming unicode folders issue
- Found an issue while fixing `get_name` where `handle.rename_file`
  would raise a UnicodeDecodeError with non-ascii on Python 2. The
  fix is to catch this and pass unicode string to method instead.

- Add a test `test_rename_unicode` to verify no errors are generated.
- Updated test to use core.session instead of creating another one.
2018-10-22 21:58:06 +01:00
b834e33568 [#3204|Core] Fix unicode get_name unicode error
The recent change to torrent.get_name does not handle non-ascii paths
on Python 2.

- Add a decode_bytes to resolve the issue.
- Add tests.
- Refactor to reduce nesting.
2018-10-22 21:58:05 +01:00
9ab2a50097 [Console] Refactor single letter variables
- Replace usage of `s` for variable names to make it easier to read the code.
- Remove unneeded and unused encoding parameter from parse_color_string
  It should not be encoded by this function, only on output.
2018-10-22 16:05:55 +01:00
1838403e3b [#3199|Console] Fix UnicodeEncodeError in addstr
The following error was encountered by user:

   ...deluge/ui/console/modes/basemode.py, line 290, in add_string
       screen.addstr(row, col, string, color)
   UnicodeEncodeError: 'ascii' codec can't encode character...

The `add_str` method is defaulting to using the Python 2 ascii
encoding with a unicode string so use the encoding passed to the
function.
2018-10-22 16:00:12 +01:00
9e7c9fc1d3 [AutoAdd] Fix packaging autoadd_options data files
There was a warning about missing javascript file in the package and
found the `data/autoadd_options` subdir was not being included.

Bump version
2018-10-21 16:05:01 +01:00
9264cb749e [WebUI][#2009] Add About window
- Add an About window to see version details like GTKUI.
- The author and license text were left out as unnecessary.
- Added a daemon get_version method since daemon version was not
  available through the json-api.
- Fix LookupResource to ensure path exists when rendering.
2018-10-21 15:43:29 +01:00
c01679de1f [Config] Prevent symlinked config files being overwritten
If a user keeps the deluge config file under source control and symlinks
to the config files in deluge config dir then when deluge saves config
files it will replace the symlink with actual file.

Using realpath will resolve these symlinks and file will be updated in
the correct location.

Use a temporary file for new config new before moving it to the
resolved location.

Co-authored-by: Calum Lind <calumlind+deluge@gmail.com>
2018-10-21 14:08:30 +01:00
3645feb486 [GTK] Fixup translation strings
- Use named placeholders to allow translators to change text order.
- Refactor fpcnt to use format() and markup strings properly.

- Remove gettext.js creatation from generate_pot script since this step
  is now always done at build-time.
2018-10-21 13:51:30 +01:00
d85f665091 Fix large ETA overflow C int
The following error was encountered in GTK3 which is a result of trying
to cast a very large ETA value to C int and raising an Overlflow error.

   <type 'exceptions.OverflowError'>: 3072227291 not in range -2147483648 to 2147483647

The solution is to limit the ETA to 1 year and represent any values over
that as -1 which the UIs can display as infinity.
2018-10-19 17:30:27 +01:00
5ec6ae3ad0 [Packaging] Minimal requirements for test_requires in setup.py
Remove extra_requires since requirements-*.txt files provides these now
plus the extras_requires is for extras at installation time which does
not apply to docs or dev.

For test_requires include the minimal requirements for pytest to run.
This is not the same as the longer tox test requirements that include
linting, docs etcs.

Fix license field.
2018-10-19 14:14:03 +01:00
860730d43c [Packaging] Update make_release script for Py3
xz compression is included in Python 3 so simplify script.
2018-10-19 14:14:03 +01:00
c1ddcf6012 [Packaging] Add install_requires to setup.py
- Add an install_requires list to allow dependencies to be automatically
  installed via setuptools or pip installation.
- Needed a workaround for twisted service_identity install.
2018-10-19 14:14:03 +01:00
85bbdfe143 [Packaging] Cleanup dependencies
- Tweaked the layout a bit with optional part of dependency description.
- Updated descriptions to help understand dependency usage.
- Made intltool and chardet packages optional. This will help with
  installation where these might be missing and are not crucial.
- Remove gettext from dependency as is part of Python.
2018-10-19 14:14:03 +01:00
9f9827ca58 [Packaging] Fix appdata.xml details
- License should be GPL3+.
- Use the Deluge HTTPS URLs.
- Wrap the description long lines.
- Add launchable tag to launch from software centre after install.
- Removed name tag to use .desktop file name field instead.
2018-10-19 14:14:03 +01:00
dcb3dad435 [Core] Fix renaming folder not updating torrent name
The new get_name method needs to function as it did in 1.3-stable so
when renaming a torrent file or top-level folder update torrent name
to reflect that. If UI supports renaming the torrent then the options
value with be used instead.
2018-10-19 14:02:36 +01:00
0e69b9199c [GTK] Fix toggling auto_managed in Options tab
The refactoring of the options code didn't update to use the new status
key `auto_managed` and `is_auto_managed` is not a valid torrent option.

Related: 1637da84e4
2018-10-19 14:02:22 +01:00
88a3600ce3 Fix sdist missing test files
The exclude 'deluge.tests' in setup.py is for excluding from package
installation but we want the files when distributing as source so
include the entire deluge/tests dir (excluding .pyc files).
2018-10-16 14:59:00 +01:00
91164d8dbf Cleanup and use markdown for source text files
Use markdown to aid readability.

Update the README and use it for the long_description in setup.py
Add detailed requirement information to the DEPENDS files.
2018-10-16 14:59:00 +01:00
ec47720686 [WebUI] Enable debug URL parameter to parse false values
When installed as a development version there was no way to load the
normal js scripts so improve the debug arg handling by parsing for false
values to force use of normal type scripts. Since debug arg overrides dev,
leave dev as is.
2018-10-16 11:52:04 +01:00
467ade1eb7 [WebUI] Fix closure minified size increase
All of the non-standard docstring file headers were being added to
minified files, increasing the file size. Replace with jsdoc `/**`.

Remove ext-extensions from git as will be generated by minify script.
2018-10-16 11:38:13 +01:00
bb93a06fff [WebUI] Fix prettier javascript issue
Prettier removed too many parentheses in asIPAdress and when minifying
the plus unary combined with the plus operator to create an incorrect
increment operator. So skip prettier formatting this secion of code.

Also fix an ECMA5 warning from closure about function scope in FilesTab.
2018-10-16 11:37:11 +01:00
80178f7310 Update javascript minifying script
- When both minifying modules are missing, creating a copy of the debug
  file is not actually desirable, a missing file is more obvious than a copy.
  WebUI can handle a missing 'normal' script and fallback to 'debug' script so
  modified script to skip and warn instead.
2018-10-16 11:34:55 +01:00
ee354eb107 [WebUI] Keep debug js in packaging and fix script lookup
Packaging:

- Decided that the debug files are useful for end-user so keep them in
  package installation. For debug script_type to be usable all debug
  file need to be avaialble so extjs debug files also included.

Script type selection:

- Fixed dev and debug request args to be properly decoded on Python 3,
  otherwise comparison would fail and allowed any case for values.

- Modified the choosing of the script type to pick debug if specified
  as previously always choosing dev type if dev version was True. A rare
  scenario but useful but now debug is used if specified otherwise use dev.

- Changed the order when looking for alternative script types to start
  with dev so that if debug is specified but missing it uses a similar
  script type as previously would fallback to normal which is likely
  undesired.
2018-10-16 11:29:41 +01:00
7d896599b8 [GTK] Fix speed appearing in blanks cells
In TorrentView and PeersTabView, when moving the mouse pointer through
rows, the value in download and upload speed columns can be overwritten
by value from previous row cell.

The solution is to disable return by cached condition in function
cell_data_speed.

Discussion: https://github.com/deluge-torrent/deluge/pull/200#issuecomment-424907571

Removed debugging code.

Co-authored-by: Calum Lind <calumlind+deluge@gmail.com>
2018-10-14 10:52:08 +01:00
55aee2b00f [Common] Fix incorrect path in TorrentInfo
Refactoring for Python 3 did not account for the `self._files` using an
updated info_dict so simplify code by updating in the files for loop.

Added test that TorrentInfo.files returns the correct structure.
2018-10-14 10:51:08 +01:00
10d39c83cb [WebUI] Fix error escaping translated text
In a previous commit d4023e7dde removed a decode for Python 3 but
with translated text returned by gettext encoded on Python 2 the
escape function would raise a UnicodeDecodeError trying to use ascii
to decode.

The fix is to decode the message returned by gettext on Python 2.
2018-10-13 22:57:28 +01:00
0b2cb7539f Cleanup Tox and CI configs
- Use the apt addon for installing libtorrent package.
- Start the py3 test sooner as it is slow to complete.
- Add if conditions for gtkui test dependencies.
- Remove Appveyor tests that are taken care of by Travis.
2018-10-10 18:50:41 +01:00
6fdbf0ba5d Update tox and CI for Python 3 2018-10-10 17:57:02 +01:00
a980f8e959 [WebUI] Allow multiple torrent uploads in Add dialog
Add a new `multiple` field to FileUploadField to allow selecting
multiple files. Include a fallback for if browser does not support
multiple file selection.

Update Add window to upload and parse multiple torrent files at once.
2018-10-10 17:57:02 +01:00
c90cf301df [WebUI] Use application/json in header 2018-10-10 17:57:02 +01:00
6f06cd5ebc [WebUI|Py3] Refactor content_type check
Simplify getting content_type from request to prevent str/bytes mixup.
2018-10-10 17:57:02 +01:00
86de5657ff [WebUI|Py3] Fix and refactor torrent upload 2018-10-10 17:57:02 +01:00
4a335eeb61 [Tests] json loads Python 3.5 compatible
json.loads in Python 3.6 accepts str or bytes but Python 3.5 is str
only so decode.
2018-10-10 14:41:10 +01:00
86d582d52a Remove debugging log line 2018-10-10 14:41:10 +01:00
673b6653a3 [Py3] Fix TorrentInfo info_dict decoding 2018-10-10 14:41:10 +01:00
41732fe38b [WebUI|Tests] Fix json_api tests for Python3 2018-10-10 14:41:10 +01:00
5964bcf897 [Tests|Py3] Fix prefetch metdata test 2018-10-10 14:41:10 +01:00
3ed4a6e834 [WebUI] Fixes for login auth on Python 3
Remove obsolete password check code.
2018-10-10 14:41:10 +01:00
20fa106b8b Update pre-commit config
The prettier hook was missing a trailing slash so omitting css files.

Add a trailing space fix hook and fix issues.
2018-10-08 14:49:36 +01:00
654e2af4e5 [WebUI] Fix browser Flash plugin warning
Do not perform flash player version detection using the fix from here:
  https://github.com/georchestra/georchestra/issues/902
2018-10-08 14:47:27 +01:00
d5dea44689 [WebUI] Update extjs to 3.4.1.1
Better late than never...

http://cdn.sencha.com/ext/commercial/3.4.1.1/release-notes.html
2018-10-08 14:47:27 +01:00
5743382c65 Remove Pipfile and pipenv
For now using requirements files and tox to setup a dev env so to
prevent confusion or stagnation of Pipfile remove it and pipenv
documentation.
2018-10-08 12:21:00 +01:00
39f37e6133 [Tests] Remove slimit dependency
The changes to the minify script mean we no longer require slimit.
2018-10-08 12:19:03 +01:00
0ed3554f95 [WebUI] Copy non-minified JS file if slimit missing
This will remove the setup dependency in "slimit" package.
In case "slimit" is missing, the non-minified JS files will be copied
as is to the build.
"slimit" is marked as a dependency for development process only.
2018-10-08 12:13:21 +01:00
ba6af99b05 [Notifications] Set notification desktop entry hint
Due to Gnome Guidelines https://wiki.gnome.org/Initiatives/GnomeGoals/NotificationSource
2018-10-08 12:11:07 +01:00
9e29fe4111 [Tests] Lint with pre-commit
- Add lint section to tox.
- Replace flake8 with lint on Travis and remove commented out sections.
- Remove flake8 from appveyor to reduce sequential testing time.
2018-10-05 18:45:37 +01:00
a8a4fb69c0 [Lint] Exclude js and css from EOF fixer
- When running pre-commit on all files it is picking up minified js and
  css files. Since prettier will format correctly the source files ignore
  them in end-of-file fixer.
- The template files in web docs can be ignored too.
- Removed the unneeded `pre-commit-hooks` dependency as pre-commit
  resolves that itself.
- Include files fixed by pre-commit.
2018-10-05 18:45:37 +01:00
6cf13d112b [Tests] Remove debug traceback 2018-10-05 13:23:45 +01:00
6973f96f8c [Tests] Update tox and CI configs
- Add new requirements files to make it easier to install deps.

- Tox changes
  - Update tox to use new requirements files.
  - Tweak heading styles.
  - Add development environment command `devenv`.
  - Remove testenv command as it would run on devenv creation.

- Travis changes
  - Now uses xenial as trusty is very old now.
  - Trial run disabled to speed up tests.
  - Add tox-venv for Python 3 support.
  - Only install testssl if running security tests.

- Appveyor
  - Add tox-venv for Python 3 support.
  - Use requirements file for non-tox.
  - Remove trial run to speed up testing.
2018-10-05 13:23:45 +01:00
0548bdb655 [Lint] Add pre-commit config
- Added a pre-commit config for code linting and formatting. It will
  auto-format python, javascript, CSS, YAML and markdown files to save
  manually doing so. To install:

      pip install pre-commit
      pre-commit install

- Added a default virtual environment directory to gitignore.
2018-10-05 09:45:42 +01:00
36606fc448 [Docs] Add markdown support
- Use recommonmark to enable use of markdown files in docs.
- Fix theme not specified
- Remove unused spelling module.
- Cleanup mocking modules in conf so building docs requires only Sphinx.
- Simplify tox section, including use of requirements-docs file. Added
  slimit dependency for sdist-ing deluge package.
2018-10-04 15:53:42 +01:00
c415b097fe Cleanup outgoing_interface code and help text
- Remove is_ip check as libtorrent does accept IP address for this setting.
  See: https://github.com/arvidn/libtorrent/issues/3087
- Use consistent wording for help text.
2018-10-04 10:51:20 +01:00
970fad7557 [GTK] Fix column name missing translation markup
With non-English languages this lookup would fail without gettext
translation of the column name.

A better solution is to not use the translatable column title as an
index but this is a quick fix for now.
2018-10-04 10:39:48 +01:00
358ff74d0e [Lint] Format files with Prettier
Use Prettier to auto-format javascript, CSS and YAML files so that less
manual work is involved and style is consistent across project.
2018-10-03 18:16:09 +01:00
b1cdc32f73 [Lint] Use Black to auto-format code
The move to using auto-formatter makes it easier to read, submit and
speeds up development time. https://github.com/ambv/black/

Although I would prefer 79 chars, the default line length of 88 chars
used by black suffices. The flake8 line length remains at 120 chars
since black does not touch comments or docstrings and this will require
another round of fixes.

The only black setting that is not standard is the use of double-quotes
for strings so disabled any formatting of these. Note however that
flake8 will still flag usage of double-quotes. I may change my mind on
double vs single quotes but for now leave them.

A new pyproject.toml file has been created for black configuration.
2018-10-03 15:21:53 +01:00
bcca07443c [Common] Fix config missing value assignment 2018-09-30 14:58:11 +01:00
67d9c2efb4 [Core] Fix saving listen_interface as None
A mistake in refactoring meant that listen_interface was reset to None
on shutdown.
2018-09-30 14:58:03 +01:00
34b0fdff1d [Core] Retain magnet details when loading state
It is useful to keep the magnet uri even with the torrent_info. When
adding the torrent magnet details are only used if torrent_info is not
available.
2018-09-28 15:01:34 +01:00
f93e5e60b5 [Core] Refactor session status code
Simplify the methods by initialising the session_status dict using
libtorrent session_stats_metrics and rate keys.

Instead of first looking for deprecated keys use exception then lookup.

Added a few more tests.
2018-09-28 15:01:34 +01:00
d8b1e2701c [#3080] Fix torrent reappearing on restart
If a magnet is added to new Deluge state, then deleted, it will reappear
on restart.

The problem results from torrents requiring both state and torrent file
but magnet only rely on the state file and the save_state code not
saving if the torrent list is empty. So torrents won't be loaded as
their torrent files have been deleted but magnets details remain in
state file and are loaded again on restart.

The fix is to always save the state file even if the state is empty.
2018-09-27 10:56:58 +01:00
abf4c345f0 [#2398|GTK] Update prefetching magnet metadata in AddTorrent dialog
The new code automatically attemps to fetch magnet file details from
core while displaying a 'waiting' message.
2018-09-26 14:18:52 +01:00
a09334e116 [GTK] Refactor AddTorrent dialog update config scoping
- Fix a potential scoping issue with callback function by moving to
class method and adding requried parameters.
- Remove unneeded return statements and variable.
2018-09-26 14:18:52 +01:00
57ad9a25da [GTK] Fix AddTorrent dialog title count
Use the treemodel signals to keep the torrent count in the dialog
title correct.
2018-09-26 14:18:52 +01:00
5a2990ff90 [Core] Handle already prefetching magnet metadata 2018-09-26 14:18:52 +01:00
759a618f74 [Core] Tweaks to prefetch metadata method
- Disable the magnet from being auto_managed so it starts immediately.
- Reduce the default timeout to 30secs.
- Use the generic tempfile dir.
- Move callback method to be class method
2018-09-26 14:18:52 +01:00
23f1cfc926 [Core] Assign magnet arg if magnet URI in filename
A magnet that prefetched the metadata is added as a normal torrent but
with the filename set to the magnet URI. So we need to assign the URI to
magnet arg and set filename to None before creating Torrent object.

Updated the is_magnet function to prevent AttributeError with None type.
2018-09-26 14:18:52 +01:00
57ea5ef5da [GTK] Set default file priority to 4 in add dialog 2018-09-26 14:18:52 +01:00
944dc1659f [Core] Fix UI file priorities out-of-sync with libtorrent
The file priorities were not updating correctly in the UI and it was
found that in lt 1.1 file priorities are now updated asynchonously so we
cannot get the values immediately. So only update the options
file_priorities if they are empty.
2018-09-26 14:18:52 +01:00
2dc157578e [GTK] Refactor torrent_liststore appending in AddTorrentDialog
The add_from_torrent and add_from_magnet shared common code so refactor
into methods for reuse.
2018-09-26 11:08:30 +01:00
8a59216061 [#2398|GTKUI] Fetch magnet files details in Add Dialog 2018-09-26 11:08:30 +01:00
cc1807cf97 Fix travis docs failing with Sphinx 1.8.0
Sphinx pinned to 1.7

See sphinx-doc/sphinx#5417
2018-09-14 16:09:20 +01:00
63b7f6d382 [Tests] Add pytest-twisted to tox deps 2018-09-14 16:06:06 +01:00
5c4cbf58c5 [Tests] Fix UnicodeWarning for gzipped file comparison 2018-09-14 16:06:06 +01:00
5959a24d4c [Lint] Flake8 cleanup 2018-09-14 16:06:06 +01:00
d4023e7dde [Py2to3] More fixes for web ui 2018-09-14 16:06:06 +01:00
0fd3c25684 [Py2to3] Fixes to display Web UI 2018-09-14 16:06:06 +01:00
4125e35ebd [Py2to3] Fix test_tranfer strings should be bytes 2018-09-14 16:06:06 +01:00
18d448d4a5 [Py2to3] Ensure httpdownloader saves data as UTF-8
Python 3 raised a decoding error with the google page which appears to be
encoded with 'latin-1', so extract the content charset to decode and
re-encode in 'utf-8'.
2018-09-14 16:06:06 +01:00
d5133f789a [Py2to3] Fix opening torrent files in byte mode 2018-09-14 16:06:06 +01:00
1cce6a297c [Py2to3] Further maketorrent fixes 2018-09-14 16:06:06 +01:00
ad20ec62f2 [Py2to3] Fix TorrentInfo metainfo dict key lookups 2018-09-14 16:06:06 +01:00
af2bed8a0f [Py2to3] Fix tests for maketorrent and metafile 2018-09-14 16:06:06 +01:00
b93e868048 [Py2to3] Fix ui_entry default indicator 2018-09-14 16:06:06 +01:00
8d90ae5ffb [Console] Fix cmdline output and tests 2018-09-14 16:06:06 +01:00
ae4449642c [Py2to3] Fix log.warn deprecation warning 2018-09-14 16:06:06 +01:00
bc2f4a30eb [Py2to3] Fix putChild requires bytes 2018-09-14 16:06:06 +01:00
dc8766874e [Tests] Fix testing core.add_torrent_url on Py3 2018-09-14 16:06:06 +01:00
a33171732d Upgrade Pipfile lock for twisted
Due to a security warning for cryptography update twisted and deps.
2018-09-14 10:54:22 +01:00
b9a9e06c1d [WebUI][Daemon] Enhance TLS Security
This applies the following for both WebUI and Daemon:
1. Raised minimal TLS version to TLSv1.2
2. Added specific cipher suite list
3. Added support for ECDSA auth keys
4. Added support for ECDHE key exchange algorithm

We disabled the ability to perform TLS/SSL renegotiation and therefore
will prevent the clients from renegotiating, which can be exploit for
DoS attacks.

New security tests now will be skipped when running `pydef` and `trial`
testenvs. To run the test, use the testenv `security` or add the environment
variable `SECURITY_TESTS` before running the tests. Also should only run when
adding to the commit message the string `SECURITY_TEST`.
2018-09-06 19:14:13 +01:00
456e720b75 [WebUI] Constrain large icons to fit sidebar properly
Add CSS background position and size for sidebar icons.

Without this change tracker icons that are too big, render as too big.
This restrains them to fit into the sidebar list item.
2018-09-06 18:57:28 +01:00
ae9bbdbae7 [Core] Add tests for pausing and resuming torrents 2018-08-10 17:48:53 +01:00
585ea88f1f [Core] Fix torrent pause/resume logic
If the torrent_id argument received in the pause or resume methods is not a string, the methods execute with the un-parsed input and then with parsed input on a second call. A key error exception is thrown from the first call, and the second call succeeds.
2018-08-10 17:09:50 +01:00
f94f58918e [Core] Remove libtorrent deprecated resolve_countries
Libtorrent 1.1 no longer supports this so remove it.
2018-08-10 09:56:38 +01:00
3fc97672de Fix the docs run failing on Travis
Likely that the deprecation warning from cryptography is causing the
setup.py sphinx build command to return an error so the tox/travis job
is marked as failing. Changing to calling the sphinx-build command
directly solves this.

Also updated the sphinx config for built-in napoleon and faster builds
using jobs option.
2018-07-28 10:26:02 +01:00
e8e649a030 Prevent time formatting crash when seconds were floats
Update docstring and tests for ftime supporting floats

Truncate rather than round floats in ftime
2018-07-27 07:26:37 +01:00
1e6c02ae83 [Core] Fix get_eta returning float instead of int
Floor division will return a float if a float is provided so ensure int
when dividing by the stop_ratio. All other status values from libtorrent
are ints.

Added tests.
2018-07-16 16:25:08 +01:00
b2e1f850d8 [WebUI] Handle missing gettext.js file
Removed the creation code of `gettext.js` and now it will just mock
the `_` function by being the identity function.
2018-07-16 16:22:42 +01:00
8bfa2cacbb Cleanup docstrings in httpdownloader
Use the new google docstring style.
Keep line length to 80 chars and new lines for mult-line func params.
2018-07-15 11:58:16 +01:00
c7e61f8c34 [HTTPDownloader] Refactor HTTPDownloader to Agent
As of twisted 16.7.0, `twisted.web.client.HTTPDownloader` have been
marked as deprecated.
This caused the tests results to show many lines of warnings about it.
This refactor uses `twisted.web.client.Agent`, as suggested by Twisted.
2018-07-15 11:58:16 +01:00
089c667d7f [AutoAdd] Add WebUI interface 2018-07-12 19:18:08 +01:00
ebb955934d [Console] Fix unhandled error in preferences
If the value is None then the len cannot be calculated so set to blank
string.
2018-07-12 16:46:35 +01:00
c7567ddee4 [Console] Fix unhandled error in torrentactions
Fix calls to core pause and resume using the singular methods with a
list of torrent ids.

Fix and simplify the handling of errors from core.
2018-07-10 16:46:49 +01:00
c655da38c8 [Console] Ensure time string is unicode 2018-07-10 16:46:49 +01:00
4c0be7ddd4 [Common] Fix missing return for de/encode methods 2018-07-10 16:46:49 +01:00
38961d4253 [Console] Fix char encoding in preferences 2018-07-10 16:46:49 +01:00
6e81a11d8d [Console] Fix and refactor window.add_str code
- Replace usage of single char variable.
- Use max function to prevent negate lengths when calculating trim.
- Remove usage of insstr as the addstr exception when writing offscreen is
excpected behaviour so needs caught and passed. This fixes a similar
error with insstr.
2018-07-10 16:46:49 +01:00
be02be75be [GTKUI|Py3] Ensure backward compatible pickle dumps 2018-07-01 20:34:42 +01:00
7b5ed9f1d6 [Py3] Fix dict iter item deletion 2018-07-01 10:08:16 +01:00
e626f9fece [Win32] Fix missing certs for HTTPS requests
The following error occured on Windows when switching to using HTTPS
url with Twisted Agent:
```
<class 'twisted.web._newclient.ResponseNeverReceived'>: [<twisted.python.failure.Failure OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]>
```

The fix is to install certifi and provide the path to the trust store as
env var for OpenSSL to pick up.

Also includes a simplication of the core test_listen_port code.
2018-06-29 10:29:30 +01:00
3fab799dbf Fix flake8 trailing comma 2018-06-27 16:41:21 +01:00
24c100d9b7 [Py3] Decode new_release version to unicode string 2018-06-27 16:41:21 +01:00
9bc2f62c80 [Py3] Fix tranfer header first byte check
The index of a byte in Python 3 will return an integer so use slice for
compatibility with 2/3
2018-06-27 16:41:21 +01:00
1fa2de066f Fix mistakes in test code 2018-06-27 16:41:21 +01:00
ae0b070c1b [Py3] Fix sort and sorted issues
In Python 3 there is only the key functions available and cmp functions
should be removed, especially for speed.
2018-06-27 16:41:21 +01:00
c3a2c67b98 [Py3] A large set of fixes for tests to pass under Python 3
The usual minor fixes for unicode/bytes for library calls.

The minimum Twisted version is now 16 for Python 3 support so remove old
code and start replacing deprecated methods.

Raised the minimum TLS version to 1.2 for the web server.
2018-06-27 16:41:21 +01:00
200e8f552b Add dependecy on six 2018-06-27 16:41:21 +01:00
4247013446 [bencode] Fix errors with unicode dict keys or values 2018-06-26 12:42:26 +01:00
6ec32a85e4 [GTKUI] Fix AttributeError with clipboard strip 2018-06-26 12:42:26 +01:00
633c56f54e [Core] Add prefetch metadata methods for magnets 2018-06-26 12:42:26 +01:00
23171ad205 Fix missing _metainfo attribute in TorrentInfo 2018-06-26 12:42:26 +01:00
277576268c [Py2to3] Replace deprecated base64.(de|en)codestring
* In Py3 base64.encodestring is deprecated so rather than use the
   Py3 only encodebytes instead use b64encode. The other advantage is
   that with issue a consistent TypeError is raised that we can catch.
2018-06-26 12:42:26 +01:00
74aa0db956 Manually compress png with zopflipng 2018-06-21 14:50:19 +01:00
fe42fb2c31 Recreate and compress icons
Will the change to deluge.svg all the icons need recreated. I also
updated the script to losslessly compress the png files with zopflipng.

hicolor theme changes:
 - Added a 512px icon.
 - Added a deluge-panel.png for systray theming.

Added extra webui icons and updated index.html to use them
correctly.
2018-06-21 14:50:19 +01:00
4973538d6c Tweak the deluge icon size
At smaller sizes the padding makes the icon too small so only keep the
padding at the bottom and let the point of the droplet extend to top of
canvas.
2018-06-21 14:40:52 +01:00
de1e7c27df [#2867][WebUI] Fix Daemon connection problem
Trying to connect to daemon B while still connected to A will cause
the torrents from A to be shown after connecting to B.
Therefor, checking if connected to any daemon before connecting to B.
2018-06-19 09:39:15 +01:00
587b9afefe [GTKUI] Fix count of torrents in dialog title 2018-06-19 09:34:46 +01:00
63b25311f5 [UI] Refactor TorrentInfo and add functionality
Make a clearer distinction about torrent metainfo and metadata and allow
passing these to TorrentInfo.
2018-06-19 09:12:57 +01:00
d45dbfe064 [Core] Add is_session_paused method 2018-06-18 20:06:35 +01:00
3176b877a4 [Core] Add methods pause_torrents & resume_torrents 2018-06-18 20:06:35 +01:00
18541bce86 Fixed a minor grammatical error in the deluge console command documentation 2018-06-18 20:04:22 +01:00
bebe08d92b Add X-GNOME-UsesNotifications
Due to Gnome Guidelines https://wiki.gnome.org/Initiatives/GnomeGoals/NotificationSource
2018-06-18 20:00:49 +01:00
0dbbb51cff [Core] Fix strip None in set_listen_on
Trying to strip None will not work so combined the check as a condition
for the strip.
2018-06-18 19:56:16 +01:00
bd78bd2643 [#3001|GTK] Fix sorting to default to Added column
The sort function used when no column is being sorted was a lambda
function that had no effect and had a bug. Instead default to sort by
the added date.

Also fixed the name column sort to lowercase and uppercase properly.
2018-06-17 08:34:17 +01:00
7a3b164060 [WebUi] Fixed Install Plugin window creation 2018-06-12 03:50:30 +03:00
e7eb26416e [Core] Fix strip None in outgoing_interface
Trying to strip None will not work so do this after checks for
falseness.
2018-06-09 22:18:38 +01:00
b2b7703081 [AutoAdd] Fix the logging for a failed added torrent
Add a missing arg to the failed added torrent callback and update the
logging text based on magnet or not.
2018-06-09 22:18:38 +01:00
cbdde7bba5 [Appveyor] Make win32 build files available as zip
It can be useful to have the build folder available so zip it up for
download as an artifact.

Although the 7z has an exclude for the installer exe it doesn't seem to
be working.
2018-06-05 23:21:12 +01:00
4fd51a4ef9 Skip Failing Tests On Windows 2018-06-02 22:09:50 +01:00
333c81c1d7 Add Appveyor support for Windows builds 2018-06-02 22:09:50 +01:00
21b5a15e5d Fix and cleanup outgoing interface code
There was a misunderstand about outgoing interface setting in libtorrent
and instead of being able to take both IP and adapater names, it only
accepts adapter names and errors with an IP address, which was the
default of '0.0.0.0' in code.

This fixes the code to not accept IP address and use empty string if it
is given one.

Also includes a bit of code cleanup.
2018-06-02 21:32:56 +01:00
edd431a304 Make Tox Multi-OS Friendly 2018-06-02 11:29:51 +01:00
d642fa3989 Fix files to pass new Flake8 checkers
Some new flake8 checkers were added so fix these new warnings and
any issues uncovered.

Use add-trailing-comma to fix missing trailing commas. It does not
format it as well as I would like however it was fast to change and
helps with git changes in future.

Removed pylint from tox due to large number of warnings.
2018-06-01 23:41:17 +01:00
bae1647e99 Add Pipenv Pipfile for development
Switching to Pipenv will speed up developement. See the docs for
details on using Pipenv.

 - Added more flake8 checks.
 - Added `detox` for running tests in parallel locally.
2018-06-01 23:41:17 +01:00
decd7aca71 Update gettext for outgoing interface 2018-06-01 12:57:18 +01:00
7cc9aaca49 Fix VersionSplit comparison
The tests on Python revealed a bug with comparing dev versions.

Switch to comparing by integers and setting non-dev version to infinity.

There is still an issue with suffix release comparisons beyond single
digits but will leave that for now.
2018-06-01 08:59:24 +01:00
196aa48727 [#3171] Add Option To Specify Outgoing Connection Interface 2018-05-21 13:14:15 -04:00
af2972f697 [GTKUI] Update prefs dialog ui file with Glade
Let Glade UI designer remove and make changes to UI file.
2018-05-21 08:30:25 +01:00
d4addeedd6 [UI] Fix non-unique hostlist host_id
Use a sha1 of time.time() can result in identical host_id. This was
evident with Travis tests randomly failing due to host_id collision
returning the wrong host details.

Using uuid4 to generate a random UUID in hex form should fix this issue.
2018-05-20 22:49:08 +01:00
8439698336 [Tox] Use platform independant toxworkdir instead of PWD
The use of `{env:PWD}` is not available on Windows so switch to
`{toxworkdir}` which is the directory where virtual environments
are created and sub directories for packaging reside.
2018-05-20 08:46:40 +01:00
7d120690ab [Docs] Fix Sphinx AutoDoc failing with gdk mask operation
The creation of a new mask from two gdk mask is causing a TypeError,
likely related to the mocking of gdk in Sphinx conf.
2018-05-20 08:46:25 +01:00
ee196f5035 [Flake8] Fix import and docstrings issues 2018-05-20 08:45:59 +01:00
ff85c334c7 [Tests] Fix 'Too many open files' by disabling LSD
Instances of libtorrent with Local Service Discovery enabled are leaving
many sockets fd open with every test run and will fail with 'Too many files
open' if ulimit is >=1024.
2018-05-19 21:50:23 +01:00
0c574f33e1 [Tests] Ensure tear_down deletes rpcserver and core 2018-05-19 21:23:46 +01:00
a7c7309027 Use context manager for open in metafile 2018-05-19 21:03:36 +01:00
de2f998218 [WebUI] Encode HTML entitiies
Ensure that torrent keys that could contain HTML entities are encoded
when displayed in webui.
2018-02-04 22:02:18 +00:00
4982ba0b98 Cleanup pytest config in tox
Config values are either wrong, unused or default is better.

Disable logging of deluge log output in testing.

Newer versions of pytest now use `pytest` cmd so rename.
2017-12-17 11:55:09 +00:00
f57286fd51 [#3121] Fix the peer-id to be unique
The associated ticket made us aware that the id '-DE2000-' might be
blocked.
2017-12-17 11:55:09 +00:00
12f7345d0c Use a constant for versions 2017-12-17 11:47:08 +00:00
4e79ed8124 Fix tox config to install latest pip packages
Trial changed command in latest versions of twisted
2017-12-16 17:39:48 +00:00
7787aa975f Delay assert in test_torrent for Travis 2017-12-16 17:29:30 +00:00
c13622a1e6 Fix state not loading after async API change 2017-12-16 13:21:47 +00:00
07a87fa15a [#3129|Console] Fix unable to use connect command from terminal
The parsed_cmd passed to do_command was an argparse Namespace object
which needed no further parsing so use exec_command instead.
2017-11-18 23:46:35 +00:00
2644169376 [#3126|Core] Restore synchonous add torrent methods for backward compatibilty
The synchonous add torrent method was replaced with async but this
break backward compatibility with 3rd party plugins and clients.

Added a new add_torrent_file_async method for adding single torrent.

Torrent manager has a new add_async method and split up code to prevent
duplication.

Update any use of add_torrent_file to add_torrent_file_async. Future
refactoring could use add_torrent_files instead.
2017-11-18 23:04:38 +00:00
5988f5f04f Fix flake8 error 2017-11-18 22:14:04 +00:00
95d826b77c [#3127|Blocklist] Fix importing blocklist with encoded lines
There are some blocklists with encoded names that break upon importing
so decode lines to unicode.

Need to use decode_bytes as not all encoded lines are utf8!
2017-11-05 20:52:51 +00:00
9bcda41700 [#3075|Console] Fix config handling windows paths
The console config token parser was unable to handle windows paths
starting with 'C:\'.

Remove unneeded windows_checks.
2017-11-05 17:30:47 +00:00
507c5df984 [#3112|Console] Fix handling hex for setting peer_tos in config
The token parser was converting hex value to int which is not what
should be passed onto libtorrent peer_tos setting.
2017-10-29 22:16:13 +00:00
0ba87b424c Revert "[#2848|Core] Fix incorrect share ratio in torrent status"
This reverts commit 7b87a93862.

After further discussion in the ticket this change is undesired.

> I wrongly assumed that private trackers will count how many bytes you
> download but they don't, they track how many parts(or chunks?) you
> have, when you announce it. So using total_done is fine, no change
> needed.

> Checking for private flag and using total_wanted_done for public
> enables users to be a bit more selfish. They can start a torrent,
> let it run for a bit then deselect the files they don't want and
> only upload enough to make up for what they wanted to download. This
> means they may upload less than they downloaded, hurting the swarm.
> So I personally don't think this would be a good change.
> Overall my suggestion is to close this as not a bug.
2017-10-29 12:36:15 +00:00
53f818e176 [#3070] Fix httpdownloader error with missing content-disposition filename
The parsing of the content-disposition in httpdownloader was not able to
handle missing parameters e.g. "Content-Disposition: attachment" and would
result in an IndexError. Added a test for this use-case.

Fixed the issue using the cgi.parse_header to extract the parameters.
2017-10-29 12:32:32 +00:00
00dcd60d56 [Lint] Fix flake8 issues with l as var 2017-10-29 11:39:52 +00:00
1730230244 [#3124|GTKUI] Fix comparing Name str if value is None
The original fix was not correct as the strcoll function cannot
accept None only strings. This fix ensures that the value is an
empty string if None for comparison.
2017-10-29 11:16:13 +00:00
0728c03c1c [#3066|Core] Add rather than replace dht bootstrap nodes in lt 2017-10-29 10:36:45 +00:00
354372b2ea [Notifications] Remove duplicate heading on prefs page
The heading is provided by prefs add_page so remove from glade file.
2017-10-16 21:57:08 +01:00
d169aca8bd [Notifications]Fix no text in tab list
The tab in the Preferences window is created and clickable - only the
text is missing.
2017-10-16 14:15:17 +03:00
26720ca4c2 [AutoAdd] Fix handling deferred torrents
* The changes to core api now return a deferred instead of torrent_id
   so need to update autoadd to use callbacks.
 * Minor refactor to save one indentation level and reuse fail callback.
 * Add exception handler for any errors from label plugin.
2017-10-14 21:39:30 +01:00
510a8b50b2 [AutoAdd] Update gtkui from libglade to gtkbuilder 2017-10-14 21:30:45 +01:00
d190f149d1 [WebUi] Update gtkui from libglade to gtkbuilder 2017-10-14 20:13:53 +01:00
24a31b1194 [Notifications] Update gtkui from libglade to gtkbuilder 2017-10-14 20:13:53 +01:00
470490769f [Extractor] Update gtkui from libglade to gtkbuilder 2017-10-14 20:13:53 +01:00
1259eca8ad [Execute] Update gtkui from libglade to gtkbuilder 2017-10-14 20:13:53 +01:00
f0316d3e31 [Blocklist] Update gtkui from libglade to gtkbuilder 2017-10-14 20:13:53 +01:00
9b580a87fa [GKTUI] Fix high priority files tab trigger 2017-10-14 20:06:14 +01:00
4bee1ce811 [Travis] Use current Trusty image
The issue with virtualenv site-packages was fixed: travis-ci/travis-cookbooks#878
2017-10-14 20:00:14 +01:00
e3f537770f [UI] Fix setting gettext to unicode for Py2 compat 2017-07-05 12:18:35 +01:00
9b92bc2baf [#3076|UI] Add ngettext and alias _n for plural translations
* Fixes use of _n() in console rm command
2017-07-05 09:46:12 +01:00
51b99caf24 [Common] Add decode_string (deprecated) for compatibility 2017-06-29 15:28:52 +01:00
850fd34522 [#3084] Fix error changing ownership on torrents 2017-06-29 15:07:11 +01:00
9164dafe69 [#3083] Fix missing common.utf8_encoded for backward compatibility 2017-06-29 14:42:16 +01:00
33e9545cd4 [#3079] Fix config parsing for json objects
* If a curly brace was used in a string then find_json_ojects would
   fail to find objects correctly. To fix this ignore double-quoted entries.
2017-06-28 10:32:45 +01:00
7b87a93862 [#2848|Core] Fix incorrect share ratio in torrent status
* Use total_wanted_done to increase the accuracy of the calculated ratio.
2017-06-27 19:02:15 +01:00
51bde704b5 [Packaging] Simplify release script using sdist
* setup.py sdist now creates a pristine tar which can be used for release.
 * Uses the version currently checked-out in git.
 * Removed unneeded lines in manifest.
2017-06-27 18:12:51 +01:00
3f13c24362 Update MANIFEST for wanted/unwanted files 2017-06-27 15:12:13 +01:00
6837d83f5b Fix setup.py requiring gen_web_gettext 2017-06-27 15:11:19 +01:00
3c1d7da698 [Packaging] Apply fixes to OSX app scripts
* Fix path to dist dir
 * Rename dylib with new soversion for lt 1.1.x
 * Create Info.plist with version and year automatically
2017-06-27 14:00:06 +01:00
d6731b8cee [#3078|GTKUI] Apply workaround for showing the OSX menu
Commenting out the remove_accelerator fixes showing the menubar correctly.
2017-06-27 09:16:51 +01:00
fe80703f95 [Packaging] Fix py2app build 2017-06-27 09:16:51 +01:00
1808ac506a [GTKUI] Restore removed os_check for systray icon
status_icon_new_from_icon_name does not work on OSX
2017-06-27 09:16:51 +01:00
3174c7534d [Core] Ensure tracker error message is decoded 2017-06-27 09:16:51 +01:00
065729a389 [OSX] Fix converting mac_ver to string 2017-06-27 09:16:51 +01:00
d250e0a486 [Packaging] Ensure sdist tarball contains correct files 2017-06-25 19:22:13 +01:00
3f1ff54887 [Packaging] Fix using wrong commit id 2017-06-25 19:22:13 +01:00
0424543e36 Update author details 2017-06-25 19:22:13 +01:00
d0cb45808c Exclude test and plugin files from build dir 2017-06-25 19:22:13 +01:00
0cc0882ac9 [WebUI] Refactor out AuthError for NotAuthorizedError 2017-06-23 12:19:39 +01:00
a7c4228ce7 Update systemd service files
- Add man page link
 - Ensure deluge-web is not daemonised
2017-06-23 10:12:07 +01:00
ce3a8c0c17 [Travis] Pin to older trusty build 2017-06-17 04:00:22 +01:00
ace531e8ae [WebUI] Fix testing array after removing torrents 2017-06-17 03:49:30 +01:00
2c66a4c29e [#2707|WebUI] Ensure var test for getSelectedRecords value
* Fixes potential for TypeError undefined in browser console.
2017-06-17 03:47:48 +01:00
6e66452cf3 [GTKUI] Add a prefix space for seed rank k unit 2017-06-17 03:29:16 +01:00
cb646f3a4f Update changelog and gettext 2017-06-16 19:15:05 +01:00
32d5392776 [#2499|GTKUI] Add key shortcuts for changing queue position
- Ctrl+Alt+[Shift]+{Up|Down}
2017-06-16 16:56:33 +01:00
03ca4cfa46 [#2354|GTKUI] Fix alt-f conflict between Tabs and Menu 2017-06-16 14:41:54 +01:00
fb4307f748 Revert "[#2341] Use common.resource_filename in plugins"
Using common.resource_filename broke plugins so need to find a better solution for non-ascii dirs.

This reverts commit bdb3b509ad.
2017-06-16 14:23:10 +01:00
3893d3e214 Revert "[Plugins] Replace pkg_resources for abspath and decode path"
This reverts commit 85364dc8ab.
2017-06-16 11:15:19 +01:00
2b90f309a6 [WebUI] Refactor host connect methods 2017-06-16 08:03:42 +01:00
fb71d049b1 [#3068|WebUI] Fix not connecting to default daemon 2017-06-16 07:45:26 +01:00
89e245e2d3 [#3058|GTKUI] Fix unable to add user to daemon 2017-06-16 01:18:34 +01:00
3330e97d05 [#3067|GTKUI] Fix the daemon stop button sensitivity 2017-06-16 00:47:05 +01:00
15741047ed [Common] Catch tarfile exception if no filepaths exist 2017-06-16 00:31:26 +01:00
eeccc47dde Enable migration from hostlist.conf.1.2 to hostlist.conf 2017-06-16 00:31:26 +01:00
c169d8909f [#3059|GTKUI] Fix starting and autoconnecting to daemon
* Fix start_daemon using callback for non-deferred method.
 * Ensure autostart checks daemon status before attempting to start it.
 * Remove initial delay with autoconnect, it will retry anyway.
 * Found method __connect that needed renaming to _connect.
 * Tweak the timing for refresh and retries.
 * Fix use of reason.trap instead of reason.check, causing code to silently error-out
   and not retry connecting.
 * Set the stop daemon button to insensitive when not connected. The client cannot stop
   a daemon with daemon.shutdown() if daemon is not instatiated. Perhaps in future use
   config and pidfile to allow shutdown without connecting to daemon.
2017-06-15 18:45:26 +01:00
dc27d873b3 Fix metafile.makeinfo trying to decode pieces
* The use of unicode_literals causes join to decode pieces if 'b' prefix not used.
 * Added test.
 * Fixed session_id keyerror when running with tests.
2017-06-15 18:25:13 +01:00
32dc683d5c [#3037] Add creator field to details tabs 2017-06-15 16:33:24 +01:00
06dfeed750 [#3064|WebUI] Fix server not sending TLS intermediate certs
* Sending of cert chain was unintentionallly removed in commit c1902e43 (#2792).
2017-06-15 13:47:10 +01:00
60c764ac33 [Core] Save torrent state only if state has changed 2017-06-14 10:56:19 +01:00
5410c44bb1 [Lint] Fix import position 2017-06-12 21:53:25 +01:00
d372be9b65 [#3055|GTKUI] Fix unable to auto-start localhost daemon 2017-06-12 21:36:52 +01:00
131b9f86a9 [GTKUI] Fix saving host details in connection manager 2017-06-12 10:38:22 +01:00
45e0d10932 Update archiving of state file to use tarfile 2017-06-09 15:08:11 +01:00
596b5d5cd4 [GTKUI] Add prefs liststore col for translation 2017-06-09 11:31:38 +01:00
bb5dafc61d [GTKUI] Small refactor prefs remove_page 2017-06-09 11:31:38 +01:00
7e9a8b801c [#2467|GTKUI] Fix prefs tabs sync adding/removing page 2017-06-09 11:18:00 +01:00
f30f421f50 [Label] Fix common import from parent dir 2017-06-08 14:32:17 +01:00
bbce304f5a [WebUI] Fix attempting to connect to blank host_info 2017-06-08 14:31:38 +01:00
de3a6c443d [WebUI] Set debug to false for gettext script 2017-06-08 14:03:55 +01:00
7ad8431dd9 [Plugins] Update create_plugin script
* Tidyup copyright block
2017-06-08 11:48:42 +01:00
85364dc8ab [Plugins] Replace pkg_resources for abspath and decode path
- Use a BASE_PATH constant.
 - pkg_resources caches the files in python_egg_cache which is not
   required for plugins and causes issues with non-ascii paths.
2017-06-08 11:47:59 +01:00
bdb3b509ad [#2341] Use common.resource_filename in plugins 2017-06-08 11:25:11 +01:00
8326206f87 Ensure configmanager config dir path is unicode 2017-06-08 11:25:11 +01:00
85a1e478fe [#3044|Core] Stop libtorrent checking file timestamps in resume data
* The verfication of timestamps of files on disc against those in resume data
   can be buggy and sends torrents to error state for no apparent reason. It has
   also been removed in latest version of libtorrent so disabling this check.
2017-06-08 11:12:07 +01:00
29191e6a58 [Tests] Remove duplicated override code 2017-06-07 12:36:09 +01:00
15e0e0f30a [Console] Refactor quit code and cleanup conn mgr 2017-06-07 12:36:09 +01:00
d474576104 [Tests] Suppress JSONRequestFailedTestCase printing to stdout 2017-06-07 12:36:09 +01:00
31555ee5ed [UI] Further refactoring of the connection managers
* Add host Edit button to WebUI.
 * Updated and fixed associated tests.
 * Refactored related gtkui code to better understand code flow.
 * Removed dead code in gtkui.
2017-06-07 12:36:09 +01:00
2f11bb8303 [GTKUI] Update connection manager layout 2017-06-07 12:36:09 +01:00
ac48ad982e [UI] Refactor duplicated code out of connection managers 2017-06-07 12:36:09 +01:00
54a081bdfd [Tests] Remove orphaned ubuntu favicon 2017-06-07 12:25:23 +01:00
989137ddc3 [OSX] Default to 64-bit builds 2017-06-07 11:47:58 +01:00
c72459d3ef Replace pep8 with pycodestyle in tox.ini 2017-06-07 11:08:50 +01:00
5c1faf3d5e [Tests] Unpin isort as 4.2.13 contains fixes 2017-06-07 10:31:09 +01:00
4feef3be78 [GTKUI] Fix showing main window when starting in tray
* Also fixes the prefs and dialogs now showing due to first_show not
   connecting signals when starting in tray.
2017-06-07 10:24:11 +01:00
3032e5eb21 [Lint] Fix pylint warnings 2017-06-07 10:05:48 +01:00
481f779349 [Python3] Fixes to make code backward compatible
* Continuation of updating code to Python 3 with Python 2 fallback.
 * Using io.open allows files to be encoded and decoded automatically on write and read. This
 maintains the python boundaries of unicode in code and bytes for output/files so less
 explicit encoding or decoding.
 * io.StringIO is the replacement for StringIO and will only accept unicode strings.
 * io.BytesIO is used where bytes output is required by the enclosing method.
 * Update bencode for full compatibility.
2017-06-05 22:25:29 +01:00
ede0f710f8 [Core] Replace usage of deprecated new.classobj
* type is new module to use
2017-06-05 09:03:34 +01:00
66718f6d8e [Docs] Remove chardet mock to fix requests version check
* chardet is an easily installed pure python module so doesn't need mocking.
2017-06-05 08:10:13 +01:00
fd5833c1d8 Fix build failing on removed icon 2017-06-05 06:37:18 +01:00
6f8a6e5045 [Tests] Remove failing ubuntu icon test
* Changes to website make this test unusable now.
2017-06-05 00:01:39 +01:00
78dc75d55d [Tests] Specify module versions to fix tox tests 2017-06-05 00:01:07 +01:00
579f56b0bf [Lint] Fix triple-quoted to use double-quotes not single
* according to pep8 triple-quotes should use double-quote.
2017-06-05 00:01:07 +01:00
9ebe30edfc Remove unused lock icon 2017-06-05 00:01:07 +01:00
e045d5e5c2 Add new deluge icons and update icon generation script 2017-06-05 00:01:07 +01:00
fefe742ea1 [Packaging] Add a make_release file for source packaging 2017-05-17 13:56:56 +01:00
0c36b63f22 Cleanup infolist and changelog 2017-05-16 12:00:28 +01:00
c9692bb5bd [Plugins] Add webui pref pages for Label and Autoadd
* Add info-only preference pages for these plugins in WebUI.
2017-05-16 11:12:53 +01:00
0353b82c0c [GTKUI] Fix typos in text strings 2017-05-08 10:11:18 +01:00
23a34c6bac [Core] Update new release url 2017-05-03 15:19:08 +01:00
4e7b2e5b41 Update gitignore
Ignore .cache
2017-05-03 10:29:59 +01:00
3668e77a75 [GTKUI] Fix column sort state not saved in Thinclient mode
* In torrentview.stop the listview is cleared however this meant in thinclient mode
   that listview sort details are empty and overwrites existing data when save_state is
   then called in torrentview.shutdown.
2017-05-02 16:29:17 +01:00
a727ee67bc [Core] Ensure absolute dirpath for config dir 2017-03-29 21:22:33 +01:00
aa28d73f47 [Console] Fix super usage breaking console 2017-03-29 21:21:45 +01:00
d485eb5c8f [#2786] [GTKUI] Fix showing connection manager with malformed ip 2017-03-29 18:39:18 +01:00
8a0b7d970a [#2837] [WebUI] Create gettext.js when building 2017-03-22 12:55:17 +00:00
a76fde5feb [GTKUI] Enable multi-row selection with mouse 2017-03-22 12:41:25 +00:00
648dc93655 [#3003] [Label] Fix duplicate context menu entries 2017-03-22 00:21:37 +00:00
f32c8aff90 Minor gettext script improvements 2017-03-21 22:05:54 +00:00
9aed7a7f0c [AutoAdd] Handle AddTorrentError exceptions 2017-03-21 20:21:28 +00:00
c8d084c563 [AutoAdd] Fixes for adding magnets
* Combines three commits from 1.3-stable that fixed splitting magnets from file.

      b52de1549e, 8a3f15e5c0, 2d4dec669e
2017-03-21 20:08:34 +00:00
7e04abd1e5 [AutoAdd] Minor cody tidyup 2017-03-21 20:08:34 +00:00
e2e13103b8 [Core] Catch keyerror in add torrent alert 2017-03-21 18:47:31 +00:00
d8e5cbe689 [#2928] [GTKUI] Fix missing name and trackers adding magnets 2017-03-21 18:47:31 +00:00
19fdd2f88c [Core] Fix saving torrent info metadata
* Unicode dict entry should be bytes.
2017-03-21 18:46:40 +00:00
e5e49f68ba [GTKUI] Fix adding from clipboard 2017-03-20 22:53:37 +00:00
5a3625f6cd Add systemd service files to packaging dir 2017-03-20 19:16:50 +00:00
bc50f6e5f6 [#2913] [Notifications] Fix webui passing string for port value 2017-03-20 18:46:36 +00:00
8ff1bfc0b2 [Console] Add time_added to info status keys 2017-03-20 11:48:55 +00:00
744ab08dfb [GTKUI] Reduce default size of prefs dialog 2017-03-20 11:32:59 +00:00
d01100a258 [GTKUI] Implement multi-torrent support in Options Tab 2017-03-20 08:39:09 +00:00
722ca41584 [GTKUI] Cleaup/refactor mainwindow 2017-03-20 08:39:09 +00:00
1637da84e4 [GTKUI] Refactor torrent details Tabs code
* Move common code into Tab parent class
 * The Tab init now accepts creation with name, child_widget and tab_label but
   will still accept the 'oldstyle' contructor to keep backwards compatibility
   with 3rd-party plugins.
 * Create namedtuple TabWidget with widget, format func and status_keys. The
   TabWidget are stored in a tab_widgets dict making it easier to create, save
   and update large numbers of gtk widgets.
2017-03-20 08:39:09 +00:00
6d28f2c885 [GTKUI] Refactor connect_signals to use 'self'
* If the handler method names match the signal names then it is possible
   to refactor out the mappings and simply pass 'self' to connect_signals.
2017-03-20 08:39:09 +00:00
482606d80a [#2990] [Core] Fix torrent priorities mismatch
* The old priorities instead of updated call to lt were being saved to self.options.
2017-03-20 08:28:10 +00:00
73ea123f1a [#2966] [Tests] Rename deprecated method aliases 2017-03-19 22:15:07 +00:00
d09df063a5 [Stats] Remove blanket try..excepts and stop timers correctly 2017-03-18 11:54:01 +00:00
676574ff19 [Stats] Update gtkui from libglade to gtkbuilder
- Additionally fixes #2977 num_connections KeyError and #2947 AttributeError.
2017-03-18 11:34:40 +00:00
665c047541 [Label] Update gtkui from libglade to gtkbuilder 2017-03-17 23:35:03 +00:00
939835cef1 Fix warning with label glade files 2017-03-17 16:44:23 +00:00
9e303b58a0 Refactor common magnet funcs 2017-03-17 10:26:17 +00:00
112a872bc1 [#2716] [Common] Update magnet funcs for tracker tiers tr.x 2017-03-17 10:26:17 +00:00
6424333c35 [GTKUI] Refactor adding list of trackers 2017-03-17 10:26:17 +00:00
267d331fac [#2476] [GTKUI] Fix adding mistyped trackers urls 2017-03-17 10:26:17 +00:00
d1daeb4cb0 [Trans] Fix unicode issue in msgfmt
- The offset was being calculated on unicode rather than byte strings lengths.
2017-03-17 01:05:58 +00:00
7c6c9eae7f [WebUI] Fix error displaying tracker icons 2017-03-16 23:22:58 +00:00
036154fc36 [#2417] [UI] Add Last Transfer to torrent status and torrentview columns
- Create new status entry `time_since_transfer` and getter that is
   calculated from lt time_since_upload and time_since_download.
 - Add/update all UIs and formatters.
 - Included update to console layout to match other uis
2017-03-16 23:22:58 +00:00
e3abdf9901 Use super class call where possible 2017-03-16 23:20:57 +00:00
af7e83bc76 Replace/remove usage of dict.keys() 2017-03-16 23:20:56 +00:00
4a274466ac Add python 3 section to tox 2017-03-16 23:20:56 +00:00
eb38e0ffff [Py2to3] Large set of changes for Python 3 compat
- Preparation work for using six or future module for Py2/3 compat. The
   code will be written in Python 3 with Python 2 fallbacks.
 - Added some Py3 imports with Py2 fallbacks to make it easier to remove
   Py2 code in future.
 - Replace xrange with range (sort out import as top of files in future).
 - Workaround Py2to3 basestring issue with inline if in instances. This means
   every usage of basestring is more considered.
 - Replace iteritems and itervalues for items and values. There might be a
   performance penalty on Py2 so might need to revisit this change.
2017-03-16 23:20:56 +00:00
321677e05a [WebUI] Return 404.html for files not found
- This ensures a proper request response is returned.
2017-03-15 23:12:36 +00:00
960f3a6552 [WebUI] Check render template files exist and raise 404 if not
- Check render/* requests match to .html files in the 'render' dir
 - Protects against directory (path) traversal
2017-03-15 23:12:36 +00:00
35c78eee41 Update to 1.1.2 libtorrent requirement 2017-03-15 09:56:19 +00:00
5348465e60 Fix 1d1bb2a2a issue by defining init in DelugeRPCProtocol 2017-03-14 19:29:45 +00:00
1d1bb2a2a7 [#2964] Fix RPC TypeError using namedtuple 2017-03-14 18:02:33 +00:00
767503ad88 [#2979] Fix Deluge start error with missing entrypoints
- An ImportError is raised if a module is listed in the entrypoint
   but is not actually installed. The code will now catch this and
   will de-list the ui module that failed.
2017-03-14 17:22:58 +00:00
1e696fe6ca Fix type in manpage 2017-03-14 17:21:38 +00:00
90631cca88 Fix console test 2017-03-14 15:48:20 +00:00
50c476c41d Update man pages to reflect ui arg changes
- Also fixup help output details
2017-03-14 14:58:59 +00:00
8232505961 [#2996] [Console] Fix duplicate commands in help output
- The duplicate entries were actually the aliases for commands
   but the command name not the alias was being returned.
2017-03-14 14:57:53 +00:00
966678196e [WebUI] Use error logging and add exception message detail 2017-03-01 14:47:42 +00:00
11e8957dea [WebUI] Only accept application/json content-type requests
- Protects against CSRF (Cross-site request forgery)
2017-03-01 14:47:42 +00:00
ec5c8bafb6 [#2815] [Console] Fix 'add' cmd path inconsistency on windows
When adding a torrent with a download location from command prompt
2017-02-23 19:30:42 +00:00
fb8dc42acf [Core] Catch None type country in get_peers 2017-02-23 19:16:04 +00:00
4df88c0df3 [UI] Refactor appdata.xml code and markup translatable text 2017-02-23 19:02:32 +00:00
3529036f55 [UI] Add an appdata.xml file
For Linux software gallery integration.
2017-02-23 19:01:44 +00:00
f2b77c8635 [WebUI] Linting trailing comma 2017-02-23 16:52:06 +00:00
49e5611f65 Remove unicode_literal from plugins setup.py
There is a bug in Py2 setuptools where the build fails if unicode dict keys
 are passed to package_data:

    `package_data must be a dictionary mapping package names to lists of wildcard patterns`

 The easiest workaround is to remove unicode_literals use in setup.py as it is not that important.
2017-02-23 16:48:05 +00:00
d75afc007d [GTKUI] Parse u:p@host:port pasted into proxy or connection manager 2017-02-23 09:46:39 +00:00
b32c5d8247 [Daemon] Improve logging when another process is using listen port 2017-02-23 09:31:58 +00:00
b2db96e4df [Py2to3] Refactor out usage of unicode and basestring
- Python 3 renames `unicode` type to `str` and introduces `bytes` type.
 - Python 2.7 has `bytes` but is only an alias for `str` so restricted
   to comparisons but helps keep compatibility.
 - To test for unicode string on Py2 and Py3 uses the "''.__class__" type.
 - Remove usage of utf8encode and just encode, problems with bytes being passed
   in code will be picked up faster.
 - Where possible refactor out isinstance for try..except duck-typing.
2017-02-23 00:35:43 +00:00
52a85cb91c [Console] Fix showing file priorites 2017-02-23 00:30:56 +00:00
beb4f8c8f9 [Common] Rename decode_string to decode_bytes
- Switch to using Python 3 naming convention where str now refers to unicode
   and bytes are encoded strings.
 - Cleanup docs and code
 - Also rename convert_to_utf8 to utf8_encode_structure to clarify functionality.
2017-02-23 00:30:10 +00:00
3b1eeb0818 Use Ubuntu Trusty on Travis 2017-02-23 00:21:33 +00:00
9ad2f50fa4 [Common] Decode byte strings for TorrentInfo 2017-02-23 00:21:33 +00:00
bbd2661acb [WebUI] Fix missing low.png for file priority 2017-02-23 00:21:33 +00:00
b2a2995c0d [GTKUI] Use int not string number for select_path 2017-02-23 00:21:32 +00:00
5a9784ff4d Fix msgfmt for Python 3 and unicode_literal 2017-02-23 00:21:32 +00:00
ba41110c27 [WebUI] Markup byte strings for twisted request 2017-02-22 12:45:12 +00:00
608ecae5fd [Console] Use raw string for regex compile 2017-02-22 12:45:12 +00:00
04b8b14828 [Console] Use io.open to en/decode utf8 files 2017-02-22 12:45:11 +00:00
4619b31aa3 [Console] Ensure opening torrent files in binary mode 2017-02-22 12:45:11 +00:00
e3b8aaf276 [Tests] Markup byte strings to fix tests 2017-02-22 12:45:11 +00:00
1d9733014a [Core] Fixup maketorrent for unicode_literals
* Added a new convert_to_utf8 function to common that is handy for
   any nested dictionaries etc.
 * Small refactor to get rid of duplicate code and comment will be
   encoded by convert_to_utf8 function.
 * Passes test_maketorrent.
2017-02-22 12:36:33 +00:00
304ad1e72d [Lint] Add missing copyright header to files 2017-02-22 12:36:33 +00:00
ff6cec251a [Core] Markup byte-strings to fix httpdownloader and core tests
* Twisted methods require byte-string arguments.
 * The headers str conversion in httpdownloader _download_file was
   incorrent and left the dict key still as unicode so replaced with
   a dict comprehension (py2.7 requirement).
2017-02-22 12:36:33 +00:00
84802da29b [Py2to3] Force unicode_literals and fix related issues
* Added `from __future__ import unicode_literals` to every file so
   now all strings in code are forced to be unicode strings unless
   marked as byte string `b'str'` or encoded to byte string `'str'.encode('utf-8')`.

   This is a large change but we have been working towards the goal of unicode
   strings passed in the code so decoding external input and encoding
   output as byte strings (where applicable).

   Note that in Python 2 the `str` type still refers to byte strings.

 * Replaced the use of `str` for `basestring` in isinstance comparison as
   this was the original intention but breaks code when encoutering unicode strings.

 * Marked byte strings in gtkui as the conversion to utf8 is not always handled, mostly
   related to gobject signal names.
2017-02-22 12:36:32 +00:00
011afe3e89 [#2879] [OSX] Fix dyld error opening file from within Deluge
- Using DYLD_LIBRARY_PATH seems to have the unintended effect of making associated apps
   unusable (unable to locate dylds) when opening a file from within Deluge. The workaround
   for now is to switch to using DYLD_FALLBACK_LIBRARY_PATH.
2017-02-22 11:20:51 +00:00
b7162fab36 [#2956] Fix empty file_priorities with magnets 2017-02-21 10:37:09 +00:00
f6e2dab58a [#2826] Fix create_torrent filedump not encoded 2017-02-21 10:13:30 +00:00
4a62c5eac2 [Core] Switch move_storage flag to dont_replace 2017-02-21 10:10:57 +00:00
dd30bad96a [WebUI] Log successful logins with associated ip 2017-02-20 18:37:44 +00:00
c2c0fe86f9 [#2957] [GTKUI] Fix AttributeError in torrentview column sort 2017-02-20 13:28:36 +00:00
14d9b6cfcb Temp workaround for critical pickle trackers lt bug 2017-02-20 12:45:44 +00:00
df4d97c447 [Tox] Twisted version pin to 16.6
* There is a problem with Twisted 17 and the setup for travis and tox
   using site-packages with an old openssh package.

       AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'

 * The simplest workaround for now is to pin Twisted to 16.6.
2017-02-14 18:59:34 +00:00
a7826c4f90 [Core] Use fallback message for empty tracker error status 2017-01-28 15:23:08 +00:00
8c26c83c4d [#2960] Fix typo in storage moved alert 2017-01-28 14:27:27 +00:00
6b49f844dc [GTKUI] Fix showing cache status ratio 2017-01-26 12:49:56 +00:00
4a344e382b [UI] [Core] Update and refactor proxy settings
* Combine I2P into proxy settings.
2017-01-26 12:49:55 +00:00
108dd9e4b8 Add temporary libtorent git RC_1_1 branch requirement 2017-01-26 12:49:55 +00:00
b71a2fa549 [Tox] Remove py26 and add lt version output to trial 2017-01-26 12:49:55 +00:00
3ca012ee63 Change libtorrent minimum dependency to 1.1.1
* Change PPA to develop for Travis to use libtorrent 1.1
2017-01-26 12:49:55 +00:00
706d53ab4a [Core] Move readonly key setting closer to config init 2017-01-26 12:49:38 +00:00
2321f32f84 [Core] Fix double alert messages 2017-01-26 12:49:36 +00:00
d1dd35d4b1 [Tests] Suppress file descriptor limit warning 2017-01-26 12:49:27 +00:00
a5de64a19c [Stats] Update session status keys 2017-01-26 12:49:25 +00:00
5d7c1336b9 [Core] Use new lt torrent moving_storage status 2017-01-26 12:49:04 +00:00
93898d6475 [Core] Use single underscore for private methods 2017-01-26 12:49:02 +00:00
4caf05c092 [Core] Refactor torrent.set_file_priorities 2017-01-26 12:49:02 +00:00
6083a3078e [Core] Minor cleanup of preferencesmanager 2017-01-26 12:49:01 +00:00
0160bb1c91 [Lint] Fix pylint warnings in setup.py 2017-01-26 12:48:52 +00:00
e7ce389e84 [Tests] Fix test_ui_entry failure with libtorrent 1.1
- With libtorrent 1.1 dht is enabled from startup and the returned status
   contains DHT node values (i.e. non-zero). Should be sufficient to only test for start
   and end of the status string to be correct.
2017-01-26 12:48:50 +00:00
0f2083db62 [UI] [Core] Convert to session_stats_alert for session status
* Use session disk stats for cache status
2017-01-26 12:48:50 +00:00
3ed7202253 [Core] Remove deprecated lt torrent priority 2017-01-26 12:48:43 +00:00
089c0be89b [Core] Replace deprecated lt.fingerprint with peer_fingerprint setting 2017-01-25 12:35:33 +00:00
fc902af10c [Core] Remove all lt 1.1 deprecated code references 2017-01-18 14:19:37 +00:00
a481c4d243 [UI] Update UIs for new default piece priority
- libtorrent 1.1 changes default piece priorty to 4 so changes to
   the UIs are required. Some refactoring and improvements were made as well:

    - A new 'Low' priority introduced that is values 1-3.
    - 'Normal' priority is now value 4.
    - Removed 'Highest' with the addition of 'Low' and 'High' is now values 5-7.
    - Renamed 'Do not download' to 'Ignore' so it is more succinct.
    - Moved file priority constant to ui.common.
2017-01-18 12:33:27 +00:00
bb44411a50 [Core] Check valid torrent first in alert handlers 2017-01-18 12:33:26 +00:00
1e4a24c474 [Docs] Fix docstring return type format in config.py
* With new version of Sphinx 1.5 the warning below was generated, caused
   by incorrect formatting of return type in docstring.

     docstring of deluge.config.find_json_objects:None:
     WARNING: more than one target found for cross-reference u'start'
2017-01-12 11:13:28 +00:00
993a0f71af [UI] Fix usage of 'with Image.open' in tracker_icons
* Revert changes made to fix 'too many files open' as Image.open does
      not return a file descriptor and generated the following error:

          exceptions.AttributeError: 'NoneType' object has no attribute 'startswith'
2017-01-12 10:11:08 +00:00
283ad6137d Fix isfile() typo in setup.py 2017-01-09 18:02:28 +00:00
6743b0c813 [Core] Relocate add_torrent_alert to alerts section 2016-11-30 23:21:46 +00:00
b69ba02652 [Core] Refactor default add torrent flags into a constant 2016-11-30 23:21:45 +00:00
915f2bf9e7 [Core] Move alert logging to alertmanager 2016-11-30 22:53:18 +00:00
59b01b363c [Core] Refactor TM register of alert and set funcs 2016-11-30 22:53:18 +00:00
c5e623ae45 [Core] Refactor of priorities code and test 2016-11-30 22:53:18 +00:00
425af00ebf [GTKUI] Fix the translation of tracker status 2016-11-30 20:43:34 +00:00
373c8a14b0 [WebUI] Remove duplicated translation code 2016-11-30 20:43:29 +00:00
5f4a16630e Fix a typo in minify script 2016-11-28 19:20:05 +00:00
3260db416a [Core] Add a quick fix for lt1.1 default priority change 2016-11-28 19:18:48 +00:00
9cefbc6e5d [Setup] Refactor BuildWebUI class 2016-11-28 18:59:25 +00:00
14a5156e15 [Setup] Move package variables to top of file
- Refactor _data_files list so icons paths are auto-generated.
2016-11-28 18:58:45 +00:00
259c9f11e6 [Setup] Rearrange order of some classes 2016-11-28 17:44:22 +00:00
fd1261ab65 [Setup] Create a CleanTranslations class 2016-11-28 17:44:20 +00:00
37d9e1f8fe [UI] Move and rename util/lang to translations_util
- The name needed to be more descriptive of it's function.
 - Moved into ui directory because of upcoming  changes being made to setup.py
   meant it would be easier to include all the 'common' ui files if there
   are no sub-dirs such as 'util'.
2016-11-28 17:41:56 +00:00
a924cb73b0 [Setup] Fix wording and syntax in descriptions 2016-11-28 13:00:24 +00:00
3cbafec68d [Setup] Move deluge egg-info clean to Clean 2016-11-28 13:00:09 +00:00
a48c01c3a5 Cleanup up minify js script
- The slimit package is now widely available so make the script
   only rely on it and closure. Keeping closure as it makes the most
   compact and lints the javascript but it is not as easy to install
   as slimit.
2016-11-28 12:59:03 +00:00
7468078b71 [Setup] Add a CleanDocs class 2016-11-28 12:58:34 +00:00
98add5fecd [Lint] Fix issues raised by minify script 2016-11-28 12:58:27 +00:00
5e1603317a Revert "Rename version.py to calc_version.py to fix buildd error"
This reverts commit 943a9ded00.
2016-11-26 19:35:53 +00:00
943a9ded00 Rename version.py to calc_version.py to fix buildd error
- There is a version.py included with buildd that is conflicting
   with the deluge one. Rather than messing with sys.path it is
   simplest to rename version.py to calc_version.py
2016-11-26 17:51:07 +00:00
04370b38ec Revert "[Setup] Fix buildd error with version.py import"
This reverts commit 3aff57600f.
2016-11-26 17:10:13 +00:00
3aff57600f [Setup] Fix buildd error with version.py import
- The deb buildd command also has a version.py so need to use relative import
   to specify that we really mean deluge supplied version.py.
2016-11-26 16:36:31 +00:00
874249655d [Tests] Replace isort test with flake8-isort
* Move the known_third_party back to setup.cfg with comments.
2016-11-25 12:43:50 +00:00
7ebd69218f [Common] Fix is_ipv6 when using ipaddress module
* The ipaddress module require unicode string for 'packed' addresses.
 * Also include minor corrections to the tests.
2016-11-23 11:04:12 +00:00
0edebda1c7 [WebUI] Log correct http address if listening on IPv6 2016-11-22 22:07:03 +00:00
7283e8b668 [Core] Deprecate prioritize_first_last for prioritize_first_last_pieces 2016-11-22 20:45:58 +00:00
f3f380553a [Core] Fix KeyError if only file_priorities in options 2016-11-22 20:45:57 +00:00
4a9d2d2129 [Core] Decorate methods deprecated 2016-11-22 20:45:57 +00:00
cf343c21a8 [Base] Add new deprecated decorator 2016-11-22 20:45:57 +00:00
179de3b0ff [#495] Deprecate core.set_torrent_* for core.set_torrent_options 2016-11-22 20:45:57 +00:00
720d113a9a [GTKUI] Fix typo in About dialog if-statement 2016-11-21 21:47:07 +00:00
59c9584fe0 [GTKUI] Revert use of non-existent mainwindow.get_window method 2016-11-19 10:36:51 +00:00
674610ef7d [GTKUI] Use get_window for GdkWindow instead of attribute 2016-11-19 10:32:31 +00:00
b8135617ae Revert "[GTKUI] Add MainWindow.get_window() and replace window attr usage"
Made a mistake with types of window, get_window actually refers to GdkWindow
rather than GtkWindow... The use of self.window.window is confusing and is
still deprecated in Gtk3 so will fix that in following commit.

This reverts commit ccfe6b3c80.
2016-11-19 10:27:34 +00:00
6ac296118d [GTKUI] Replace decode_string with decode(utf-8)
* We know that GTK widgets will return utf-8 encoded so no need to decode_string.
2016-11-17 12:33:23 +00:00
ecf9822ac0 [Docs] Fix example and param notation in reST docstrings
* For future parsing into other docstring styles.
2016-11-17 12:33:23 +00:00
c1249a2f3a [GTKUI] Switch to non-deprecated GTK methods 2016-11-17 12:33:23 +00:00
36cbfa8c61 [Lint] Fix files to pass Flake8 v3.2.0 2016-11-17 12:19:41 +00:00
2657cc3921 [Lint] Quote cleanup 2016-11-17 10:19:59 +00:00
441861786b [GTKUI] Add decode_string to column name comparison
* Strings from GTK are returned utf8 encoded so require decoding if
   comparing with unicode strings passed around in python code.
2016-11-11 22:22:50 +00:00
0cdf0230e9 [GTKUI] Refactor gtk imports and code
* Where possible use 'from gtk import ...', i.e. if repeated often or under 10 individual imports.
 * Remove osx_check to not show svg. It's only an issue on Windows so should work fine...
 * Rearrange and deduplicate code into d.u.g.common for getting pixbuf from files.
 * Use 'from gtk.gdk import...' to make it cleaner to apply GTK3 changes in future.
 * Move generic icon code from torrent_data_funcs to common.
 * Fix pylint import warnings and add WindowsError to pylintrc file.
2016-11-11 22:21:51 +00:00
c8e6a4476d [GTKUI] Another update of methods to latest GTK2 API 2.24
* These updates make the code more compatible with GTK3
2016-11-11 14:08:25 +00:00
ccfe6b3c80 [GTKUI] Add MainWindow.get_window() and replace window attr usage
* In GTK3 the use of `window` attribute is no longer valid so need to
   use get_window(). This updates MainWindow to follow the same convention.
2016-11-11 14:08:25 +00:00
86549eb3ee [GTKUI] Cleanup references to MainWindow 2016-11-11 14:08:25 +00:00
243004c551 [GTKUI] Remove About dialog unneeded url_hook
* This is removed in Gtk3 and clicking url in Gtk2 still works.
2016-11-11 14:08:25 +00:00
8ba8aec277 [GTKUI] Listview use lambda func for set_default_sort_func
* gi complains about `None` value being passed to set_default_sort_func
   so for compatibility use lamba func that does nothing.

   There is an unanswered question on SO about how to set the default func to None in gi:
   http://stackoverflow.com/questions/20940324/how-to-remove-the-default-sort-function-from-a-treesortable
2016-11-11 14:08:25 +00:00
a5b07aa4ef [GTKUI] Update methods to latest GTK2 API 2.24 2016-11-11 14:08:24 +00:00
c619674cf9 [GTKUI] Import gobject module names directly 2016-11-11 14:08:24 +00:00
52d591c83b [GTKUI] Remove unneeded pygtk requires check 2016-11-11 14:08:24 +00:00
4313974f07 [Lang] Add fallback dll for Windows libintl 2016-11-11 14:08:24 +00:00
bde13515e6 [Common] Only attempt dbus import on non-Win/OSX 2016-11-11 14:08:24 +00:00
93ab2445a1 [GTKUI] Update version string in ui files 2016-11-09 15:01:44 +00:00
eea3cb0553 [GTKUI] Tweak spacing of main window tabs 2016-11-08 21:09:01 +00:00
6bd3c6fa88 [#2922] [Core] Fix using incorrect type for peer_tos in lt 1.1 2016-11-08 20:25:16 +00:00
b6e2ec3a3c [Core] Remove redundant utf8 encoding
* Should only be encoding in config.py and this is already occurs.
2016-11-08 20:16:59 +00:00
bbe9de9463 [Core] Disable apply_settings for enc policy until fix can be found 2016-11-06 00:14:07 +00:00
2bdbcf9a39 [#2922] Fix interfaces and outgoing ports for lt 1.1 2016-11-05 23:30:01 +00:00
fd80ed75fe [#2922] Fix proxy settings and torrent status for lt 1.1 2016-11-05 15:49:39 +00:00
0890cc1a33 [#2922] Fix session.apply_sessings alert_mask 2016-11-05 11:30:31 +00:00
e31acfc31c [GTKUI] Restart application when switching modes 2016-11-04 23:54:46 +00:00
d0d070aaf0 [Lint] Fix flake8 2016-11-04 23:54:23 +00:00
1e41891943 [Oops] Bugfix for previous commit: e37c817 2016-11-04 18:07:59 +00:00
e37c817151 [Lint] Refactor flake8 noqa's and add msg numbers
From pep8-naming:
 * N802: function name should be lowercase
 * N803: argument name should be lowercase
2016-11-04 18:03:21 +00:00
af6b277d28 [Lint] Add flake8-quotes to tox and fix bad quotes 2016-11-04 00:10:23 +00:00
3a2ff0c188 [Lint] Convert all python double quotes to single quotes
* A rather disruptive change but for a few reasons such as easier to read,
   easier type, keep consistent and javascript code uses single quotes.
 * There are a few exceptions for the automated process:
    * Any double quotes in comments
    * Triple double quotes for docstrings
    * Strings containing single quotes are left e.g. "they're"

 * To deal with merge conflicts from feature branches it is best to follow
   these steps for each commit:
     * Create a patch: `git format-patch -1 <sha1>`
     * Edit the patch and replace double quotes with single except those in
       comments or strings containing an unescaped apostrophe.
     * Check the patch `git apply --check <patchfile>` and fix any remaining
       issues if it outputs an error.
     * Apply the patch `git am < <patchfile>`
2016-11-03 21:45:45 +00:00
d4a8a38586 [Core] Refactor out duplicate prefsmgr log lines 2016-11-03 12:05:55 +00:00
a87ce825ad [Core] Remove old geoip.dat code and fix log line 2016-11-03 11:37:20 +00:00
ac011d7f55 [Tests] Remove deprecated pip cache setting from travis config 2016-11-03 10:45:01 +00:00
03c7a2b108 [Common] Refactor unit functions 2016-11-03 10:45:01 +00:00
ca83ed79c5 [Lint] Pylint enable simple-if-statement 2016-11-03 10:45:01 +00:00
54685226c4 [Tests] Remove redundant pillow dep from tox 2016-11-03 10:45:01 +00:00
61b059f015 [Lint] Fix couple of pylint complaints 2016-11-03 10:45:01 +00:00
f96b9c8a23 [Lint] Enable pylint warning super-init-not-called 2016-11-03 10:45:00 +00:00
d8242b4ef0 [Lint] Replace R with actual symbols in Pylint rcfile 2016-11-03 10:45:00 +00:00
f664fcb7a6 [Lint] Update pylint rcfile
* Merge in pylint 1.6.4 rcfile changes.
 * Add future_builtins to redefined-builtins-modules ignore list. (should be pylint default!)
	- Removed pylint disable comments from files.
 * Rearrange disable section, comments must be at start of line but can be
   interspersed to highlight categories.
 * Conventions enabled:
	wrong-import-position
	wrong-import-order
2016-11-03 10:45:00 +00:00
5c7a4549f7 [Tests] Add pillow dep so pylint parses Win32IconImagePlugin 2016-11-03 10:45:00 +00:00
a04718ebe5 [#2797][Lint] Enable no-init pylint warning 2016-11-03 10:44:48 +00:00
59d8fc9a14 [Lint] Fix pylint warnings 2016-11-03 10:31:38 +00:00
a438f13647 Rename classic to standalone 2016-11-02 23:14:05 +00:00
23ba57313a [Core] Support new libtorrent 1.1 alert and status attributes
* Keep deprecated lt attribute support for the interim.
2016-11-02 22:08:28 +00:00
7f24a1a42d [Core] Add support for new lt settings_pack 2016-11-02 22:08:21 +00:00
05566894ad [Core] [UI] Remove deprecated lt extensions
* These extensions have been deprecated in 1.1 so simply remove usage.
2016-11-02 21:55:53 +00:00
4dc59b5255 [Core] Remove compact allocation references
* This has been removed from lt 1.1 so no longer relevant.
2016-11-02 21:55:24 +00:00
08192033fb [GTKUI] Refactor piecesbar code 2016-11-01 14:27:50 +00:00
2f4cb0156c [Tests] Fix for isort config package handling
* Force gtk modules to be third_party for tox/travis testing.
2016-11-01 14:04:14 +00:00
e26a3dc0e7 [Tests] Move test torrents into data subdir 2016-11-01 12:28:08 +00:00
e827420569 [Tests] Increase file descriptor limit
Increase the file descriptor limit to avoid 'Too many files open'
error when running tests.
2016-11-01 12:28:08 +00:00
e379e035c7 [#2849] Fix WebUI error without translation MO file 2016-11-01 12:05:36 +00:00
6de2813c3d [#2784] Fix typo in bugfix 5f92810f 2016-11-01 11:57:11 +00:00
20bae1bf90 [Console] Rewrite of the console code
This commit is a rewrite of larger parts of the console code. The
motivation behind the rewrite is to cleanup the code and reduce code
duplication to make it easier to understand and modify, and allow any
form of code reuse. Most changes are to the interactive console, but
also to how the different modes (BaseMode subclasses) are used and set
up.

* Address [#2097] - Improve match_torrent search match:
  Instead of matching e.g. torrent name with name.startswith(pattern)
  now check for asterix at beginning and end of pattern and search
  with startswith, endswith or __contains__ according to the pattern.

Various smaller fixes:
* Add errback handler to connection failed
* Fix cmd line console mixing str and unicode input
* Fix handling delete backwards with ALT+Backspace
* Fix handling resizing of message popups
* Fix docs generation warnings
* Lets not stop the reactor on exception in basemode..
* Markup for translation arg help strings

* Main functionality improvements:
 - Add support for indentation in formatting code in popup messages (like help)
 - Add filter sidebar
 - Add ComboBox and UI language selection
 - Add columnsview to allow rearranging the torrentlist columns
   and changing column widths.
 - Removed Columns pane in preferences as columnsview.py is sufficient
 - Remove torrent info panel (short cut 'i') as the torrent detail view
   is sufficient

* Cleanups and code restructuring
  - Made BaseModes subclass of Component
  - Rewrite of most of basic window/panel to allow easier code reuse
  - Implemented better handling of multple popups by stacking popups. This
    makes it easier to return to previous popup when opening multiple popups.

* Refactured console code:
  - modes/ for the different modes
    - Renamed Legacy mode to CmdLine
    - Renamed alltorrent.py to torrentlist.py and split the code into
      - torrentlist/columnsview.py
      - torrentlist/torrentsview.py
      - torrentlist/search_mode.py (minor mode)
      - torrentlist/queue_mode.py (minor mode)
  - cmdline/ for cmd line commands
  - utils/ for utility files
  - widgets/ for reusable GUI widgets
    - fields.py: Base widgets like TextInput, SelectInput, ComboInput
    - popup.py: Popup windows
    - inputpane.py: The BaseInputPane used to manage multiple base widgets in a panel
	- window.py: The BaseWindow used by all panels needing a curses screen
    - sidebar.py: The Sidebar panel
    - statusbars.py: The statusbars
  - Moved option parsing code from main.py to parser.py
2016-10-30 12:45:04 +00:00
2f8b4732b4 [#2838] [Console] Fix formatting on 'Moving' color 2016-10-30 12:45:03 +00:00
79c59a2b1e [#2099] [Console] Fix: console does not support monochrome terminals
When a terminal does not support colors we invert the
default color pair white,black to indicate selection with
white background and black foreground
2016-10-30 12:45:03 +00:00
51c44a7c5a [Console] Remove the delay after pressing ESC key
The env variable ESCDELAY specifies the time in ms which ncurses waits
for a character sequence. With a default value of 1000, it produces a
1 second delay when pressing the ESC key to close dialogs.

Set this variable to 0 to get instant respons when pressing ESC.
2016-10-30 12:45:03 +00:00
64da09675e [#1119] [Console] ignore logging when no file specified
Add wrapper around the stream passed to the loggers streamhandler
when no log file is specified. Console in interactive mode now
ignores the log output with no logfile specified.
2016-10-30 12:45:02 +00:00
82fd5e6e8a [UI] Fix sorting in ui/util/lang.py.get_languages() 2016-10-30 12:45:02 +00:00
1e183a3258 [UI] Add gettext.ngettext to __builtin__.__dict__
Handle plurality with getttext using ngettext. Added to
__builtin__.__dict__ as _n
2016-10-30 12:45:02 +00:00
891209d925 [Common] Add overrides function decorator 2016-10-30 12:45:02 +00:00
4d3cf756e4 [#2914] Fix: Specifying file version for default config 2016-10-30 12:45:02 +00:00
27c87d56bb [Config] Sort the json keys in conf files 2016-10-29 13:26:56 +01:00
72c588ad33 [WebUI] Modify UI to display single incoming port 2016-10-28 16:01:18 +01:00
41fed16d08 [#2900] Fix Error loading torrent: invalid bencoded value
* Testing the torrent with other bencode libs doesn't raise exceptions
   so just revert the 'small fix' applied in b193d87499.
 * Add BTFailure exception so bdecode issue can be caught in deluge code.
2016-10-28 14:43:06 +01:00
5607bb3d61 [GTKUI] Move Tab data funcs to new common file 2016-10-27 23:10:27 +01:00
fab0af1b40 [Oops] Remove introduced dead code by prev commit 2016-10-27 22:33:17 +01:00
b5afe90764 [GTKUI] Rearrange items in the UI tabs
* Move Private label to Trackers Tab.
 * Move Owner to Options Tab with a future plan for a dropdown box
   to change ownership.
 * Put the torrent status message into the progress bar.
 * Remove duplicate Shared label in Details Tab.
 * Details Tab allow more horizontal room for long folder paths
   and fix horizontal scrolling.
2016-10-27 22:19:00 +01:00
fef160e7a7 [Common] Use log.warning instead of error for download failure 2016-10-27 22:17:29 +01:00
e408dc14cc [#2417] [GTKUI] Add Last Active and modify layout of Status & Details Tabs 2016-10-27 13:11:50 +01:00
257c31c05f [#2846] Fix splitting IPv6 from external IP alert message 2016-10-26 23:26:01 +01:00
3f72905b3f Revert "[Py2to3] Clean-up the use of keys() on dictionary objects."
This reverts commit 8b50f3cdbd.
2016-10-26 19:14:10 +01:00
c4282f29ab [GtkUI] Refactor out duplicate code in piecesbar draw pieces 2016-10-26 10:50:22 +01:00
642913b0f8 Revert "[Py2to3] Replace iteritems and itervalues"
This reverts commit 7ad8a3cbb5.
2016-10-26 10:49:41 +01:00
2c3887ece9 [Py2to3] Use open() instead of file() 2016-10-26 09:58:44 +01:00
9fab98a6ce [Py2to3] Passes libfuturize.fixes.fix_division_safe 2016-10-26 09:58:44 +01:00
81334389a9 [Tests] Fix tests to run on Twisted < 13
* Also includes pylint fixes for W0233(non-parent-init-called)
 * Remove failing openbittorent icon test
2016-10-26 09:58:43 +01:00
d579efa041 [Lint] Fix various pylint warnings and fixup code
* Use print function
 * Fix except as statements
 * Remove old twisted 8 code
 * Remove empty docstring
 * Refactor try statement to only contain the relevant import and
   disable pylint import msgs.
 * Use flake8 noqa and pylint comment and drop pyflakes workarounds.
2016-10-26 09:58:43 +01:00
da4b2b4849 [Py2to3] Make VersionSplit Python 3 compatible.
The builtin cmp() and the __cmp__() special method is no longer used in Python 3, instead we use functools.total_ordering decorator and the __lt__/__eq__ special methods to get the same effect.
2016-10-26 09:58:43 +01:00
da51e3a3d5 [Py2to3] A group of small compatiblity code changes
* Replace the uses of long with int.
 * Replace im_func with __func__ as it has been provided for Python 3 forward-compatibility.
 * Fix next/__next__ for Python 3 compatibility.
 * Remove the long number literal
 * Ensure freespace() returns int
2016-10-26 09:58:43 +01:00
837dae242c [Py2to3] Use future_builtins zip instead of izip for Py3 compat 2016-10-26 09:57:18 +01:00
7ad8a3cbb5 [Py2to3] Replace iteritems and itervalues
* Replace the use of iteritems() and itervalues() on dictionary objects
   with items() and values() respectively for Python 3 compatibility.
2016-10-26 09:53:32 +01:00
8b50f3cdbd [Py2to3] Clean-up the use of keys() on dictionary objects.
To make the code more Python 3 compatible, I've made a few changes to how we handle keys() or iterkeys() calls on dictionaries. All functionality should remain the same.

 * Remove the use of .keys() or .iterkeys() when iterating through a dictionary.
 * Remove the use of .keys() when checking if key exists in dictionary.
 * Replace dict.keys() with list(dict) to obtain a list of dictionary keys. In Python 3 dict.keys() returns a dict_keys object, not a list.
2016-10-26 09:53:32 +01:00
16da4d851e [#2850] Fix duplicate ui log entries 2016-10-25 23:22:06 +01:00
a5bc73f0b3 [GTKUI] Use less verbose units to improve look and gain physical space
* Use markup in gtkui to reduce font size of displayed units.
 * Reduced statusbar item sizes using markup and <small> tag. Provides an
   interim solution to #1326 and has reduced width from 930px to ~600px.
 * Integer value for Progress bar value in Peers and Files Tabs.
 * Remove trailing zeros for Pieces size in Details Tab.
 * Change position of Share Ratio in Status Tab.
 * Increase minimum width of column from 10px to 20px for listview.
 * Use shortform units e.g. Columns, Title speed, Status tab, Status bar.
 * Use less precision displaying values in columns.
2016-10-25 23:22:06 +01:00
258ad95b7a [Common] Enable use of precision and shortform units in unit funcs
* Also fixes #2562; add TiB unit.
2016-10-25 23:21:18 +01:00
75714b60ca [Docs] Clean module sources dir before generating docs
If old and outdated sources are present in docs/sources/modules,
python setup.py build_docs will fail to generate docs.
2016-10-21 10:36:24 +01:00
ca7cbd291f [#2861] [Core] Switch to using python-geoip for geoip lookups
* libtorrent >= 1.1 dropped support for GeoIP so this adds support
   again using MaxMind GeoIP Legacy Python Extension API.
   For reference it is known by the following package names:
       * Maxmind: geoip-api-python
       * Linux: python-geoip
       * PyPi: GeoIP
2016-10-21 10:30:52 +01:00
d77666cd3e [GTKUI] Tidyup to use more width and no eol backslashes 2016-10-21 10:11:08 +01:00
1755347878 [GTKUI] [Console] Modify UIs to display single incoming port 2016-10-21 10:11:08 +01:00
5978b433d3 [Core] Listening ports fixes and updates
* #2133 Add flags for port reuse and disable binding to system port.
 * #2122 For random port, use single port and store it for reuse.
 * #2343 Fix 'Invalid Arg' from listen_on, likely due to whitespace as interface value.
 * Consolidate listen_on and outgoing_port into single '__set...' methods.
2016-10-20 10:57:03 +01:00
37baf3de3c [#2875][Web] Fix: WebUI Json dumps Error 2016-10-19 10:47:41 +02:00
cfdddc4469 [Web][Tests] Refactor web tests 2016-10-19 10:47:37 +02:00
d505ebe926 [Tests] Use common.rpath() in all tests 2016-10-18 21:26:36 +01:00
c8a3fd72d4 [Tests] Improve UI entry script tests
* Added parameter log.setup_logger to prevent output noise in unit tests
2016-10-18 21:26:22 +01:00
9788ca08ea [GTKUI] Autofill infohash entry from clipboard
* Create new common.is_infohash func and test.
2016-10-18 19:22:59 +01:00
b4787235b5 [#2901] [GTKUI] Strip whitespace from infohash entry before checks
* Copy-pasting from web page can include extra space at end of string.
 * Also make minor change to populate the magnet name with infohash
   for nicer UI display.
2016-10-18 18:58:49 +01:00
9dd3b1617d [#2889] Fixes for 'Too many files open' error
* Ensure all file descriptors are closed. Using the with statement ensures
   closure.
 * The main problem was with thousands of unclosed file desciptors from
   tracker_icons mkstemp.
 * Use a prefix 'deluge_ticon.' to identify created tracker_icon tmp files.
2016-10-18 18:40:25 +01:00
58835eeb2e Refactor daemon check process functions 2016-10-18 18:22:31 +01:00
3a8ed2e9cb [Core] Change deprecated lt.version to lt.__version__ 2016-10-17 12:40:28 +01:00
6b630c9fd2 [GtkUI] Fix ZeroDivisionError in piecesbar
While waiting for metadata for a magnet, self.__num_pieces is zero.
2016-10-10 18:58:28 +01:00
db1b427b3f [Tests] Fix flake8 v3 searching .tox dir 2016-10-10 18:46:09 +01:00
aa164cdbce [Core] Fix AttributeError for removed load_country_db method in lt 1.1.1 2016-09-28 10:32:35 +01:00
9c27ed29ae [#2768] [GTKUI] [OSX] Fix invalid file error at startup
When installed to the system, not using .app, error is raised on startup
as nsapp_open_file is ignoring Deluge-bin but not deluge or deluge-gtk for
potential 'filename' when connecting NSApplicationOpenFile.
2016-07-21 00:29:14 +01:00
d2385e9c75 [#2857] [Notification] Fix issues with SMTP port input 2016-07-19 15:14:47 +01:00
01d27e22f8 [#2855] [WebUI] Unable to add UDP trackers 2016-07-19 11:49:00 +01:00
abf90f1dd6 [#2784] [Execute] Escape ampersand in args for Windows
Due to the nature of passing a command and args to cmd.exe and then
to a batch file in Windows any ampersands in execute args need to be
double-escaped so prefixing with tripe-caret (^^^&) is the fix for this.
2016-06-29 23:24:23 +01:00
53215d87ee [#2077] [Extractor] Ignore the remaining rar part files
* Bump version to 0.6
2016-06-10 15:33:04 +01:00
2d5dce4954 [#2785] [Extractor] Fix successful claimed extract leaving empty folder
* The main fix here is adding os.environ to the command call otherwise in some configurations
   the extraction would fail. Was unable to reproduce locally but users confirm this fix works.
 * Refactored the code to properly report errors if the extract command fails along with actual
   command output.
 * Bump version to 0.5.
2016-06-10 15:30:52 +01:00
7e229ceb2f [Tests] Combine echo lines into python cmd for tox docs 2016-05-25 11:06:48 +01:00
2a8388d262 [UI] Fix translation setup in console
Console was incorrectly setting up pygtk translation
2016-05-24 23:59:22 +01:00
4751b33d0c [Console] Fix to console argument parsing
When starting console with './deluge-console', providing
loggin level '-L info' would fail to parse as it identified
'info' as a subcommand.
2016-05-24 23:59:22 +01:00
98eb810f89 [Docs] Minor tidyup of docstrings 2016-05-24 23:53:37 +01:00
7c07001bdc [Docs] Make tox -e docs fail on sphinx warnings
* Also cleanup isort command
2016-05-24 23:53:37 +01:00
a81f17a802 [Tests] Improve test docs 2016-05-24 23:53:14 +01:00
dbadb9b0a6 [Core] Fix core.remove_torrents return value on error 2016-05-24 23:52:24 +01:00
c204b63653 [Docs] Make tox -e docs fail on sphinx warnings
* Also cleanup isort command
2016-05-24 21:10:53 +02:00
48240db813 [Docs] Fix docs in maketorrent.py 2016-05-24 21:10:53 +02:00
94a9f17838 [Tests] Improve test docs 2016-05-24 21:10:53 +02:00
5ca7bb365e [Tests] Use tests/common.todo_test to mark tests for TODO 2016-05-24 21:10:52 +02:00
260268f62b [Tests] Inherit from BaseTestCase in testcases
* Testcases in test_torrent.py and test_torrentmanager.py creates
  components and should therefore inherit from BaseTestCase.
* Cleanup in test_json_api.py
2016-05-24 21:10:52 +02:00
a8dac9bd3a [Base] [Tests] Add more component tests 2016-05-24 21:10:52 +02:00
d1acd964a5 [Base] Fix Component docs 2016-05-24 21:10:52 +02:00
5e493f2d3f [UI] Use a shared DEFAULT_HOSTS dict in ui/common
Instead of defining a DEFAULT_HOSTS dict for each UI
use a shared dict.
2016-05-24 21:10:52 +02:00
d65ebb80c6 [UI] Reduce ui.client log verbosity 2016-05-24 21:10:52 +02:00
b9f3f549a1 [UI] Add __contains__ to deluge/ui/coreconfig.py 2016-05-24 21:10:52 +02:00
67cefb1211 [Core] Add finished_time to torrent status 2016-05-24 21:10:52 +02:00
14b576e411 [Core] Fix core.remove_torrents return value on error 2016-05-24 21:10:52 +02:00
43edea01b7 [Console] Queue prefs updated 2016-05-23 15:31:23 +01:00
262c8d71d5 [WebUI] Queue prefs updated 2016-05-23 15:19:58 +01:00
80ee713893 [#2520] [GTKUI] Queue preferences page reworked 2016-05-23 15:19:20 +01:00
3837a2c5d6 [WebUI] Constrain dialogs to browser window 2016-05-23 15:18:34 +01:00
dc56e4557b [WebUI] Create more space by removing headers from Prefs dialogs 2016-05-23 15:05:51 +01:00
717ceee0ea [Tests] Update comments in tox.ini 2016-05-22 12:43:07 +01:00
5713ff09f4 [Docs] Autogenerate module docs with apidoc
* Add sphinx-apidoc to setup.py build_docs
2016-05-22 12:11:41 +01:00
b6b1d40516 [Tox] [Travis] Fixes to test config 2016-05-22 12:11:41 +01:00
152eaa10dd [Console] Fix bug when parsing UI commands
Command line arguments like "-L info" were incorrectly
identified as console subcommands which caused parsing
to fail.
2016-05-22 02:57:40 +02:00
d689ad72e8 [UI] [#1973] Improve passing extra args to UIs
Current solution for passing arguments to UI when invoking deluge
entry script is to select an UI with the --ui option and supply quoted
arguments with the --args option.

This patch cleans this up by removing both options and change to using
subparsers for valid UIs. All command line options are now parsed
directly by the child UI which is chosen by a positional argument,
i.e. the UI name.

The help text now also shows the current default UI.
2016-05-21 15:05:01 +01:00
d6fec88932 [UI] Move Gtk console entry point class to __init__
To avoid unnecessarily importing modules from gtkui.py, move Gtk
console entry point class to __init__.py. This reduces load time
when showing help (deluge -h) with many hundred miliseconds

Also cleanup unnecessary WebUI code.
2016-05-21 15:04:59 +01:00
fd9e68e7e7 [Tests] Place logfiles from py.test run in _pytest_temp 2016-05-19 22:20:28 +01:00
6971e08b0d [#2828] [Packaging] Fix ImportError with setuptools version > 18.8 2016-05-19 17:21:19 +01:00
cea50f319d [WebUI] Print error if minify script encounters error with closure 2016-05-19 15:47:15 +01:00
6ce9f77e17 [WebUI] Handle missing script files and fallback to available files
* To help user's encountering a blank web page, log warnings if script
files for a selected mode are missing and attempt to fallback to a working mode.
 * There is no logging for dev version detection to prevent spamming output.
 * Add slimit dependency to tox
2016-05-19 15:24:37 +01:00
0f43b564c9 [WebUI] Add WebUI build class to setup.py for minifing javascript 2016-05-19 15:22:45 +01:00
6bf906a849 [Lint] Use a shorter line length for isort 2016-05-18 10:55:01 +01:00
983ee7b973 [Tests] Raise minimum isort version to 4.2.5
The use of 'isort:imports-firstparty' in gtkui.py requires version >=4.2.5
2016-05-18 10:03:06 +01:00
bd7d10b81e [Lint] [WebUI] Fix issues raised by closure 2016-05-18 09:53:09 +01:00
876e70d85f [WebUI] Remove margins from main window elements 2016-05-16 13:44:00 +01:00
590f077963 [WebUI] Tidyup Add dialog margins 2016-05-16 13:27:00 +01:00
2aa1ab2f2b [WebUI] Revert broken refactor of theme css
By combining the background-* css styles into background it overrides background
settings in ext-all-notheme.css resulting in incorrect placement of grid header gif.
2016-05-16 12:37:08 +01:00
2e08599f82 [WebUI] Disable disabling WebUi plugin in WebUI 2016-05-16 12:37:08 +01:00
b450739333 [WebUI] Remove border in Prefs for cleaner look 2016-05-16 12:37:08 +01:00
e330ff0299 [WebUI] Tidyup prefs plugins details 2016-05-16 12:37:08 +01:00
6c233da2ff [WebUI] Case-insensitive sort for plugins list 2016-05-16 12:37:08 +01:00
fa309d0d18 [WebUI] Refactor json_api._get_host 2016-05-16 12:37:07 +01:00
9f187ed027 [WebUI] Add missing deregister event handlers 2016-05-15 21:30:25 +01:00
42e5876ebe [#2293] [WebUI] Fix plugins not loading when using WebUI plugin
- Any plugins that were started before the WebUI plugin would not be loaded
   upon starting the web server and would be not show up. The fix is to use
   web.pluginmanager.start to get all enabled plugins from core.
 - Update log message output for enable/disable in pluginmanager
2016-05-15 21:20:27 +01:00
46b726a4e0 [WebUI] Fix prefs plugins page not listing enabled plugins correctly
This fixes the display of which plugins are currently running. The old
code was returned a list of enabled plugins containing WebUI code so
switched to calling the entire list of a plugins from core.

Also updated the docstring in json api to reflect actual usage.
2016-05-15 21:18:16 +01:00
0278e782e0 [#2490] Add external IP to statusbar 2016-05-14 12:29:53 +01:00
bf8f71f215 [WebUI] Update gettext script to find any missed marked-up text
Added a new function to the gettext script that will check common
extjs attributes for missing markup text strings and print the result.
2016-05-14 11:16:28 +01:00
9adc9f886c [WebUI] Add missing translation markup 2016-05-14 11:14:17 +01:00
50d504a38f [AutoAdd] Fix watch dir not accepting uppercase file extension
- Auto-add feature will now accept torrents when the .torrent extension
   has capital letters in it
2016-05-12 17:41:07 +01:00
c2d7f3c653 [#2795] [GTKUI] Reduce height of Add Torrent Dialog
- Reduced height from 575px to 495px
 - Low resolution screen users (600px high) will be unable to click
the add button with a dialog height of >550px. Keeping the height
to less than 500px leaves more room for large size themes.
2016-05-10 15:11:10 +01:00
9e92178357 [GTKUI] Fix Add Dialog tooltip text needing escaped
- An ampersand in torrent name would cause the tooltip to not be
displayed.
 - Also switched from cgi to xml.sax for escaping.
2016-05-10 15:11:03 +01:00
42c3580bf2 [Lint] [Plugins] Fix all pylint issues 2016-05-09 22:11:14 +01:00
9237c931b2 [Lint] Update pylint to only allow LF line ending 2016-05-09 20:10:51 +01:00
1a62e00066 [Lint] Add Plugins and scripts to tox pylint 2016-05-09 20:10:51 +01:00
803d94c8ac Remove old wiki_docgen script 2016-05-09 20:10:51 +01:00
ac2bbd68db [Tests] Remove flake8 complextity from travis run 2016-05-09 20:10:51 +01:00
8160cef2b3 [Lint] Enable pylint 'not-callable' 2016-05-09 20:10:51 +01:00
c7fd8f5116 [Lint] Fix redefining filename in script 2016-05-09 20:10:51 +01:00
618d2f9f58 [Lint] Enable pylint 'bad-continuation' and fix issues
There is some discrepency between pep8 and pylint for line
continuation (https://github.com/PyCQA/pylint/issues/747) but
with some minor layout changes both can pass and code looks fine,
if not better in places.
2016-05-09 20:10:51 +01:00
807d7a7aaf [Lint] Fix pylint msg for rencode 2016-05-09 19:52:47 +01:00
416fb5e1e3 [#2832] [UI] Skip blank lines in auth file 2016-05-09 16:39:10 +01:00
1fb9960168 [Base] Updated fix for missing trace with new twisted logger
Includes a commented out test to replicate the issue.
2016-05-09 13:57:54 +01:00
919e41f55e [Lint] [GTKUI] Apply isort fix for fixed placement imports
This solves the requirement for deluge imports to be placed after
installing the twisted reactor.
2016-05-09 09:44:30 +01:00
616523c732 [rencode] Update module to v1.0.4 2016-05-09 09:27:50 +01:00
bb0e699619 [UI] Add tests for ui_entry 2016-05-08 12:00:44 +01:00
d5294d5733 [Tests] Fix json_api AlreadyCancelled watchdog error 2016-05-08 10:36:44 +01:00
3769d99532 [GTKUI] Fix silly typo 2016-05-07 00:52:47 +01:00
c7b272561e [#2827] [GTKUI] Fix issue with loading GTKUI columns state
commit 1a2ff9b089 introduced a bug when loading GTKUI
column states due to changing ListViewColumnState class type.

Fixed by reverting ListViewColumnState to old style class
2016-05-06 22:59:51 +01:00
21789e0692 [#2813] [GTKUI] Fix connection manager showing daemon offline in Windows
The daemon status is not retrieved when showing the connection manager at
startup on Windows and shows it as offline.

This commit restores the removal of simulate call in commit 058b0e41d2
but applies it only to Windows OS as there were no problems in Ubuntu testing.

It would suggest then that the issue is isolated to PortableGtkReactor
but the exact cause of the problem is still unknown.
2016-05-06 22:30:20 +01:00
1a2ff9b089 [Lint] Fix and remove old-style-class from ignore warnings 2016-05-06 12:44:45 +01:00
3ec8dc6858 [Lint] Remove warnings from .pylintrc
Remove warnings from ignore list in .pylintrc:
* super-on-old-class
* pointless-except
* non-parent-init-called
2016-05-06 12:44:45 +01:00
9be1bd523a [Tests] Cancel watchdog deferreds on test completion 2016-05-06 12:44:45 +01:00
1f191c3ce1 [Base] Fix incorrect use of defer.fail in component 2016-05-06 12:44:45 +01:00
91ed621ec8 [UI] Changed ui command description and help 2016-05-06 12:44:45 +01:00
6adbd14bf8 [Base] Add custom log observer to handle twisted errors
For some reason errors are logged by twisted as
'Unhandled error in Deferred', but without a following
stacktrace. This can happen in a deferred callback that e.g.
raises an ImportError. Without an excplicit error handler for a
deferred to log such errors, finding the error can be very tricky.

Fix this by using a custom twisted.python.log.PythonLoggingObserver,
PythonLoggingObserver, that also logs the traceback in addition to
the error message.
2016-05-06 12:44:45 +01:00
5826446509 [Lint] Fix pylint signature-differs warning 2016-05-06 12:44:45 +01:00
84d2d20e13 [Web] Pylint fix for WebUtils 2016-04-29 23:23:23 +01:00
3ed4c8d636 [Lint] Add pylint to tox run 2016-04-29 23:23:18 +01:00
c15931e6f6 [Tests] Rename pylintrc and ignore .tox dir 2016-04-28 23:34:18 +01:00
7c20ed777d [Core] Save fastresume file on separate thread
To avoid blocking twisted main thread, defer file saving task to
separate thread with deferToThread.

Only queue resume data save task on shutdown
2016-04-28 23:14:29 +01:00
5d0359331b [#2821] [UI] Fix missing parameter in baseargs init 2016-04-28 22:42:59 +01:00
b255fc40af [WebUI] Remove openssl check as already a requirement 2016-04-28 11:10:09 +01:00
7b523af05b [#2819] [WebUI] Handle CannotListenError for second instance 2016-04-28 11:09:53 +01:00
bd65abd3b4 [UI] [Core] Combine common process options into baseargparser 2016-04-28 11:09:53 +01:00
b4dd90ba2b Cleanup code in web and deamon entries to match 2016-04-28 11:09:52 +01:00
c274d5114c [#2818] [WebUI] Fix AttributeError starting WebUI on windows 2016-04-28 11:09:52 +01:00
c821cdd9c7 [UI] Fix unable to use uppercase log level 2016-04-28 11:09:52 +01:00
69871506e1 Improve order of args and wording of '--help' text 2016-04-28 11:09:39 +01:00
a99e29642c [UI] Restore short arg for version '-V' (deprecate '-v') 2016-04-28 11:09:26 +01:00
acdc19df1d Add translation markup to '--help' options 2016-04-28 11:07:26 +01:00
2bad04848c [WebUI] Update gettext.js 2016-04-25 15:41:47 +01:00
bf3d6ae24b [WebUI] Add refresh dialog for language change 2016-04-25 15:35:52 +01:00
2984e2dc5d [WebUI] Fix Interface page not saving with OK button 2016-04-25 15:35:21 +01:00
3b23f69786 [WebUI] Use Apply button to change password 2016-04-25 13:26:59 +01:00
9fbc63e6fb [WebUI] Tidy Interface page layout 2016-04-25 13:26:59 +01:00
cb158ca866 [Core] Add missing warn_msg arg to set_dummy_trans() 2016-04-25 13:26:59 +01:00
857e2fd46e [#1959] [WebUI] Allow user selectable GUI language 2016-04-25 13:26:58 +01:00
74f2f45fc0 [WebUI] Fix to gen_web_gettext 2016-04-25 13:26:58 +01:00
b76d208212 [UI] Added missing languages to languages.py 2016-04-25 13:26:58 +01:00
dea43da4d2 [UI] [Daemon] Re-add --fork option 2016-04-24 22:39:16 +01:00
d32796eab0 [WebUI] Reword doctring and update gettext.js 2016-04-23 23:13:11 +01:00
1a79d7c255 [WebUI] Remove unneeded translation markup 2016-04-23 22:40:17 +01:00
1afea60c6f [UI] Indent subsequent lines in argparse help 2016-04-23 22:10:29 +01:00
a49b459a59 [UI] Remove old twisted DeprecationWarning code 2016-04-23 22:10:29 +01:00
9a051b6979 [UI] Enable translation of argparse help strings 2016-04-23 22:10:29 +01:00
64ac5fdf73 [#2677] [Web] With --base option set, serve locally on new base path
When specifying the --base option to work with reverse proxy
the WebUI is no longer accessible locally since it listens
on the server root, but serves on the path specified to work
for the reverse proxy.
Change this to also handle local requests to the base path
such that the WebUI will be available both for the reverse proxy
as well as locally on the interface/port which the twisted sever
listens on.
2016-04-22 23:04:19 +01:00
ec366c840c [Core] Fix unnecessary delay when starting components 2016-04-21 14:44:48 +02:00
edf616baca [#2805] Fix: Standalone mode not detecting local running daemon 2016-04-21 12:39:31 +02:00
58bc8b6ec7 [#2808] Fix: Deluge Log File Not Working as Intended 2016-04-20 14:09:50 +02:00
2dea6ab5a5 [Tests] Add pylint target to tox 2016-04-19 22:14:28 +02:00
c3247396f7 [Stats] Fix to tests and deleted .test.py 2016-04-19 19:00:07 +02:00
f3bfe177ce [GTKUI] Fix gtk warning on shutdown 2016-04-19 12:05:03 +01:00
7c1f39d10e [Core] Minor change to magnet info_hash fix 2016-04-19 10:50:05 +01:00
cd6669c024 [#2790] Ensure base32 magnet hash is uppercase 2016-04-19 10:44:55 +01:00
5c69b56cd5 [Core] Fix adding magnets failing 2016-04-19 10:43:59 +01:00
90d1bbbb31 [Lint] Fix pylint issues uncovered by recent changes 2016-04-18 22:54:39 +01:00
e370d7dbdd [Web] Fix error in WebApi in standalone mode
In GTKUI standalone mode, WebApi.enable would try to connect to
daemon if web.conf had the 'default_daemon' option set, causing
the client calls to break.
2016-04-18 21:03:03 +01:00
38e0bc1257 [Core] Handle error when adding torrents to session at startup 2016-04-18 19:15:27 +01:00
47f14845ca [GTKUI] Fix #2802: GTKUI classic mode shutdown procedure is broken
Fix by leaving shutdown procedure to gtkui.py:
* Daemon no longer calls component.shutdown() in GTKUI classic mode
* Mainwindow no longer calls reactor.stop but instead fires a
  'gtkui_close' signal.
* gtkui.py installs custom SIGINT handler to initiate shutdown before
  stopping reactor.
2016-04-18 16:05:46 +01:00
70d8b65f0a [WebUi] [Core] Fixes to plugin handling and WebUi plugin + tests
This should fix problems with errors occuring when failing to
enable plugins. Errors in plugin handling are handled better
and properly logged.

WebUI plugin in particular had issues when being enabled and disabled
multiple times because it was trying to create DelugeWeb component
each time it was enabled. If deluge-web is already listening on
the same port, enabling the WebUI plugin will fail, and the checkbox
will not be checked.

There are still some issues when enabling/disabling plugins by
clicking fast multiple times on the checkbox.
2016-04-18 15:49:30 +01:00
5ebe14e452 [Core] Remove old twisted DeprecationWarning code 2016-04-18 15:47:17 +01:00
36ecd5625a [UI] Cleanup logrotate option
Keeps a consistent naming for log options
2016-04-18 15:42:24 +01:00
f036c1a6c5 [Core] Fix stdout object when stopping daemon 2016-04-18 15:29:52 +01:00
64c67a07dd [WebUI] Fix #2798: WebUI plugin fails to start 2016-04-18 12:01:02 +01:00
092d496944 [WebUI] Cleanup donotdaemonize 2016-04-18 11:56:38 +01:00
5edb923904 [Base] Split main.py into ui/ui_entry.py and core/daemon_entry.py 2016-04-18 09:36:20 +02:00
6300f9154a [#1949] [UI] Allow setting max size for rotating log file 2016-04-18 09:36:13 +02:00
c90af1ce6c [UI] Add --profile to GTKUI and console and allow custom filename
Add --profile to commonoptions making the option now available for
daemon and all UIs. --profile option now prints to stdout unless an
optional filename is specified.
2016-04-18 00:54:45 +02:00
7b54a2a1ee [UI] Replace optparse with argparse for cmd arguments handling
optparse is deprecation and succeeded by argparse. See
https://www.python.org/dev/peps/pep-0389
2016-04-18 00:53:37 +02:00
aa82efd4f1 [#1974] [UI] Decouple UI selection from core.
Add entry points into setup for each of the UIs and then use this
information to determine which client UI to run.

This ensures that custom UIs may be written and run without
the need to modifify deluge source code.
2016-04-17 13:51:40 +02:00
6343f32d70 [#1973] [UI] Standardize child cmd option parsing.
Handle child args and -a args in a common way so that all children
accept the same input format. Modify UIs to pass through setup
arguments to the base class.

Instead of launching the UI directly launch the UI via the _UI
subclasses in the same way that the scripts launch the clients.
2016-04-17 13:36:15 +02:00
b86a021042 [#1972] [UI] Remove ui.UI class
The only use of the ui.UI class is a base for Web which never calls
__init__ and at the beginning when choosing which UI to launch,
however that doesn't need to be an object.
2016-04-17 13:36:15 +02:00
7af8a4cf14 [#1971] [UI] Unify common cmd options handling.
Add a CommonOptionParser which handles the standard set of options
for all UIs.
2016-04-17 13:36:15 +02:00
38a480ac14 [Core] Revert "Cache items in get_filter_tree"
This reverts commit affe47a11c
as it causes the All filter state field to be zero in classic mode.
2016-04-17 12:13:49 +01:00
3b84eb635c [GTKUI] Fix torrents not showing in classic mode
Commit 5d1aff157e implementing async_add_torrent cause torrents
not to show in classic mode.
2016-04-17 12:13:49 +01:00
6287a782a1 [Lint] Fix Redundant use of assertFalse with constant value True 2016-04-16 18:24:20 +01:00
e468436b0c [Lint] Update pylintrc and fixup code for newly introduced messages
* pylintrc is now compatible with pylint 1.6.
 * Add to ignore wrong-import-position and wrong-import-order as
   we use isort and pylint is raising too many incorrect messages.
2016-04-12 14:12:21 +01:00
10e1a2a593 [Core] Catch exception on call to lt.listen_on() 2016-04-11 11:56:34 +01:00
194d1291e1 [Core] Emit ConfigValueChangedEvent only in started state 2016-04-11 11:56:34 +01:00
085dc76e41 [Core] Set default torrent status message
Torrent status message could remain None is some cases
2016-04-11 11:56:34 +01:00
b0b9180943 [Core] Return Deferred from rename_files and rename_folder
core.rename_files and core.rename_folder now returns a Deferred
that callbacks when rename is finished.
2016-04-11 11:56:34 +01:00
af6f2b2107 [Core] Allow renaming torrent to empty string to remove the folder 2016-04-11 11:56:34 +01:00
887afa9389 [GTKUI] Fix bugs in files_tab and added tests
After renaming files/directories in GTKUI, the file list wasn't
properly updated, requiring to choose another torrent to get
a file list update.
2016-04-11 11:56:34 +01:00
d84ffa50c3 [GTKUI] Fix bug in gtkui/common.reparent_iter() 2016-04-11 11:56:34 +01:00
eda493e525 [GTKUI] Improve error handling in torrent details
If status is missing a key required for a widget a KeyError
was not always caught.
2016-04-11 11:56:34 +01:00
712b2715d4 [Tests] Fix to json tests 2016-04-11 01:36:49 +02:00
d8c4d8c1aa [Core] Fix to async_add_torrent commmit (5d1aff15) 2016-04-11 00:43:58 +02:00
5d1aff157e [Core] Implement async_add_torrent in torrentmanager 2016-04-10 11:46:22 +01:00
73220b5116 [Lint] Fix issues picked up by scrutinizer 2016-04-10 10:58:57 +01:00
d58960d723 [Tests] [Web] Make JSON independent of Web component
* Implement JSONTestCase in test_json_api.py
* Implement WebAPITestCase test case in test_web_api.py
2016-04-10 00:10:53 +02:00
bcc1db12e5 [Tests] Improved common.start_core
* Replace Popen with reactor.spawnProcess and read process
  output with twisted.internet.protocol.ProcessProtocol
* Implement support for running custom script code
* Now logs to stdout instead of stderr when not logging to file
2016-04-10 00:10:48 +02:00
533951afea [#2724] [Web] Forward exceptions in JSON-RPC back to caller
Exceptions raised by calls performed by a JSON request would
not always be handled properly resulting in no reply to be sent
leading to browser timeouts.

Fix this by including the raised error in the JSON data of a
regular (successful) HTTP response.
2016-04-09 22:19:48 +02:00
93023c5bfc [Core] Fix bug and add error testing to AuthManager 2016-04-09 22:19:48 +02:00
9319e07db5 [Webui] Show user in connection manager 2016-04-09 22:19:48 +02:00
9b18fb2b71 [Tests] Fix failing SessionProxy tests
For some reason, the time.sleep calls in the tests in
test_sessionproxy did not sleep for the expected amount
of time causing the results to differ from the expected.
Fixed by replacing time.time function with twisted's
task.clock.seconds and advancing the clock manually.

Also minor changes to test_client.py
2016-04-09 22:19:44 +02:00
cae8a18437 [Tests] Fixes to improve terminal output from unit tests
Add __str__ to WrappedException so that the stacktrace is printed when a
unit test raises a WrappedException.

Change the log output from error to warning in DelugeRPCProtocol.dispatch
when sending back a raised exception on an RPC request.
2016-04-08 16:35:09 +02:00
374989a2ad [Tests] Catch and print errors in setup/teardown 2016-04-08 16:35:09 +02:00
fc6672adda Fix #2789: Test for google tracker icon redirect is failing 2016-04-07 22:11:25 +01:00
0b17b52c9a [Tests] Consistent tox config layout 2016-04-07 19:11:32 +01:00
9d13234e23 [Tests] Fix for flake8 in tox
Force install flake8 in tox to avoid the system flake8 being used if
available.

Remove unneeded whitelist entries
2016-04-07 18:44:20 +01:00
815f67467a [Tests] Update ubuntu icon, skip google & openbt icon tests 2016-04-07 09:52:33 +01:00
bebc414136 [Core] Ensure magnet name passed to lt in string 2016-04-04 02:02:28 +02:00
d91e5d894f Add command-line option for the daemon to restrict some config keys to being read-only.
This only affects the core.set_config() RPC method which will drop items if the key
is listed as read-only.
2016-02-02 19:25:46 -08:00
d13fca251e [Core] Defer save state function to separate thread
With large amounts of torrents, saving the state file becomes
a performance bottleneck, mainly due to the required processing
in pickle.dump. When run in the main thread, the server will
hang and be unresponsive for a significant time.

Solve this issue by running the save state job in a separate thread.
2015-12-14 21:35:55 +00:00
e632ca4418 [WebUI] Use the short-form copyright text 2015-12-14 13:39:41 +00:00
a987c3ed39 [Core] Raise AttributeError on RPC call to invalid function
Also catch and log errors in rcpserver.sendData
2015-12-14 12:08:18 +00:00
382a99ad61 [GTKUI] Cleanup code duplication in Tabs 2015-12-12 22:10:53 +00:00
50bde1a607 [Core] Cleanup duplicate version callback code 2015-12-12 21:46:28 +00:00
080d137af8 [Tests] Move test_torrent_error code into test_torrent 2015-12-12 14:29:07 +00:00
02f6bfd578 [#1260] Handle redirection better with httpdownloader 2015-12-11 22:48:36 +00:00
77aa540dc3 fix isort 2015-12-11 22:34:19 +00:00
1793e36127 [Core] Fix use of parent class parameter 2015-12-11 22:30:10 +00:00
979ad972fe [#2767] [Packaging] Don't include .py files in OSX App 2015-12-11 18:51:08 +00:00
ee7e632b94 [#2783] [GTKUI] Case insensitive sort for name column 2015-12-11 18:01:54 +00:00
075542e4a5 [OSX] Fix starting deluged from connection manager 2015-12-11 12:11:38 +00:00
c1902e4396 [#2782] [WebUI] Fix HTTPS negotiating incorrect cipher 2015-12-11 11:44:37 +00:00
aaac697a98 [WebUI] Remove old code 2015-12-11 11:39:16 +00:00
ac9e11d732 [Core] Ensure valid torrent state value after init 2015-12-09 22:24:23 +00:00
f36ecc470b [Core] Fix move_storage exception handling 2015-12-09 19:00:06 +00:00
bd14657055 [GTKUI] Revert remove_column change from 550ddc010 2015-12-06 16:53:19 +00:00
6892a00b86 [GTKUI] Implement show ownership option in GTKUI 2015-12-04 19:05:59 +00:00
620a4eb409 [Base] Catch and log exceptions raised in component.update 2015-12-04 19:05:59 +00:00
ad7a1ec89f [Core] Add ClientDisconnectedEvent 2015-12-04 19:05:59 +00:00
ca1eaa5e15 [Core] Add TorrentTrackerStatusEvent 2015-12-04 19:05:14 +00:00
431357f623 [Core] [WebUI] Increase RSA key size and improve hashing
* Replace weak hashing functions, key sizes, and random number
      generation techniques with less weak versions to prevent
      crashes when running with the fips module loaded.
2015-12-04 19:04:13 +00:00
7eb037b3f4 [GTKUI] Fix import mistake 2015-12-04 17:12:28 +00:00
c619f05f94 [Label] Fix gtk warnings when removing menu 2015-11-30 23:01:19 +00:00
550ddc0109 [GTKUI] Fix treeview columns not saving 2015-11-30 22:49:42 +00:00
eaae568c7c [Core] Update tracker_host when setting new tracker status 2015-11-27 13:54:07 +00:00
d932c3ab99 [GTKUI] Fix installing plugin from non-ascii path 2015-11-27 13:41:44 +00:00
803a33efde [GTKUI] Ensure drag-n-drop urlparsed path is unicode 2015-11-26 15:07:16 +00:00
227863faf7 [#2777] Update MSVC SP1 check to latest release CLID 2015-11-23 23:30:50 +00:00
0e1582702a [#2485] [WebUI] Fix unconnected Options in context menu 2015-11-23 23:19:21 +00:00
42b9f22a81 [GTKUI] Fix for flake8 2015-11-22 14:03:14 +00:00
7e971550de Set tox version==2.1.1 due to bug in latest tox 2015-11-22 13:58:37 +00:00
6cf0ef080b [GTKUI] Fix broken sequential_download in options tab 2015-11-22 13:54:47 +00:00
c796acf791 [Core] Remove int casting as args should be int 2015-11-15 14:14:12 +00:00
27bf05f2fe [#2738] [Core] Fix illegal argument with torrent_handle.set_max_connections 2015-11-15 14:00:52 +00:00
c62c604418 [GTKUI] Fix unselect error with treeview selection returning None
In standalone mode treeview.get_selection returns None resulting
in an AttributeError for call to unselect_all.
2015-11-15 13:22:06 +00:00
fc9bc2976f [GTKUI] Fix open dialogs preventing gtk app closing 2015-11-15 12:47:07 +00:00
058b0e41d2 [GTKUI] Remove old twisted and gnome code
* Can't see any issue removing the twisted similate call and it
   seems to already be done by gtk2reactor so duplicated.
 * The gnome die handled never appears to be called and most signals
   are handled by twisted so remove this code as well.
2015-11-15 12:44:19 +00:00
0a3404fa55 [GTKUI] Move imports to top 2015-11-12 23:29:03 +00:00
ac09caefac [UI] Add Python and OS info to version output 2015-11-12 23:13:37 +00:00
ed6355fe86 [GTKUI] Refactor rpc stats code 2015-11-12 23:10:37 +00:00
471276716b [GTKUI] Refactor shutdown signal code 2015-11-12 22:03:27 +00:00
b754f9f908 [Core] Add line numbers to non-dev logging 2015-11-12 18:56:30 +00:00
cde17925fc [Lint] Autopep8 aggressive run
* Uses isinstance() instead of type()
 * Uses sorted() where possible
2015-11-04 11:54:15 +00:00
05ab06e3a5 [Console] Refactor build_file_list()
* Remove usage of sys.maxint and rename variable to make method more readable.
2015-11-04 11:06:35 +00:00
f1e70829af Fix linting mistakes
Missed renaming file to _file. This commit now uses better naming with
some minor refactoring.
2015-11-03 19:43:29 +00:00
f500d78487 [#2775] Update state and fastresume save methods
* Issue introducted in a previous commit meant the state file is never
   saved when starting with a fresh config.
2015-11-03 12:39:50 +00:00
ed48c4a0c5 [Core] Remove return true for timer from save_state
Obsolete code for old gobject timer
2015-11-03 11:36:26 +00:00
1ff189c63a [Lint] Standardise except code
* Using 'ex' variable name for exceptions.
2015-10-30 18:40:03 +00:00
2583e9d888 [Lint] Code cleanup for PyLint run by prospector tool
* Fix for pluginmanager multiple inheritance which in this case is using super incorrectly.
 * Explicitly disable pylint 'pointless-except' and 'super-on-old-class' that prospector
   tool somehow runs.
 * Make __all__ a tuple to supress pep257 warning.
 * Add a noqa for older versions of pyflakes.
2015-10-30 18:39:57 +00:00
d280fa9fbd [Lint] Cleanup helper scripts to pass PyLint 2015-10-30 18:39:52 +00:00
807fa609f9 [Lint] Cleanup code to pass PyLint Warning category
Selected Warning messages disabled in pylintrc:
  * unused-argument: Quite a large and disruptive change if enabled.
  * broad-except: Most required in-depth investigation to determine type.
  * fixme: Not important
  * protected-access: Complicated to fix
  * import-error: Too many false-positives
  * unidiomatic-typecheck: Should be fixed in the next round of checks.
  * unused-variable: Again large and disruptive changes.
  * global-statement: Most usage is required.
  * attribute-defined-outside-init: Should be fixed in next round of checks.
  * arguments-differ: Possible false-positives, needs revisited.
  * no-init, non-parent-init-called, super-init-not-called: False-positives?
  * signature-differs: False-positives?
2015-10-30 18:39:47 +00:00
ad3cba929e [Lint] Cleanup code to pass PyLint Convention category
Disabled Conventions messages:
   * missing-docstring: Not likely all methods/funcs will ever have docstrings.
   * invalid-name: Far too many too fix so will simply have to ensure submitted
     or altered code keeps to the convention.
   * old-style-class: Not a priority but would be nice to eventually fix this.
   * bad-continuation: Occasionally conflicts with pep8, not worth enabling if using
     pyflakes and pep8 as these will catch most continuation issues.
2015-10-30 18:39:42 +00:00
3288353be0 [Lint] Cleanup code to pass PyLint Error category
Disabled:

  * no-member:
  * not-callable:
  * no-name-in-module:
2015-10-30 18:39:36 +00:00
6eb46c935e [Lint] Add PyLint support and cleanup code with basic changes
* Include a pylintrc config file
 * This commit provides a basic error-only pylint config as a starting
   point with a view to adding more checks incrementally to keep the volume
   of changes low and the code able to pass pylint at each stage.
2015-10-30 18:38:56 +00:00
58388419fb [Core] Fix mistake in clear_forced_error_state 2015-10-30 18:27:38 +00:00
4ae43c5f2a [#1032] Error out torrent if data is missing on startup 2015-10-30 15:28:20 +00:00
74f5dc0a76 Add fastresume_rejected_alert 2015-10-30 15:21:07 +00:00
f4dce731e9 [Core] Supress state warnings with fresh config 2015-10-30 14:35:47 +00:00
aedb59f854 [Console] Use utf8_encoded for non-interactive mode 2015-10-29 12:22:03 +00:00
3a03bb8dd7 [GTKUI] Don't display percentage for Error'd torrents 2015-10-29 11:50:18 +00:00
e232cd812a [WebUI] Fix missing return from pep8 changes 2015-10-22 23:15:30 +01:00
ebc00f3d7c Fix config for isort 4.2 2015-10-21 01:17:08 +01:00
32bc20d8ce Fix pep8 across codebase
* Further whitespace fixes by autopep8
 * Using pep8 v1.6.2 (not currently used by pyflakes)
 * Update config for pep8 and flake8 in tox.ini
   * A separate pep8 entry for running autopep8. The ignores prevent
     blank lines being added after docstrings.
   * .tox and E133 are ignored in flake8 by default.
2015-10-21 00:06:27 +01:00
82ac1bdfe0 Use xml.sax instead of cgi for escaping 2015-10-18 18:41:58 +01:00
56f5ce6ee1 [Tests] Properly test for DeprecationWarning in test_log 2015-10-18 15:36:58 +01:00
4803600734 Remove translation markup in pluginmanagerbase 2015-10-18 15:36:58 +01:00
76cc3e79b9 [Tests] Update plugin metadata test 2015-10-18 15:36:58 +01:00
14e775cbcf Fix missing js semi-colons and refactor CSS 2015-10-07 12:50:56 +01:00
005db434f8 [#2769] [WebUI] Simplified torrent file upload UX
Previously, the process for uploading a file in the Web-UI required three
steps. Click 'File' to open the 'Add from File' window.  Click 'Browse' to
select the file. Finally, click 'Add' to upload the file. These steps have
been combined into one, making the process much easier. Now, clicking 'File'
opens the file browser directly. After a file is selected, it is uploaded
automatically.
2015-10-07 12:25:04 +01:00
d4535c6164 [GTKUI] Store width and height of 'Edit trackers' dialog in config 2015-10-07 12:17:25 +01:00
dd3aeb45ea [Core] Cleanup a few docstrings in TM 2015-10-02 19:30:04 +01:00
e4ec248eb6 [Core] Mapped files fix and torrentid correction 2015-10-02 19:30:04 +01:00
cb8e9d3018 [Core] Move add tracker merge into Torrent method 2015-10-02 19:30:04 +01:00
50200326a9 [Core] Split-up complex tm.load_state 2015-10-02 19:30:03 +01:00
40c1597c67 [Core] Split create part of save_state into create_state method 2015-10-02 19:30:03 +01:00
d34705860a [Core] Updates to writing and deleting torrentfile
* Reduces the complexity in tm.remove
2015-10-02 19:30:03 +01:00
fb95d0ef58 [Core] Fix queue_top typo in tm.add 2015-10-01 12:31:46 +01:00
0838202892 [#2703] [Core] Stop moving files if target files exist 2015-09-29 23:37:14 +01:00
7f2e06d4e2 Bump minimum version for libtorrent to 1.0.6 2015-09-29 23:30:18 +01:00
824067e238 [Core] Emit TorrentStateChangedEvent in update_state 2015-09-29 19:39:32 +01:00
084329f9f1 [#2729] [Blocklist] Fix plugin lockup with empty url 2015-09-28 12:45:39 +01:00
e1548cc974 [#1330] [Core] Fix pausing and resuming session
* The paused state of torrents is now correctly stored on shutdown if the session is paused.
 * Resume session refreshes all the torrents' state. This fixes only torrents that changed state being
   updated so queued torrents would be incorrectly displayed as paused.
2015-09-28 12:39:51 +01:00
8241b2ba3e [Core] Return all plugin status keys with empty list 2015-09-28 12:20:35 +01:00
e5e4ab4e05 [#2236] [Core] Fix filter keyerror removing plugin 2015-09-26 19:15:02 +01:00
a26101d6b9 [GTKUI] [OSX] Fix empty scrolling status (systray) menu
* Same issue as seen on Windows in #302
2015-09-26 00:03:52 +01:00
24b8baf8cc [Travis] Disable broken TODO test 2015-09-25 18:17:29 +01:00
5a6ca707e0 Fix isort and flake8 tests 2015-09-25 18:16:29 +01:00
c9d4cd2e14 [#2435] [GTKUI] Prevent user changing selection when editing tracker 2015-09-25 18:12:11 +01:00
f96f47e463 [#2705] [WebUI] Fix hostlist not being created 2015-09-25 14:02:12 +01:00
037063f24e [#2765] Add support for TLS SNI in httpdownloader 2015-09-25 14:02:07 +01:00
ca9d0abe4b [GTKUI] Fix connected issue in connection manager
* If host was not an ip address then it would not show as connected
2015-09-25 14:01:46 +01:00
a2a074fb4f osx file in wrong location 2015-09-23 00:32:54 +01:00
07fa36aa58 [GTKUI] Revert column type to uint64
* Tested fine on linux but on windows generates TypeError as this
   data is long in standalone mode.
2015-09-20 22:53:41 +01:00
774157f9b6 Fix scalable icon path 2015-09-20 21:36:46 +01:00
9df3f7b50e [Tests] Fix torrentview test 2015-09-20 19:27:03 +01:00
2c5025644c Fix data_files in setup.py 2015-09-20 18:39:20 +01:00
7b7e61485e [#2762] [GTKUI] Use correct column types for data 2015-09-20 15:58:10 +01:00
0363dddbcc [#2763] [GTKUI] Fix unhandled error with invalid magnet uri 2015-09-20 15:55:36 +01:00
356f224a25 [#2764] [Scheduler] Fix corrupt plugin prefs page on osx 2015-09-20 15:52:14 +01:00
fbf5d5287f [Packaging] Minor osx updates 2015-09-20 15:50:22 +01:00
1557bf8882 [#2754] [GTKUI] Fix Deluge isn't sorting torrents properly 2015-09-18 23:07:15 +01:00
8485fd591b [#2402] [Notification] Fix popup to show actual count of files finished 2015-09-18 23:00:00 +01:00
f834ff6ec5 [Packaging] Updates to osx scripts
* bundle_contents now appends 'Contents' without adding it twice.
 * Remove reference to non-existent gdk-pixbuf.loaders
 * Separate libtorrent in new module.
 * Update lib versions for bundle file.
2015-09-18 22:59:52 +01:00
7fccfa0651 [Packaging] Updates to the NSIS Installer script
* New message box popup if VC 2008 Redist package not detected.
 * Add Start Menu page to choose where/if to install items.
 * Add desktop shortcut install option to finish page.
 * Clean up spacing and use consistent 4 spaces to indent.
 * Exclude as many unneeded pygame libraries as possible.
2015-09-18 22:31:39 +01:00
ff6b52edc6 [Win32] Fix output exes in bbfreeze 2015-09-13 22:53:28 +01:00
7532d4d333 Fix icon paths in setup 2015-09-13 22:50:53 +01:00
40c0c8ef6a [#2325] [Packaging] Fix uninstaller deleting non-deluge files 2015-09-10 14:24:32 +01:00
3eefc81d9d [GTKUI] Select first entry in edit trackers dialog on first show. 2015-09-10 14:21:44 +01:00
da80f7cbda [Core] Only fsync the directory if GNU constant exists
* Doesn't exist on Windows.
2015-09-07 11:30:30 +01:00
e75e65b2c1 [GTKUI] Default Plugin statusbar items to the end on startup 2015-09-07 09:22:51 +01:00
0a10c8f3bf [Scheduler] Show current speed limit in statusbar
* Intercepts the updates of the statusbar and displays plugin values when in Yellow zone.
 * Core fix for resetting speed limits to core.conf values.
2015-09-07 09:21:07 +01:00
e6a6c8342f [GTKUI] Improve statusbar spacing and hide empty text labels 2015-09-07 00:59:50 +01:00
dd764a09a8 [GTKUI] Remove old and unneeded code
* Notifications now handled by plugin so remove gtkui code.
 * path_join is better done by os.path.join and replace.
2015-09-05 23:18:56 +01:00
caf35bcdf4 [Packaging] Include WebUI debug files for dev versions
* Webui will try to use debug files if deluge version contains 'dev'.
 * Include webui debug files in sdist.
 * Use exclude_package_data to remove debug files in release versions.
2015-09-04 19:43:32 +01:00
d898ba9333 [WebUI] Refactor server.get_scripts
* The directory list is now sorted so will always produce the same output.
 * Code is now shared with minify script, with some minor changes.
2015-09-04 15:02:19 +01:00
da1c07ff99 [Tests] Fixes to make tests pass
* Fix GTKUI column types mismatch (broken by 239e679)
* Updated deluge/tests/google.ico
* Remove empty line in torrentmanager.py
2015-09-02 17:14:13 +02:00
0a12d1507e [WebUI] Fix i18n of Connect button 2015-09-01 16:19:18 +01:00
1acd6e4c1c [Core] Refactor add method in tm 2015-09-01 11:28:39 +01:00
7414737cbf Tweaks to fastresume and state file saving
* Using move is not atomic on Windows so delete and rename instead.
 * Open the file with no buffering
2015-08-31 15:47:38 +01:00
bb16af3731 [GTKUI] Remove old builder file 2015-08-31 15:44:23 +01:00
239e679fee [GTKUI] Fix date columns to use int not float 2015-08-31 15:33:41 +01:00
3767a9fd27 [GTKUI] Fix issue in torrentview where columns shared datafunc 2015-08-31 15:29:59 +01:00
ff1f64d9bc [GTKUI] Fixes for tooltip deprecation warnings and signal handler warning. 2015-08-31 15:27:20 +01:00
aa5b7e7595 [#2701] [GTKUI] Fix: Move Download Folder cancel button doesn't work 2015-08-31 15:41:42 +02:00
3b82059bdb [#2731] [GTKUI] Fix potential AttributeError in is_on_active_workspace
* Without being able to replicate adding the forced updated is the likely fix for 'win'
being None but also add test in case it's not...
2015-08-31 11:30:23 +01:00
520fc23371 [Console] Remove unneeded whitespace in config output 2015-08-28 17:19:11 +01:00
62a144c730 [#2333] [Console] Fix 'set and then get' in config command
* The get method was returning old config information so use correct
 core get callback.
 * Remove redundant deferred in set method
2015-08-28 17:18:41 +01:00
f4e5fb446d Update MANIFEST and .gitattributes
* Modify `git archive` to include all source code so that creating a
release source tarball is now done with `setup.py sdist` which uses the
MANIFEST.in file to determine files to be included.
2015-08-27 22:51:43 +01:00
9e13f671ee [GTKUI] Make Add Dialog torrent name editable
* Allows copying of name and future feature of changing the torrent
display name.
2015-08-27 22:26:17 +01:00
438d49be85 [GTKUI] Fix sensitivity of indicator radio buttons 2015-08-27 22:24:55 +01:00
e883bbf10b [Core] Do not remove components from component registry on shutdown
By removing the components after they shut down, KeyErrors are raised when
trying to acccess the component. Unit tests now clear the component registry
on tear down.
2015-08-27 17:16:32 +01:00
19d1afdce0 [GTKUI] Show magnet info in Add and Queued dialogs
* Use tooltip to show orginal torrent path or magnet uri
2015-08-27 13:21:24 +01:00
8345237dcc [Packaging] bbfreeze updates
* No need for data_files to be installed on windows
2015-08-27 11:27:49 +01:00
50f6f2d3ec [Packaging] bbfreeze tweaks and comments
* Reduce output from bbfreeze and add debug option to enable again.
2015-08-26 17:25:33 +01:00
4b3684bc5d [Packaging] Fix typo in bbfreeze 2015-08-26 12:08:06 +01:00
df3a3c77eb Fix travis build version issue
* version.py script requires git tags but detached HEAD in travis clone
   requires manually creating the RELEASE-VERSION.
 * Also fix relative path issue building docs.
2015-08-26 00:27:32 +01:00
a3073c44e2 Update minify script to use closure 2015-08-25 16:18:02 +01:00
489550fd7a [WebUI] Lint js files 2015-08-25 15:43:55 +01:00
7d679eb480 Updates to helper scripts
* Python 3 compatible
 * Consistent quote symbol
2015-08-25 15:43:55 +01:00
23cbd581db Use just Taiwan in countries list 2015-08-25 11:03:20 +01:00
0466c7144c [#1389] Fix data_files installed in wrong location 2015-08-24 23:46:12 +01:00
d2a2631a70 Flake8 bbfreeze 2015-08-24 15:55:14 +01:00
1c3e14919f [Win32] Refactor bbreeze script
* In setup.py put web and deluged back into console_script as the gtkui hack in
bbfreeze is a windows only issue for popup cmd windows showing.
 * Altered the bbreeze script to find any deluge scripts in pythonpath.
 * Use setIcon now in bbfreeze and use icon from package.
 * Use version stamp from pywin32.
2015-08-24 15:35:25 +01:00
0ee8c7d70f [#2736] [Win32] Add version info to exe files 2015-08-24 14:56:53 +01:00
c55a601db9 Fix version issue with no git repo 2015-08-24 14:56:53 +01:00
71b5e0a296 [#2758] [win32] Include _cffi_backend module in bbfreeze 2015-08-24 14:56:53 +01:00
a4844f7b77 [win32] Update packaging scripts
* Update directory paths.
2015-08-24 14:56:53 +01:00
f4cb062380 [#2734] Add 256x256 to deluge.ico 2015-08-24 14:56:36 +01:00
81b3c69465 [Core] Fix set_trackers to use lt >= 0.16 tracker format 2015-08-22 15:39:22 +01:00
a36d1f6219 Exclude binary translation files in sdist 2015-08-22 15:25:56 +01:00
d7029dcfc6 [WebUI] Improve the minify script 2015-08-22 14:27:17 +01:00
24b71a400f [WebUI] Improve the gen_web_gettext script
* Create a 'minified' gettext.js by removing comments from file and simplifying js code.
 * Added creating the file to generate_pot.py, so it is not forgotten about.
2015-08-22 14:26:56 +01:00
7cc14baae3 Remove glade from package_data entry 2015-08-22 12:21:58 +01:00
9c01c87bbf Update .gitattributes
* Update path for ignoreing tests directory.
 * The deluge-all and ext-extensions source code should not be ignored.
 * Remove entries for non-existent build script and debug js files.
 * Ignore the new packaging directory.
2015-08-22 11:52:51 +01:00
941e4d7c1f Remove old glade script 2015-08-21 09:59:08 +01:00
d96633f3f7 Create a packaging directory 2015-08-21 09:58:30 +01:00
05acddcc64 Revert "Remove generated javascript gettext file from git"
This reverts commit 522815d266.
2015-08-20 22:29:13 +01:00
5c05d3d7ea [WebUI] Cleanup stray whitespace 2015-08-20 19:37:29 +01:00
7af7ecd82a [#2008] [WebUI] Fix translation marked text
* Remove labelSeparator and manually add ':' so text matches gtk translations.
 * Use consistent quotes around strings. This can affect gettext script picking up
   marked strings.
 * Added the equivalent deffered translation as gtkui for Filters and Progressbar
2015-08-20 19:37:22 +01:00
522815d266 Remove generated javascript gettext file from git 2015-08-20 18:56:17 +01:00
90db2b4c5c Minor updates to the translation scripts
* General cleanup of code.
 * Add commandline folder option to js gettext script.
 * Include webui render html files to pot template creation.
2015-08-20 18:51:09 +01:00
8dd918f2a4 [WebUI] Fix i18n issue in Connection Manager
The status strings were incorrectly marked for translation which when combined with
some translations using 'connected' and 'online' as the same word resulted in
users being unabe to connect to running daemon.

 * Removed translation markup from json_api but left as original capitalised word in
case other third-party scripts do comparison on these status strings.
 * Added translation markup prior to displaying ConnectionManager using template.
 * Reworded password prompt and added translation markup.
 * Update gettext.js
2015-08-20 13:59:02 +01:00
b1df44cf05 Update author name as per request 2015-08-17 23:03:48 +01:00
bb5f20e3de [Tests] Fixes in test_tracker_icons.py
* Removed publicbt.org test as server is down
* Replaced ubuntu.ico with ubuntu.png to make the test pass
2015-08-14 16:45:23 +01:00
9d662bf059 [Tests] Fix code for isort 4.0.0 2015-08-14 16:45:23 +01:00
379ba33bb9 [Tests] Fix Xvfb for GTKUI tests running on TravisCI 2015-08-14 16:45:23 +01:00
a39ebae0cd [#2295] [WebUI] Increased lifespan of display settings
Display settings for the WebUI are persisted using cookies created by
Ex.state.CookieProvider. When no expiration date is provided, a default
value of (now + 7 days) is used. This causes display settings to be
lost frequently.

This fix adds an 'expires' parameter with a value of (now + 10 years).
This change does not affect the lifespan of the session cookie, which
is created by a separate system.
2015-08-14 15:58:18 +01:00
cbb60e3c3a Update man pages 2015-08-14 13:27:06 +01:00
6020809462 Minor cleanup of minify js script 2015-08-14 00:17:48 +01:00
4196912966 [#2730] Fix Deluge dev versions not starting
Using latest versions of setuptools (>11.3) resulted in deluge version strings
that contain 'dev' to produce a ValueError.
2015-08-13 23:04:01 +01:00
8c4154bc1a Fix the output of minify js script
The order of the js files matters when minifying.

 * Use the '.order' files to put specified files top of the file list.
 * Sub-directory files inserted in list before root directory files.
 * Sort everything else alphabetically for consistant ordering.
2015-08-13 23:04:01 +01:00
a391bbd67b Workaround for js files generating warnings with generate_pot script
With xgettext set to python it will parse the comments in javascript files, so
single apostrophes or quotes are flagged as 'warning: untermined string'.

This change just rewrites js comments to not use apostrophes.
2015-08-13 23:04:00 +01:00
576df1f6e3 [GTKUI] Improve About dialog copyright format for translators 2015-08-13 23:03:22 +01:00
4ba98c997a Remove stray tab in label plugin text 2015-08-09 12:19:24 +01:00
9726481fb4 [#2733] [Core] Fix on_alert_performance - UnicodeDecodeError 2015-02-23 12:43:27 +00:00
2c7bbc6ade Fix for Twisted 15.0 URI class rename 2015-02-23 12:35:45 +00:00
faf3f96322 [#2250] [WebUI] [Console] Use new core.remove_torrents method 2014-12-03 17:32:47 +00:00
08363f28dd [#2250] [Core] [GTKUI] Added method remove_torrents to core
Removing multiple torrents with remove_torrents will be faster
than calling remove_torrent for each torrent, as the state file
will be written only once, after all the torrents are deleted.
2014-12-03 16:46:24 +00:00
2aaae7c6a1 [#2406] [Core] [GTKUI] Implement core.add_torrent_files
* Speeds up adding multiple torrents
2014-12-03 15:36:06 +00:00
41f08e4e29 [#2702] [GTKUI] Fix potential markup warning in Details Tab
* Comments with HTML markup cause a GTK markup warning.
 * Use cgi function to escape '&', '<' and '>' to prevent pango markup error.
2014-12-01 13:50:39 +00:00
0ea6ad0669 [GTKUI] files_tab: sort by name by default 2014-12-01 10:59:09 +00:00
cdeb3c211b [#2670] [GTKUI] optimize file trees according to pygtk tips
Use a context manager to wrap the common steps:

1) disconnect the treestore from the listview
2) disable treestore sorting
3) add rows (different in add dialog vs files tab)
4) enable treestore sorting
5) connect model to listview
2014-12-01 10:58:49 +00:00
ea028c7531 [#2670] [GTKUI] addtorrentdialog: fix O(N^2) algorithm in add_files by recalculating folder state once instead of per-child 2014-12-01 10:58:42 +00:00
8d3ba87c63 Temporarily disable testcoverage in travis build 2014-12-01 10:52:16 +00:00
448261394f [Tests] Changes to tests and test configs of Travis/tox
* Added pip chaching
* Added disable_new_release_check to tracker icons tests
* Fixed test_torrentview
* Require minimum tox version 1.8
* Fixed GTKUI tests and testcoverage by using xvfb on travis
* Separated the apt dependencies for commands requiering GTKUI deps
2014-12-01 10:52:16 +00:00
8334bf9477 [Tests] Various fixes for unit tests and tox
* Added custom trial reporter for TODO with test example in test_torrentmanager.py
* Set Stats plugin tests as todo
* Disable new_release_check when running unit tests
* Added pytest.mark.slow to test_core.test_test_listen_port
* Get rid of unit test warnings (Caused by bad names in test classes)
* Removed warnings.filterwarnings in test files.
* Added separate tox target for generating test coverage HTML report.
2014-12-01 10:52:16 +00:00
178c417fb0 [Core] [Tests] Changes to component.shutdown and unit tests
* component registry shutdown() now cleans up the component list
  this ensures that no old components are left when running unit
  tests.

* Added class BaseTestCase that all tests that create components
  should inherit from. It verifies the compoent list before and
  after the tests are run.
2014-12-01 10:52:08 +00:00
a9e7aec5b6 [#2698] [GTKUI] Fix corrupted column indexes when using multiple col_types
* Ensures that removing multiple items from liststore_columns list does not affect the index.
2014-11-29 15:40:07 +01:00
a68d836beb [#2256] [GTKUI] Indexes aren't updated properly when removing columns 2014-11-29 15:40:07 +01:00
1e75b7bd12 [#2676] Add pilow and appindicator to DEPENDS 2014-11-25 19:04:58 +00:00
dd8d2c8557 [GTKUI] [Win32] Fix 'access is denied' with magnet association
* Issue occurs with user without administrator privileges
 * See github pull request #19 for details
2014-11-25 18:51:34 +00:00
aede6f9ce5 [WebUI] Add missing column entries to Torrent Record 2014-11-21 00:12:06 +00:00
376a92f554 [WebUI] Remove unneeded grid key and fix torrent record 2014-11-21 00:06:03 +00:00
cb37198a9d [WebUI] Modify SSL Context to allow >=TLSv1 protocol
* The TLSv1_METHOD is a fixed protocol version so this change will allow higher versions to be used where possible.
2014-11-20 15:19:18 +00:00
3689eb508e [#2555] [Core] Disable use of SSLv3 for DelugeRPC 2014-11-20 15:19:09 +00:00
af95fb0828 [Core] Remove old windows cache fix
This removes a fix for #1869 (using 0.15 lt) that is now fixed properly in 0.16 lt.
2014-11-18 10:13:55 +00:00
bdca70b330 [WebUI] Security update for POODLE vulnerability
WebUI with HTTPS enabled is vulnerable to POODLE (CVE­-2014­-3566), so switch from
SSLv3 to TLSv1.
2014-10-15 19:06:35 +01:00
bd2abb0127 Update copyright year in About dialog 2014-10-04 18:37:01 +01:00
d805f99534 [#2335] [GTKUI] Fix startup failing with 'cannot acquire lock'
This issue was caused by an unclean shutdown of Deluge, usually on system shutdown, and upon rebooting
the PID stored in the lockfile is in used by another process thus the lockfile is never removed. It
affects users with Deluge set in startup applications as the PIDs are more likely to be reused.

 * Lockfile is removed if Deluge is restarted in IPC.
 * Renamed the old_tempfile variable to make it clearer as to it's role.
2014-10-02 17:34:49 +01:00
11c6e387d5 [#2510] Fix config type checking 2014-09-28 10:33:21 +01:00
3b950094af [#2510] [Tests] Add config test for overwriting None value 2014-09-28 10:33:10 +01:00
dd8e37a6ce Workaround for the isort Travis issue by using order-by-type
See isort issue: https://github.com/timothycrosley/isort/issues/185
2014-09-26 13:06:11 +01:00
62a9e3921d Revert to isort diff output 2014-09-25 23:59:49 +01:00
bdf39c1e89 Switch from PIL to pillow for tox and rtd 2014-09-25 23:57:52 +01:00
784ecb94ea Fixes for flake8 and rtd 2014-09-25 23:10:22 +01:00
23ab85e253 Refactor/cleanup of tox.ini
* Removed unused mock dep
 * Modified flake8 to run entire codebase (fixed exclude)
 * Change isort to shows files that need attention (no diff)
 * Uniform layout for tox.ini
 * Change flake8 complexity to 15
2014-09-25 22:12:09 +01:00
bb9702910b Update docs tests 2014-09-25 22:12:00 +01:00
284b86ebb6 Fix running docs build from setup 2014-09-25 21:05:57 +01:00
3d4ea71dcf Fix isort config 2014-09-25 16:12:43 +01:00
b66f313c2d minor code cleanup 2014-09-25 15:56:05 +01:00
7e86b41f92 Add isort thirdparty config for Travis 2014-09-25 15:55:32 +01:00
fedca3167d [Docs] More fixes for testing with tox 2014-09-25 15:20:15 +01:00
6a5982f3ce Small fixes for Travis and isort 2014-09-25 14:25:03 +01:00
4472c37884 Disable plugins test due to Travis issue
An unknown issue with running the Stats plugins test on travis means it
never passes.
2014-09-25 14:13:18 +01:00
66f2739be7 Added .travis.yml (for travis-ci) and tox.ini files
Targets:

* Runs the unit-tests for python 2.7
* Tests unit-test coverage
* Try to build docs
* Code style checks:
  * flake8
  * isort

Codes changes:
* Fixed tests for httpdownloader (using tmp dir)
* Implemented a couple of tests for Stats plugin but they fail to run on travis

Issues:
* Can't get py26 to work because of installing libtorrent through apt and
  the option system_site_packages fails for 2.6.
2014-09-25 14:11:51 +01:00
8dc9a0773c Fixes for building docs 2014-09-25 13:43:43 +01:00
72493e6af3 [Extractor] Add Finding Win 7z Path via Registry 2014-09-24 22:41:18 +01:00
a26c5eb56e Merge branch 'Feature/win32_associate_magnet' into develop 2014-09-23 20:23:00 -04:00
14ee13bdd4 [GTKUI] Fix magnet association button on Windows 2014-09-23 20:22:24 -04:00
3b22dcadc9 Correction for Flake8 func rename in log.py
Broke the retrieval of logging lines.
2014-09-23 10:08:50 +01:00
b19845bf93 More fixes for previously overzealous changes to setup.py 2014-09-23 09:09:49 +01:00
f2d81ff542 Update headers and isort imports 2014-09-23 08:39:29 +01:00
966f10bcb7 Fix RTD badge in readme 2014-09-22 19:18:34 -04:00
8ba0e7ce0e [Extractor] Fix absolute/relative import 2014-09-22 18:35:13 +01:00
d9522261b1 [GTKUI] Allow the Tabs area to be resized smaller
* Tabs can now be scrolled if too many for height.
 * Change window_pane_position default to 235, based on default 480 window height.
 * Set the vpaned size before show call.
 * Reduce top padding and set bottom padding to 2, to account for decender letters.
2014-09-22 15:09:21 +01:00
83262afda1 Flake8 codebase
Fixes error E265 and E714 that have been added to newest version of pep8
2014-09-22 12:46:18 +01:00
142e96b246 Autopep8 E265 2014-09-22 12:46:17 +01:00
2f68092740 Flake8 add global __request__ to config 2014-09-22 12:46:17 +01:00
c115738535 Rename README to README.rst
Update rst formatting in readme
Add RTD and Travis badges to README
2014-09-21 14:28:59 -04:00
9b2283972c Add twisted and pyopenssl to rtd_requirements.txt 2014-09-20 21:48:46 +01:00
5537d59fb8 Fix typo in rtd_requirements.txt 2014-09-20 21:32:34 +01:00
18bcf2d588 Add requirements file for readthedocs sphinx extension 2014-09-20 21:24:11 +01:00
ebcf14df06 [Console] Fix import typos 2014-09-20 20:47:13 +01:00
9a801b4b93 Fix docstring errors raised by spinx docs build 2014-09-20 20:46:03 +01:00
6b7df9ca08 Add version fallback for sphinx build with readthedocs 2014-09-20 20:44:55 +01:00
5cc5d2e811 Fix overzealous changes to setup.py 2014-09-20 18:55:21 +01:00
a4edb0080b Fix for building sphinx docs 2014-09-20 18:43:09 +01:00
fc9017cfb1 Update with new license header 2014-09-19 19:21:42 +01:00
30a0f3c9ed Flake8 pass of entire codebase
* Use the inline '# NOQA' to supress N802 lower-case warnings
2014-09-19 19:10:14 +01:00
d0b8e17873 Add workarounds for isort
* Add workaround for unicodedata issue
 * Change line length to 120
 * Skip gtkui.py to stop it moving local imports above the install reactor line
2014-09-19 15:58:43 +01:00
b8ab6e4083 [Tests] Replace module import with sys.modules 2014-09-19 13:40:39 +01:00
09c6e0cb5c Remove gtkui specific func from path_chooser_common 2014-09-19 13:39:50 +01:00
6e0e01225e [Plugins] Fix relative imports to use dot notation 2014-09-19 13:39:50 +01:00
268c8d608c [WebUI] Add reduce import for Py3 compat 2014-09-19 13:39:50 +01:00
fbcddff6ea [WebUI] Replace func_globals with __globals__ for Py3 compat 2014-09-19 13:39:50 +01:00
08b61eb50b Change imports to use absolute paths 2014-09-19 13:39:41 +01:00
45ef6ac56d [Console] Flake8 all files 2014-09-18 17:23:52 +01:00
a68c3140af [GTKUI] Fixed incorrect column for searching in treeview 2014-09-10 12:50:45 +01:00
91943ba7e3 [WebUI] Small fixes to text labels 2014-09-04 10:41:48 +01:00
403fdb31a1 [WebUI] Fix isort error in auth 2014-09-04 10:40:57 +01:00
20b05ae595 Remove unneeded ez_setup and 'isort' imports 2014-09-04 00:37:57 +01:00
5167e93d12 Flake8 core and common files
* Added N802 to flake8 ignore as certain inherited funcs cannot be changed
   to lowercase and this unresolved warning hides other errors/warnings.
 * Include new header
2014-09-03 23:48:34 +01:00
5d88504c34 [GTKUI] Fix isort error in gtkui 2014-09-03 23:30:14 +01:00
3315768b27 [GTKUI] All files Flake8'd and use new header 2014-09-03 23:30:14 +01:00
b5dcfc6f9e Sort/prettify imports with isort 2014-09-03 18:27:32 +01:00
1ca08ccf95 [Python-Modernize] Replace im_self with __self__ 2014-09-03 17:22:39 +01:00
fc7a136c70 [Python-Modernize] lib2to3.fixes.fix_numliterals 2014-09-03 17:22:39 +01:00
e24e5916e0 [Console] Replace set with list 2014-09-03 17:22:39 +01:00
4afd2513fa [Console] Fix typo in info 2014-09-03 17:22:39 +01:00
7cdedbea1f [Python-Modernize] libmodernize.fixes.fix_raise 2014-09-03 17:22:39 +01:00
38bc5d07f0 [Python-Modernize] lib2to3.fixes.fix_ws_comma
* Fixer that changes 'a ,b' into 'a, b'.
2014-09-03 17:22:38 +01:00
3a53f4002a [Python-Modernize] libmodernize.fixes.fix_print
* Replaces print with print()
2014-09-03 17:22:38 +01:00
1e6c811768 [Python-Modernize] lib2to3.fixes.fix_except
* Use 'ex' instead of 'e' to conform with pylint
 * Minimal Flake8 on some files
2014-09-03 17:22:38 +01:00
95f859673e [Python-Modernize] lib2to3.fixes.fix_has_key 2014-09-03 17:22:38 +01:00
682acc11ec [Tests] Update ubuntu icon 2014-09-03 17:22:21 +01:00
ec8d48f4fd [GTKUI] Tweaking layout of Status and Details Tabs 2014-09-02 12:48:02 +01:00
4f3fcac2bf [GTKUI] Add padding to count in sidebar 2014-09-01 22:24:19 +01:00
430f9c01d7 [#2472] [GTKUI] [WebUI] Add anonymous_mode UI prefs 2014-09-01 22:08:48 +01:00
184d6be98d [#2472] Add support for anonymous_mode 2014-09-01 21:57:09 +01:00
2a50159978 [#2497] [GTKUI] Fix the queue 'Clear' button not properly clearing. 2014-09-01 21:31:17 +01:00
5a6f202cf1 [GTKUI] Rework the sidebar layout
* Changed variable names to be less confusing.
 * Flake8'd.
 * Move the 'count' to a separate render cell.
 * Reduced size of expander icon to make it less intrusive.
 * Enabled ellipsis on labels so count is still visible.
 * Used pango markup on cell labels and count.
 * No longer set a fixed colour to fix #1193.
2014-09-01 19:25:44 +01:00
e97140cbde [GTKUI] Reduce status tab border to 1px 2014-09-01 19:06:02 +01:00
ecb4f0e9da [#2496] [GTKUI] Fix updating core_config before setting default options
* Remove duplicate entry in init.
 * Call update if empty config and prevent potential loop in update method.
 * Ensure that the queue Add button is sensitive, even when automatically adding.
2014-08-31 14:50:55 +01:00
57b594041a [#2493] [GTKUI] Fix TypeError if active workspace is None 2014-08-25 16:30:19 +01:00
2df2f882e0 Use list comprehension in get_file_progress
Should be slightly quicker with large numbers of files.

Also moved socket import to the top as it will always be imported.
2014-08-24 11:01:37 +01:00
da254a80cf [GTKUI] Add associate magnet reg in Windows 2014-08-24 10:51:47 +01:00
4ad45b2d4a No need to use get_status in Torrent class 2014-08-23 22:22:09 +01:00
a9293285a0 Flake8 rencode
Fixes a function declared twice and a few indentation issues
2014-08-23 22:22:09 +01:00
b4b58380b6 Refactor Torrent _get_pieces_info method
Code is now easier to read and should be a bit faster
2014-08-23 22:22:09 +01:00
48f79dbfca [GTKUI] Move 'Add Dialog' prefs to Download tab
Also includes more tweaks to layout for consistency and creating space.
2014-08-22 22:02:09 +01:00
5c82c144cf [GTKUI] Convert the appindicator option into a radio button 2014-08-22 22:01:23 +01:00
849101950f [GTKUI] Tidyup Preferences Dialog
* Remove unnessary page headers to save space
 * Reordered pages to be lightly grouped
 * Other changes to utilise space better
 * Fixed the plugin info panel collapsing on startup
2014-08-22 17:41:19 +01:00
210acf68c1 [GTKUI] Change tabs from top to left side 2014-08-22 17:41:13 +01:00
6bbb9832e9 [GTKUI] Remove icons from Tabs 2014-08-22 17:40:57 +01:00
1bc92ed3e3 [GTKUI] Move Piece colour chooser below checkbox 2014-08-22 17:40:25 +01:00
6496383e82 [GTKUI] Reorganise layout of tab items and add Tracker tab
* Changed layout of Status, Details and Options tabs.
 * Moved the Tracker translations to ui.common.
 * Created a new Trackers tab.
 * Added State to progressbar.
 * Translate State in piecesbar.
2014-08-22 14:43:37 +01:00
14776d86f5 Remove duplicate i2p_proxy entry 2014-08-21 13:41:33 +01:00
1de0c30bb0 Disable SSL listen port 2014-08-21 13:40:07 +01:00
b296803e01 Use int function to cast proxy type 2014-08-20 16:58:25 +01:00
68b893fa02 Log errors for invalid interface values 2014-08-20 16:55:07 +01:00
05792809b5 [GTKUI] Strip whitespace in the interface entry box 2014-08-20 16:34:43 +01:00
068cce353a Code cleanup for core files 2014-08-20 15:10:59 +01:00
82f2fc67c2 [Notifications] Small layout fixes for web page and version bump 2014-08-19 16:28:21 +01:00
b77c4682d1 [#1310] [Notifications] Add webui prefs page 2014-08-19 16:12:56 +01:00
42b3edff64 Fixed bug in Blocklist WebUI pref page 2014-08-19 16:12:55 +01:00
83c0f8a16e [WebUI] Fix tracker_host mistake 2014-08-19 15:48:25 +01:00
af9fa15636 Replace use of status key 'tracker' with 'tracker_host' in UIs
* Status key tracker can be empty so use tracker_host instead, also tracker_host
   is nicely formatted.
 * Remove unneeded tracker_host string from tracker_status.
2014-08-19 15:39:12 +01:00
061590665e Remove obsolete set_state method 2014-08-19 15:39:12 +01:00
49ed3db352 Replace try statement for LT_TORRENT_STATE_MAP lookup 2014-08-19 14:31:00 +01:00
32330f99fc Flake8 core files 2014-08-19 14:22:19 +01:00
a2c3fb3d5e [WebUI] Flake8 files
* Does not pass cleanly due to camelcase function names and __request__ global.
2014-08-19 13:01:18 +01:00
069d820d39 [WebUI] Cleanup of css files
* Consistent indent and line endings
 * Remove unused redo icon
 * Minify extensions css
2014-08-19 12:52:03 +01:00
1700b75cfe Fix firing of Finished event when moving 2014-08-16 22:49:13 +01:00
64d06f5650 Fix showing wrong state for finished torrent 2014-08-13 22:45:53 +01:00
97533145a7 Revert "Fix strange resume_data bug causing fastresume not save on shutdown"
This reverts commit 2449f5b99e.
2014-08-13 21:32:46 +01:00
8c6758720d Replace pause_all with pause_session
* Replace pause_all and resume_all with pause_session and resume_session
 * Pausing all the torrents individually loses the original paused status
   so use the libtorrent session pause instead.
 * Added a SessionPausedEvent to the method.
2014-08-12 18:21:12 +01:00
d0718df82b Refactor torrent.update_state 2014-08-12 00:31:00 +01:00
f81cc81e20 Add --sort option to deluge-console's "info" command. 2014-08-10 17:45:14 +01:00
79023eb5c6 Add seeding_time, active_time and tracker_status to deluge-console's "info" command. 2014-08-10 17:37:41 +01:00
35f7526c2a Fix spelling error in deluge-console output. 2014-08-10 17:32:16 +01:00
f8eede78ca [AutoAdd] Add Skip Hash Check option 2014-08-10 14:27:47 +01:00
a38186857d Flake8 Autoadd 2014-08-10 14:27:47 +01:00
66ae8bdd5c [#1294] [GTKUI] [WebUI] Add Skip File Hash Check
* Altered the core code so that seed_mode is now a torrent option.
 * Made some minor improvments to the Add Dialog
2014-08-10 14:27:47 +01:00
d108091511 [GTKUI] Remove dialog focus should be on Cancel button 2014-08-10 12:08:47 +01:00
29a05978ec Flake8 addtorrentdialog 2014-08-09 23:40:59 +01:00
7e4d50b406 Fix for Indicator icon label issue 2014-08-09 22:16:36 +01:00
90419a4f2d [#2450] [WebUI] Fix empty Peers tab
Also fix missing flags and tracker icons.
2014-08-09 21:54:47 +01:00
8cc96d9b89 [GTKUI] Cleanup Standalone/Thin client dialogs 2014-08-09 21:54:47 +01:00
dc7a4df39a More changes for consistent naming of download location 2014-08-09 15:04:14 +01:00
a1bc11ec09 Consistent naming of torrent download location to Download Folder
* Replaced the deprecated use of torrent status save_path with download_location.
 * UIs now use 'Download Folder', replaces 'Save Path', 'Download Path', '... Storage', etc.
2014-08-09 00:39:29 +01:00
711962da84 Flake8 files_tab 2014-08-09 00:39:29 +01:00
c5f7eeaacb [#2098] Add function to highlight the torrent folder/file
* Will show/highlight a file path in system file manager. *nix uses dbus with an xdg_open fallback.
 * [GTKUI] Open Folder still opens the download location but now shows the torrent data file/folder
 * [GTKUI] Files_tab now has a second menu item 'Show' to show a file's location
 * The open_file and show_file functions now use timestamps on *nix so that windows open in front, this fixes recent desktop changes that prevent windows randomly stealing focus.
 * Removed utf8 decode for Windows. All paths should be unicode
string, any resulting errors should be traced to source and corrected.
2014-08-09 00:39:28 +01:00
670cd21685 [GTKUI] Suppress unimportant gnome warnings 2014-08-09 00:15:47 +01:00
9ba07d3883 [GTKUI] Fix showing the open_folder menuitem
The menuitems would disappear and not reappear if switching between localhost
and remote daemons.
2014-08-09 00:07:08 +01:00
713e264061 Fix for moving progress with no data downloaded 2014-08-08 19:26:37 +01:00
21f18a75bb codepaint plugins js files 2014-08-04 23:48:35 +01:00
3e610ec5ba [#2470] [Console] Fix console parsing args
This negates the need for quoting a single command with an arg e.g.
    deluge-console del --remove_data torrrent_file

Multiple commands separated by semi-colon still require quoting.
2014-08-04 22:27:30 +01:00
e8288eec6a [WebUI] Update from config upon showing plugin page 2014-08-04 22:26:21 +01:00
936ae3b171 [Blocklist] Flake8 and bump version 2014-08-04 18:44:53 +01:00
834d30f85f [#2478] [Blocklist] Add WebUI plugin page 2014-08-04 18:44:52 +01:00
231c17f6a9 Clean up remove dialog handling a bit more 2014-08-03 21:27:46 -04:00
acf2ad2f0c Fix the remove with data checkbox not working in gtkui 2014-08-03 21:06:12 -04:00
59f82f204f Oops, accidentally renamed a variable 2014-07-31 23:20:38 -04:00
02cfc40e94 Fix move completed sometimes not moving finished torrents 2014-07-31 23:16:30 -04:00
b9338a639e Fix issue restoring torrent state 2014-07-31 22:09:23 -04:00
205444f670 [WebUI] Fix json import 2014-07-22 23:34:19 +01:00
480347296b Fix a mistake in tm finished alert 2014-07-19 20:08:47 +01:00
7b53486821 Use stdlib json
Some flake8 changes and DEPENDS tidyup
2014-07-19 11:32:17 +01:00
49c2be40ab Use flush_disk_cache as a shutdown marker
This is a hacky fix for waiting_on_resume_data not being empty on
shutdown. This issue needs further investigating.
2014-07-18 13:25:50 +01:00
a65603e10c [#1032] Keep track of torrent errors over restarts
* Add error_statusmsg to TorrentState
 * Adds a new set_error_statusmsg() method to force torrent error state.
 * Any torrent in error state will remain in that state on restart with
   additional message in status.
 * Any new libtorrent errors will override manually set ones.
2014-07-18 13:08:47 +01:00
7393d31208 Refactor TorrentState to build the class attributes 2014-07-18 12:46:56 +01:00
c82164c522 [#2161] Save magnet torrent_info to 'copy of' location
When magnet metadata is received a torrent file will also be written
to 'copy of' location if requested.
Modified the code for saving torrent file to state in Torrent class for
use by TorrentManager.
2014-07-18 00:35:26 +01:00
e30e2ef2c3 Fix mistake in convert_lt_files 2014-07-18 00:03:11 +01:00
9347a78482 Refactor and tidyup code in torrent.py 2014-07-17 21:55:57 +01:00
25c7e40574 [#2347] Add orig_files to core 2014-07-17 21:55:51 +01:00
739d8f329a [#1859] [GTKUI] Improve layout of Remove torrent dialog
* Using Shift+Del will now pre-select removing files.
 * Will now show the name of the individual torrent being removed or the
   total count if multiple torrents selected.
2014-07-17 00:12:23 +01:00
2449f5b99e Fix strange resume_data bug causing fastresume not save on shutdown 2014-07-17 00:11:15 +01:00
b3e323462c Change logging of 'creating backup' to debug level 2014-07-16 21:25:05 +01:00
bf9bd267fd Fix typo in loading peers_tab state 2014-07-16 18:21:30 +01:00
8685c7a604 Show actual error in status from storage_moved_failed_alert 2014-07-16 18:07:12 +01:00
62cca045be [#637] Add a Moving storage state along with progress
Uses attr Torrent.moving_storage for now but can be replaced with
future lt1.0 status field.
Refactored the code to use the common.TORRENT_STATE list.
Added a translating dict to ui.common to aid translation of state text.
2014-07-16 17:43:12 +01:00
bd119bccf4 Fix move storage dialog not closing 2014-07-16 17:43:11 +01:00
8920db694c Use true division 'from __future__ import division' 2014-07-16 17:43:11 +01:00
d51ad7718c Update TorrentManager docstrings and remove old load_torrent method
Passes flake8 and mostly passes pylint
2014-07-15 15:26:35 +01:00
e66c854be5 [#2238] [Scheduler] Fix undefined this.scheduleCells 2014-07-13 23:07:29 +01:00
cd8bef964a [Extractor] Tidy plugin code and add webui page 2014-07-13 14:12:31 +01:00
4d5e01abef [#1290] [Execute] Add TorrentRemoved event 2014-07-13 14:12:31 +01:00
7b44980912 [#1126] [#2322] Emit FinishedEvent after moving storage complete
Also changed the Execute and Extractor plugins to process the updated
FinishedEvent functionality.
2014-07-13 14:11:47 +01:00
7c22135bb4 [Execute] Tabs to spaces 2014-07-12 21:38:28 +01:00
21691c5cc1 [Extractor] Replace module which with twisted.python.procutils.which 2014-07-11 18:59:52 +01:00
533bdd398a [WebUI] Fix missing ext-extension files in build 2014-07-10 15:29:34 +01:00
98b54e6682 Rewrite the webui minify js script in python
Also replaced minifier 'yui-compressor' with pure-python 'slimit'.
2014-07-10 15:05:52 +01:00
5eba762a20 [GTKUI] Fix text typo and mark for translation 2014-07-09 19:39:29 +01:00
27682cb666 [#2464] [GTKUI] Fix unable add trackers in createtorrentdialog 2014-07-09 18:52:40 +01:00
67873f39dc [#2418] Fix WebUI error when adding non-ascii torrent
json.dumps attempts to decode (utf8) the 'path' entry which had a
alternative encoding. The solution is to ensure the 'path' entry is
utf8 encoded and remove the unneeded 'path.utf-8' entry.

As self.__m_metadata["info"]["files"] is updated the later code
checking and decoding the 'path' entry can be removed.
2014-07-08 15:32:03 +01:00
7aa52e5f1b Prevent private flagged torrents auto-merging trackers
When adding a torrent already in session any new trackers are merged
to the exiting torrent but this is an unwanted feature for private
flagged torrents.
2014-07-07 23:33:45 +01:00
c31c1b00b1 [#2315] [GTKUI] Potential fix for lost window on Win32 2014-07-07 23:33:36 +01:00
52db7df6d8 [GTKUI] Typo causing password dialog to show 2014-07-07 19:59:59 +01:00
c05fa40756 [GTKUI] Flake8 mainwindow 2014-07-07 19:07:35 +01:00
5fdaf73fdf [GTKUI] Fix quitting bypassing password lock 2014-07-07 18:56:47 +01:00
30e5fc83b2 [#2369] [GTKUI] Fix bypassing tray password dialog
Created a generic password dialog and moved the unlock code out of
systemtray so any call to window.present will now show the dialog.

Also fixed the appindicator not showing the correct visible status
2014-07-07 18:49:32 +01:00
4afd1fa91d Remove old sha module import code 2014-07-05 19:43:07 +01:00
c5722011e8 Pylint alertmanager 2014-07-05 16:50:14 +01:00
02592e1b5e Set alert_queue_size in AlertManager and add logging 2014-07-05 16:50:14 +01:00
ccec01b729 Minor tidyup of core code 2014-07-05 16:06:59 +01:00
6c295cd314 [#2466] [AutoAdd] Fix Copy Torrent File 2014-07-04 21:55:44 +01:00
a9274d4b52 Remove old unneeded send_redundant_have session setting 2014-07-04 21:28:03 +01:00
0a7e02bf34 [GTKUI] Hide the associate magnet button on OSX 2014-07-04 20:49:16 +01:00
19bc0fb468 [#1490] Increase the Alertmanager interval to 0.3s
The original 0.05 interval is causing excessive idle cpu usage
2014-07-04 19:15:00 +01:00
d8a00cf517 [Tests] Update ubuntu favicon 2014-07-02 19:42:57 +01:00
48fb321699 [#2463] [AutoAdd] Fix not loading torrents
The owner attribute for tm.add() method was moved to options dict
2014-07-02 19:32:38 +01:00
f1a9e2ae32 [#2462] [GTKUI] Fix clicking Edit Trackers button in Options tab 2014-07-02 18:29:51 +01:00
2c66f21cc1 [#2461] [GTKUI] Fix createtorrentdialog cell_data_size error 2014-07-02 18:20:44 +01:00
dfed6af0c0 Fixes to resume data saving routines.
* Avoid saving resume data unecessarily by checking the queue of calls
* Removed unecessary LoopingCall for resume data
2014-03-10 14:03:06 +00:00
dbf4f67c55 Update gitattributes file 2014-03-10 13:57:24 +00:00
66b54d6a27 [WebUI] Flake8 web.py 2014-03-06 19:50:40 +00:00
30705d6fc9 [WebUI] Changed --profile to use cProfile 2014-03-06 19:46:27 +00:00
6c74e2d19c [Tests] Fixed tests so that if the tcp port is used, other ports will be tested 2014-03-06 19:08:35 +00:00
973e2d2ef8 [GTKUI] Fix call on sessionproxy.get_torrent_status with bad argument 2014-03-06 19:03:12 +00:00
067ca38321 Update MANIFEST for webui file movement 2014-03-03 19:06:16 +00:00
bc7380c5d7 Add flush_disk_cache parameter to save_resume_data
Using this flag avoids potential issue with file timestamps and
is only needed when stopping the session.
2014-02-25 19:00:50 +00:00
f2535e196d Let save_resume_data build torrent list on stopping session
By having the func build the list we can skip torrents that we already have
resume data for (need_save_resume_data is False).
2014-02-25 18:57:59 +00:00
ea7ef950a3 [GTKUI] Add new OtherDialog to dialogs
This adds a new OtherDialog to dialogs so that will use Deferred to prevent
the dialog loop locking up the mainwindow.
Remove old `Other` dialog from common and cleanup up the file.
Fixes #2401, context menus for torrents not showing current value.
Fixes #2400, add a stop_at_ratio context menu.
Change the protocol rate to display as int.
2014-02-23 18:36:23 +00:00
813261df07 Update internal listview state when saving to disk
Fixes remembering sort column
2014-02-22 14:54:37 -05:00
56d216adf7 [WebUI] Fix typo in statustab 2014-02-22 18:09:26 +00:00
60e60427fc Fix for github code language detection
Moves the extjs framework into subdir that will be ignored by
github's Linguist library so that Deluge is detected correctly
as Python.
2014-02-21 22:39:25 +00:00
49d4bb4969 [#1908] [WebUI] Add bind interface option for server 2014-02-21 18:09:56 +00:00
9eb6b7c52a [WebUI] Fix custom VType 2014-02-21 18:08:06 +00:00
3d4acf7d37 Update docstrings in torrent.py 2014-02-21 10:35:31 +00:00
5e2f6b0f40 Update comment and flake8 listview.py 2014-02-20 19:16:53 +00:00
881da401e1 [GTKUI] Fix column added after restore order func 2014-02-20 19:16:12 +00:00
9290cc1f7a Fix building the code documentation with sphinx
Updated Sphinx conf and tested with Sphinx 1.2.1
Moved webui gen_gettext script
Fixed docstring warning in code
Renamed console update-tracker to update_tracker
2014-02-20 17:38:51 +00:00
c64da3ceb4 Fix missing import, pep8 2014-02-19 23:46:53 -05:00
fff75b51ce [#2373] [OSX] Fix laucher scripts for single leading slash path
On Mavericks the application path passed to scripts only has single leading slash
compared to previous double slash.
Renamed and changed shebang to bash to prevent any issues.
Updated README to rst format for display in trac wiki.
2014-02-19 19:03:53 +00:00
eb804c2a4a Remove debug log line from prev commit 2014-02-19 10:20:22 +00:00
cb87509e4f [#2082] [WebUI] [Console] Validate interface entry for IP address 2014-02-18 21:07:07 +00:00
8d74c3f22a [WebUI] Fix errors from rearranging code in 2294670 2014-02-18 20:46:53 +00:00
22946700dd [#2310] [WebUI] Fix unicode password support
hashlib requires UTF-8 encoded string
Passes flake8 but with warning for global __request__
2014-02-18 00:27:39 +00:00
32d5a0bab2 [2374][WebUI] Fix right-click selection issue 2014-02-17 22:59:10 +00:00
f415fa1a7e [WebUI] Add moved gettext file 2014-02-17 22:03:44 +00:00
66e01991d6 [GTKUI] Rearrange the Status and Details tabs 2014-02-17 22:02:55 +00:00
09b5d2252c remove unneeded gettext line from setup 2014-02-17 16:56:30 +00:00
4a917c95ab [WebUI] Move gettext.js into js dir 2014-02-17 16:52:43 +00:00
65e1f16163 [WebUI] Remove compressed web js files from repo 2014-02-17 16:52:16 +00:00
226d2bb964 [GTKUI] Remove leftover old code 2014-02-17 14:28:55 +00:00
aa5e5178d3 [WebUI][Console] Add missing columns and statuses
Rename 'Seeders' to 'Seeds'
Hide seconds from fdate unless wanted
'Last Seen Complete' renamed to 'Complete Seen'
Added columns and status for Completed date
Rename 'Seeders/Peers' to 'Seeds:Peers'
For translation added colon to WebUI status strings to match GTK
2014-02-17 14:12:32 +00:00
43f12ffdd4 [Console] Reorder prefs tabs to match gtk 2014-02-17 12:53:49 +00:00
14a55133af [#2219] Update the UIs for single Proxy and I2P Proxy 2014-02-17 01:38:02 +00:00
fa0911dbdf Convert proxy config from multi to single setting 2014-02-16 18:39:01 +00:00
a5fa5d0451 [#2219] Add i2p proxy setting to core 2014-02-16 18:34:38 +00:00
59a29d5288 Add sequential download option to webui 2014-02-16 06:12:37 +00:00
67e9787ba1 [#1923] Add pre-allocation and remove compact allocation
Compact allocation is deprecated and a new pre-allocation is available.

Any torrents already using compact will continue to do so but any newly
added only can use sparse (default) or allocate options.

The UIs have been updated to only display a checkbox in preferences for
the user to enable 'Pre-allocate disk space'.
2014-02-16 06:12:37 +00:00
4486592f04 Fix comment quotes changed by previous commit 2014-02-16 00:45:39 +00:00
2ae9a4bdbb Very large refactor and cleanup of torrent.py
Use new docstring format and added to all funcs
Pylint and flake8 fixes; only a few warnings remain for pylint
2014-02-15 23:04:58 +00:00
7dceb629ca Add name to torrent options 2014-02-15 09:27:46 +00:00
0aed074796 Move owner to torrent options 2014-02-15 09:26:08 +00:00
a9ed6fe46a refactor torrent.set_options 2014-02-15 09:26:08 +00:00
1d68579b57 Mark set_torrent_* methods deprecated 2014-02-15 09:23:18 +00:00
f66274fd9d Remove unneeded old 'public' option code 2014-02-12 11:09:39 +00:00
0a001f98e3 Add torrent bandwidth priority to core 2014-02-11 19:57:07 +00:00
0531276b9b [#2417] Add time_since_download and time_since_upload to torrent status 2014-02-11 16:52:14 +00:00
2be5474f3a [#2082] Validate ip address for listen_interface entry
This ensures that only ip addresses are accepted for
listen_interface as libtorrent cannot accept interface
names (eth0) and will cause unexpected results for user.
2014-02-11 16:37:41 +00:00
bddfb2a5c6 Change get_default_download_dir to use expanduser as fallback 2014-02-09 19:27:39 +00:00
dc0000059b GTKUI: Ensure None value from problem config is empty string for set_text 2014-02-09 19:20:06 +00:00
72753a9ccb Fix common.free_space to handle path is None 2014-02-09 19:16:34 +00:00
b193d87499 Include small upstream bencode fix and flake8 file 2014-02-03 13:37:22 +00:00
d9ce4ff634 add comment to tracker_error_alert handler 2014-01-30 13:19:21 +00:00
01ee181607 Fixed glade missing signal warning in path_combo_chooser 2014-01-30 12:01:00 +00:00
2c4af8f136 Fix empty message for certain tracker status errors
By design alert.msg will be empty if the error code is '-1' so use
a.e.message() to get the message as fallback. It was not used at
replacement because when error code is not '-1' then a.e.message()
will also include the error code, which we do not want.
2014-01-30 11:58:04 +00:00
ff8b5aca75 Fix crash if translations are missing 2014-01-27 14:44:29 +01:00
188315735b Fix #2409 : Console Non-interactive curses ImportError 2014-01-27 13:05:09 +00:00
3b79be04bc Flake8'd gtkui/path_combo_chooser 2014-01-21 10:47:16 +00:00
a47b1a28f4 Fixed small bug in path_combo_chooser
The delete-text event was triggered when setting the text in the text entry.
The completion popup was then displayed when it shouldn't. Fixed by blocking
the signal while setting the text.
2014-01-21 02:58:38 +01:00
a2fcaa15c9 Fix #2006 : Display error when moving storage location fails
Adds handler for storage_moved_failed_alert and then sets the
torrent to Error state and pauses it.
2014-01-20 18:49:22 +00:00
35842af019 Add TorrentStorageMovedEvent for #637 2014-01-20 18:49:22 +00:00
7271472e13 Ensure status message is reset after leaving Error state
Also clean up comments in core.py
2014-01-20 18:49:21 +00:00
64fd94e51e Add external ip alert handler to core 2014-01-20 18:49:21 +00:00
ce6abe0247 Fix #1466 : Performance warning: Send Buffer Watermark 2014-01-20 18:49:21 +00:00
c3477ace9b Flake8'd core files 2014-01-18 23:26:18 +00:00
ef7605f9ec Add missing entries to OPTION_FUNCS in torrent.set_options 2014-01-18 22:59:16 +00:00
58e9f66d64 flake8'd torrent.py 2014-01-18 22:14:14 +00:00
7624683710 Add torrent.get_magnet_uri() to return generated magnet uri 2014-01-18 22:07:43 +00:00
b5946c91ed Replace internal time_added with lt added_time 2014-01-18 21:10:31 +00:00
246708e222 Add super_seeding to core 2014-01-18 21:10:23 +00:00
3180bc7104 Use a tmp file when saving state and resume files 2014-01-18 15:54:43 +00:00
d12f0365d5 Handle all-zeros KeyError for removed torrents alerts 2014-01-18 14:11:44 +00:00
01d2ef84ba Fix issue with add_torrent_params flags 2014-01-17 23:43:53 +00:00
80e56eb190 Fix #1000 : GTKUI: Select first row in list if no rows are selected
Also do not remove selection when changing filter (as 1.3 works)
2014-01-17 22:51:54 +00:00
2b64d78163 Remove leftover total_uploaded state code 2014-01-17 19:28:55 +00:00
169b9b9898 Fixes for #607 : Add completed_time to core and Completed column in GTK UI 2014-01-17 19:17:18 +00:00
0da6739f94 Fixes for #367 : Don't store last_seen_complete and total_uploaded in state file 2014-01-17 19:15:38 +00:00
bcbeca4b8a Remove stray debug logging line 2014-01-17 19:08:40 +00:00
9e62304852 More removal of lt deprecated params and funcs
Due to a deprecation mistake get_settings() should be used for python
bindings and it will return a dict.
2014-01-17 18:29:53 +00:00
da6d0ba7bf Replace lt deprecated session funcs with session_settings 2014-01-17 14:18:20 +00:00
ec56ea3ebe Put setup_translation back into start_daemon
A 3rd party plugin broke because using _() in core files so reverting
to prevent issues and may also be useful in future for translating
the help text.
2014-01-17 13:37:07 +00:00
624f2f66cf Replace deprecated session.num_connections with session_status.num_peers
This commit removes get_num_connections() from core and updates UIs
to use get_session_status with num_peers key.

Extra noise is from Flake8 changes
2014-01-17 12:21:08 +00:00
b0c3c3dddc Use non-deprecated libtorrent parameters and functions
Also added support for seed_mode
2014-01-17 10:48:42 +00:00
8eb2155eac Remove torrent_status translations from Daemon and move to UI clients 2014-01-16 23:31:04 +00:00
0a41b86e47 Reinserted call to translate_strings in common and renamed to translate_size_units. 2014-01-16 23:22:28 +00:00
7c808ab4b4 Added language option to Preferences
Changing translation tested and works on:

* Windows 7
* OSX 10.8
* Ubuntu 13.04

* Updated the OSX menubar to gtkbuilder
* Added language names to the Language dropdown in Preferences
2014-01-16 19:54:20 +00:00
d260f6506f Remove unneeded LoopingCall import 2013-12-23 16:22:16 +00:00
8ecc0e11a7 Fix for #1885 and add simple caching to the data funcs for the torrentview
* Fix for #1885 (Wrong tracker icon in torrent list)
* Moved the data functions from torrentview/listview into
  torrentview_data_funcs.py
* Added caching the current value of the cell renderer for the data functions
* Reordered if-tests in deluge.common.fsize
* Disable data funcs when column is hidden
2013-12-23 16:21:24 +00:00
feaeee0379 Removed LoopingCall from torrent.py
Having a LoopingCall for each torrent is expencive with a lot of torrents.
The LoopingCall in torrent.py has been moved to torrentmanager.py
which runs through all the torrents and calls cleanup_prev_status.
2013-11-21 10:48:55 +00:00
de3740fa70 Remove old code line 2013-11-20 23:26:29 +00:00
fe1f620731 Fix web ui showing total_size rather than total_wanted for Size column 2013-11-20 19:36:34 +00:00
63329e7199 Fix #265 : Add new Remaining column 2013-11-20 19:31:04 +00:00
e79cc6cd2d Fix #2381 : Allow silent uninstall for Windows package 2013-11-19 23:03:31 +00:00
6376c49441 Fix #2371 : Add StartupWMClass to desktop file 2013-11-19 23:03:31 +00:00
aafd31b552 Fix #2367 : Private Flag not showing as ticked/checked in DelugeStart theme 2013-11-19 23:03:31 +00:00
2520093b3e Fix #2335 : IPC lockfile issue preventing start of deluge-gtk 2013-11-19 23:03:31 +00:00
3d569b23d6 Merge branch 'master' into HEAD 2013-11-19 23:03:14 +00:00
4ab4998bf7 Fix #2355 previous fix was incorrect - thanks Thomas Hipp 2013-11-12 14:04:01 -08:00
60c53b0ec1 Fix broken last commit to make bbfreeze script work again 2013-09-08 04:13:36 -04:00
852f6049bd Fix twisted 13.1 compat -- the _parse() function was replaced by the _URI class 2013-08-06 18:51:33 -07:00
1daaad422b Improve the bbfreeze script a bit (and hopefully not break it) 2013-07-09 23:48:42 -04:00
f5d8cce4a2 Fix donot option check for windows/osx 2013-06-18 18:46:38 +01:00
9d48d04f0f Fix #2338 : Spelling mistake with occurred 2013-06-09 02:30:26 +01:00
d91a9504aa Fix bug introduced in 19234d 2013-05-27 23:39:43 +02:00
19234d6565 Added some tests for rpcserver 2013-05-26 23:09:02 +01:00
affe47a11c Cache items in get_filter_tree 2013-05-26 21:45:00 +01:00
899c575ae8 Speedup in tracker_error_filter 2013-05-26 21:44:04 +01:00
b76cdc2227 Fix 2247: AttributeError in deluge.error.DaemonRunningError
* Removed all the properties in error.py and added more tests
* Handle failure in client.py handling RPC_ERROR (From older daemons)
2013-05-26 15:25:39 +01:00
a27b479f06 Fix some typos in my previous commits 2013-05-26 14:55:36 +01:00
533228ff5e Fix overzealous legacy code removal from torrentmanager 2013-05-26 01:27:21 +01:00
7dd276631a Add flake8 to setup.cfg and add missed change to #2303 fix 2013-05-22 23:33:06 +01:00
e3f3b6d751 Cleanup torrentmanger code
* Remove legacy/old state file code
 * Passes flake8 cleanly
 * Most pylint messages dealt with
 * Code now uses >=Python 2.6 'with' and 'as' statements
2013-05-22 22:46:01 +01:00
77cb794e4d Fix #2303 : Torrent state not updated until after emitting TorrentFinishedEvent 2013-05-22 19:09:56 +01:00
45f898870f Fix mistake in torrentmanager 2013-05-22 03:01:25 +01:00
5ae74f4017 Fix typo in authmanager 2013-05-22 02:12:00 +01:00
2c4ef9dbb3 Fixup saving and loading state files
* All state files have a backup created before saving
 * The backup will now be used if saving or loading fails
 * GTKUI state files stored in new gtkui_state dir and common load/save functions created
 * Detects bad shutdown and archives timestamped state files in separate config directory.
2013-05-22 01:25:25 +01:00
2bbc1013be Removed call to save_config in path-chooser (obsolete) 2013-05-22 01:10:28 +01:00
4b49e456dd Handle plugin info not available 2013-05-22 01:10:28 +01:00
e2e09200c4 Fix gettext setup in test_common and log in test_transfer so tests run standalone
Add extra tests to test_config
Run the test files through flake8 to tidy up code
2013-05-22 01:06:32 +01:00
28d7c5d44a lower case 'l' for libtorrent in user_agent string 2013-05-21 18:16:06 +01:00
85f9247fd7 GTKUI: Fix Show Zero Hits to only apply to state, owner and tracker_host
There is an issue with the Label plugin where a new label would 'disappear'
and you could not change the options for the new label with zero hits hidden.
2013-05-20 15:41:20 +01:00
f8fbda97cd Fix daemon log being clobbered by running another instance with same config dir
Also includes small fixes and code cleanup
2013-05-20 01:28:31 +01:00
86ac98b9f9 GTKUI: Simplify the quit code for mainwindow 2013-05-19 01:51:55 +01:00
35c85c6d1d daemon code and comment cleanup, removed double call to _shutdown 2013-05-19 01:23:29 +01:00
02bc00bfa5 Small fixes to path chooser
* Handle completion when removing characteres while the popup is visible
* Set Apply button sensitive when changing move completed path in options tab
2013-05-18 22:11:29 +02:00
19184518e9 Fix torrentview exception for self.columns_to_update 2013-05-18 18:27:08 +01:00
85c5449ba8 GTKUI: Display only folder not full path on path chooser 2013-05-18 17:56:57 +01:00
957f04912f GTKUI: Fix layout issues with new path chooser in options tab 2013-05-18 17:56:57 +01:00
e5f7042d00 GTKUI: Asthetic updates to new path chooser options dialog 2013-05-18 17:56:39 +01:00
1596475db2 GTKUI: New path chooser to handle remote paths and store favorite paths 2013-05-18 17:55:25 +01:00
42f5cc382d GTKUI: Modify Show Zero Hits to apply to all filter categories 2013-05-18 02:16:16 +01:00
5479bdd85c GTKUI: More refactoring of filtertree translation text 2013-05-18 02:10:03 +01:00
b4f266457f GTKUI: Remove add_row and use add_rows instead 2013-05-17 17:01:48 +01:00
77bdcfa7a4 Fix seeing double torrents in classic mode
Need to ignore torrent added events from state as they are already
loaded by _on_session_state
2013-05-17 16:15:23 +01:00
235b7348ae Fix test_client test 2013-05-16 12:54:33 +01:00
cf669f3cfa Fix LP#1004793 : Console: Enable use of connect in non-interactive mode 2013-05-16 02:41:59 +01:00
e1b09f2694 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
2013-05-16 02:39:55 +01:00
88dd64e795 Ensure console commands are executed in order 2013-05-16 02:39:55 +01:00
f077030dfc ConsoleUI: quit command now gracefully handles stopping a stopped reactor 2013-05-16 02:37:06 +01:00
836acbf02b ConsoleUI: Tidy up help output and limit command usage message to one line 2013-05-16 02:35:28 +01:00
3101104738 UI client.connect() with no credentials/username now attempts connect using localhost auth file details 2013-05-16 02:31:56 +01:00
391513d378 Remove old plugins 2013-05-15 16:56:31 +01:00
6bed403412 Move stray extractor plugin file to correct location 2013-05-15 16:46:37 +01:00
bc91804996 Remove unneeded dht saving state to separate file
The dht state is now saved by default in the session state by libtorrent
2013-05-15 16:27:58 +01:00
a754f1303f Gtkui: Add an alignment container to radio buttons in interface preferences 2013-05-15 15:18:03 +01:00
65f3c12d2d Move Interface page to top in preferences 2013-05-15 14:47:09 +01:00
879cf1b53c change 'classic mode' checkbox for standalone/thinclient radio buttons 2013-05-15 14:44:02 +01:00
105e4c0555 refactor owner code in torrentmanager add method 2013-05-14 01:59:51 +01:00
f7888757aa Refactor translation code in GTK torrent and filtertree views 2013-05-13 19:43:38 +01:00
1a0ca9edbe Alter return value to -1 for invalid freespace path
Updated GTK and Web UI to display error if value is -1
Added set_markup method to gtk statusbaritem class
2013-05-13 19:07:49 +01:00
a49d558aaf Add default localclient info to localhost items in gtk connection manager 2013-05-11 22:54:38 -04:00
502f135b15 Make sure auth file is closed during get_localhost_auth 2013-05-11 22:54:36 -04:00
e263db90ce Console UI: Fix problem displaying first-run message 2013-05-12 02:56:51 +01:00
7bd53903a4 Rearrange the Network tab in GTK and Web UIs
Also applied the suggestions in #2055 including removing 'Encrypt Entire Stream'
and default it (prefer_rc4) to True
2013-05-12 00:15:15 +01:00
8d63ce3ce5 GTKUI: Add a separator after Plugins in Preferences
To help distinguish where the plugin pages start a horizontal seperator
is now included after Plugins.
2013-05-12 00:10:32 +01:00
bf77f42674 Fix #2217 - handling exceptions with authentication 2013-05-10 16:30:35 +01:00
7424cf2834 Fix error in previous commit (b6a3161) and added test 2013-05-09 22:29:04 +01:00
b6a3161280 Add a get method to config so a default value can be returned 2013-05-09 19:13:20 +01:00
daba92b992 Fix #2324 : Encryption level set by deluge does not match libtorrent values
The clients are using range (0-2) whereas actual bit values are (1-3)
2013-05-09 19:12:38 +01:00
5503f90473 Fix #2285 : Speed optimizations for sessionproxy 2013-05-09 12:10:02 +01:00
d5a3851eef Remove develop_plugins, replace with --develop and --install-dir options for build_plugins 2013-05-06 22:14:52 +01:00
8c6d37d9bd Fix tracker_error_filter typo and tidyup commenting in filtermanager 2013-05-03 19:37:38 +01:00
e6498b6864 Fix #2277 : Plugins keys weren't fetched in filter_torrent_ids
Fixed bug introduced in 8c106ce8c4
where keys for plugins weren't fetched in filter_torrent_ids.
2013-05-03 18:00:37 +01:00
4b31061037 Reword gtk prefs tooltip 2013-05-03 14:01:16 +01:00
6e8e7a63cc #2218 #2254 : Re-enable utpex control and add lt_tex (tracker exchange) 2013-05-03 01:15:38 +01:00
53db149b12 Replace Markup with gtkbuilder atttributes for simpler translation labels 2013-05-02 21:28:47 +01:00
d455d03608 Create new generate_pot.py script for translations
* glade3 files require workaround with intltool-extract
 * webui javascript files are now included
 * fix multiline string for parse
2013-05-02 19:21:46 +01:00
3959b67cc0 move and update createicons & check_glade scripts 2013-05-02 19:01:06 +01:00
04bc23abe9 Change Web interface to fork by default
Implemented to match the daemon's default action and option to not fork/daemonize.
2013-05-02 00:56:35 +01:00
a60dc95fed Fixed tests: sessionproxy/torrent/tracker_icon
* Fixed sessionproxy tests
* Fixed test_torrent messing up component for other tests
* Updated tracker_icon test to use unresized google icon
2013-05-02 01:20:05 +02:00
607be461e0 Fix and update tests 2013-05-01 05:24:36 +01:00
4dd6308db9 Add get_version script to automate release versions (PEP386 naming) 2013-05-01 05:24:36 +01:00
289730a3e3 Make sure prioritize first/last doesn't enable pieces in
a file marked do not download. refs #2211
2013-04-29 18:07:04 -04:00
1d34d5f6a5 Fix #1840 : Refactor last_seen_complete code 2013-04-29 22:32:01 +01:00
64e1ab481b remove libtorrent build code 2013-04-06 12:51:20 +01:00
c92b3debb7 raise lt version 2013-03-29 23:52:26 +00:00
68c41e2915 Update DEPENDS 2013-03-29 23:15:32 +00:00
31929c7004 Change to using pop_alerts to get batches of alerts and save calls
Requires libtorrent >=0.16.7
2013-03-29 23:14:18 +00:00
937419bfcd Update Extractor plugin description, version and modify log levels 2013-03-26 19:45:29 +00:00
9b3ff8f1b8 Fix #2290 : Extractor: Dotted filenames being rejected 2013-03-26 19:18:07 +00:00
a44d86f285 Fix scalable icon install dir 2013-03-24 23:45:39 +00:00
400bd86749 Add pango env vars to osx package script 2013-03-17 19:26:33 +00:00
31ec8830f4 Update osx build and packaging scripts 2013-03-17 18:16:23 +00:00
2a3eb7b70c Fixes bug in core.get_torrents_status where diff was always False
Fixes bug introduced in 5cd86aa5bc where the diff
argument passed to torrentmanager.torrents_status_update is always False
instead of the value passed into get_torrents_status. This causes the sessionproxy
not to function properly which in turn increases CPU usage in the UIs.
2013-03-03 11:29:49 +01:00
e183e2ff04 Fix issue with Plugins that add Tab to torrentdetails 2013-02-27 17:46:46 +00:00
7598312969 Update .gitattributes, Changelog and man files 2013-02-25 23:00:13 +00:00
e62f79d9ae Extractor: Refactor and fix tar.* issue on windows 2013-02-23 02:07:53 +00:00
662849c0c2 Update Extractor with Win32 and extra archives support
Also disabled extracting on move_completed enabled torrents and fixed
some other small issues.
2013-02-23 02:06:32 +00:00
10251e460b Add a new DelugeStart theme to win32 gtk
This theme is based upon ANewStart theme and uses murrine theme engine.
2013-02-22 19:18:28 +00:00
6f9d69f9f3 Disable unused torrentview reordering property which fixes Win32 mouse scroll bug 2013-02-22 01:08:40 +00:00
091b42d317 GTKUI: Changes to autofill save path when creating torrent from remote path 2013-02-21 16:43:50 +00:00
463ac0c07e 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:41:35 +00:00
836178a0da Replace Exception with GError in filtertreeview 2013-02-17 18:40:51 +00:00
1d9b550e35 Replace decode with decode_string 2013-02-17 16:19:13 +00:00
93d4e345b8 Update Changelog 2013-02-17 16:06:49 +00:00
a7cda7011b Build webui js and gettext 2013-02-17 16:06:37 +00:00
763af17e71 Add tracker host details to debug logging 2013-02-17 16:04:22 +00:00
83df1159c0 Fix glade issues in previous commit 2013-02-15 18:04:32 +00:00
a7c5b9f568 Add OSX packaging and GTK support 2013-02-14 00:36:46 +00:00
0da88fc74b GTK: Fix showing exception error to user with no libtorrent installed 2013-02-13 01:33:24 +00:00
b82b313e32 Fix GTK ConnMgr update after stopping daemon and reduce wait time 2013-02-13 01:33:06 +00:00
36d8c5517f Fix renaming folders on libtorrent 0.16 compiled with unicode support (Windows) 2013-02-11 21:26:16 -05:00
b08573831e Merge remote-tracking branch 'bro/master-torrent-encoding-cleanup' 2013-02-11 21:07:11 -05:00
41e3b01285 Removed redundant has_metadata function from torrent.py 2013-02-11 20:17:32 -05:00
cdfb337bae Added GtkAdjustment to the port spinbutton 2013-02-11 20:11:00 -05:00
31ecaacbc8 Replaced ti_-functions with lambdas 2013-02-12 01:21:32 +01:00
5bcb104a01 Cleaned up torrents.py and small change to decode_string
Replaced some try/except-decoding with decode_string.
Removed redundant methods ti_name and apply_options.
In decode_string - changed last encoding (with ignore) from
chardet-detected to the encoding specified in key-argument.
2013-02-12 01:14:57 +01:00
6c75201b2e Fix setting 1GB/s speeds in gtkui 2013-02-11 19:27:07 +00:00
54491a9eaf Add exception details to EventManager error log 2013-02-11 18:38:00 +00:00
c11262082e Fix an issue with daemon speedups with file priorities for magnets
Ensure prioritize_first_last gets set properly for magnets
2013-02-10 23:57:46 -05:00
8c106ce8c4 Merge remote-tracking branch 'bro/master-daemon-optimize-speed'
Conflicts:
	deluge/core/alertmanager.py
	deluge/core/torrentmanager.py
2013-02-10 17:30:25 -05:00
b4f5e78a77 Merge remote-tracking branch 'bro/master-torrentview-speedups' 2013-02-10 17:18:25 -05:00
8735fe14a8 Fix #2258 : Potential runtimeError when emiting event 2013-02-05 18:56:55 +00:00
01c501b172 Fix #2260 : Add dialog pulling main window to active workspace 2013-02-05 18:34:10 +00:00
1f12bab923 Fix #2242 : Notifications: Missing word in torrent finished message 2013-02-04 14:32:39 +00:00
810495264f WebUI: Add failed login log message with IP address for fail2ban 2013-02-04 14:32:32 +00:00
754035c722 Fix #2261 : WebUI: Proxy settings not being saved 2013-02-04 14:32:07 +00:00
fbdda1b3a5 Fixed bug in torrentmanager.separate_keys
If none of the torrent_id's were present in self.torrents,
None would be returned.
2013-01-25 20:13:54 +01:00
a992d8685f Fix issue with downloaded torrent temp files on windows which had illegal characters. 2013-01-20 19:53:26 -05:00
763f5de904 Replace hotspot with cProfile for daemon
Added a twisted signal handler to save profiler stats when
deluged is killed with SIGINT.
2013-01-19 02:23:01 +00:00
4b99a39779 Added decode_string on all calls to alert.message() 2013-01-19 01:41:14 +01:00
5e19fd0122 Fixed bug with handling adding/removing columns in GTKUI.
Also reinserted two lines that were lost when porting patch to master
2013-01-18 23:25:43 +01:00
823a1f0fc4 Make sure sessionproxy events are registered after stopping and starting a daemon from gtkui. 2013-01-17 22:21:03 -05:00
f3722ebc4f 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:19:38 -05:00
fbeea9159e Removed debug print 2013-01-16 00:08:00 +01:00
0f67dc168b Improvements and bug fixes 2013-01-15 23:40:53 +01:00
5cd86aa5bc Optimizations to daemon and rpc messages.
* Implemented torrent updates with libtorrent post_torrent_updates.
  This required some changes to how core/torrenthandler
  handles get_torrent_status
* Reworked how torrent.py handles torrent info
* Removed some unneeded RPC message requests from client.
* Added tests for some expensive log prints.
2013-01-14 03:14:28 +01:00
8cb55983bb Add move complete location to webui add torrent dialog. 2013-01-04 19:19:58 -05:00
ffcfc060e9 Fix mapped_files error in AddTorrentDialog 2013-01-03 17:33:15 +00:00
6313ff19b3 Improved the speed of set_prioritize_first_last in torrent.py
set_prioritize_first_last is rewritten for better performance, and is now only called when necessary. It should now properly set the priority for the beginning and end of each file in the torrent.
2013-01-02 20:20:25 -05:00
61bd8aa154 Fix Gtk addtorrentdialog parent None error for single file torrents 2013-01-02 22:40:37 +00:00
637578375c Fix #2240 : Win32 freespace issue with large capacity drives 2013-01-01 17:51:37 +00:00
18bcdd09d3 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:40:29 +00:00
cc5ef89139 Fix #2241 : Can't add any torrent files with GUI running
This fixes a bug in commit 60f196ff93, adds a test and removes
unneeded ignore when encoding unicode to utf8.
2013-01-01 17:22:00 +00:00
1a9506f832 move misplaced test to correct dir 2013-01-01 17:11:39 +00:00
e7d06ee132 Make web build script sh compatible 2012-12-22 02:34:43 +00:00
7647f848e4 Update Changelog, webui gettext, gitignore & compress js 2012-12-22 02:31:43 +00:00
eec820774b Fix WebUI submenus closing upon mouse click 2012-12-22 01:39:50 +00:00
8cbdaffedb Update the python dependency to 2.6 2012-12-21 15:35:27 -08:00
e6267d9411 Fix issues with js eventmanager. refs #2046
Fix plugin methods not being available when enabled until refresh. refs #2125
2012-12-21 13:26:58 -05:00
8f34e2abdb Clean up some json api code. refs #2125 2012-12-21 13:19:14 -05:00
d3f0e00356 WebUI: Catch potential undefined error when attempting to disable a plugin 2012-12-18 21:53:08 +00:00
7c2725acdc 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:57:12 +00:00
f47c9186bf Fix #1504 - Win32 run deluged as not logged in user via runas or service 2012-12-18 01:15:51 +00:00
c9b77cbe94 Fix #1946 : GtkUI: ReactorNotRestartable error when set as startup application 2012-12-17 19:58:29 +00:00
725230dc81 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:27:50 +00:00
73102f1362 Merge branch 'master' into master-decode-string 2012-12-10 20:34:46 -05:00
ca1a5d33f4 Fix issue when saving resume data fails.
Clean up resume data deferred code a bit.
2012-12-10 20:11:11 -05:00
3bf023e4df fix error in #2085 commit 3ca886ac7a: value may be a tuple 2012-12-11 00:58:02 +00:00
c556613b9f Catch exception when enabling/disabling indicator in classic mode 2012-12-10 19:35:03 +00:00
6c07b7378c 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:55:58 +00:00
4520fdd58b Added priority colors to torrent detail view in console 2012-12-10 14:45:52 +01:00
1ac62fce01 Get cli arguments in unicode in deluge core as well.
Make a better guess at what arguments are encoded in on linux.
2012-12-10 00:19:42 -05:00
c2d301bf52 Make deluge-gtk get arguments as unicode.
Fix a few places that use those arguments.
Make sure gtkui loads strings as unicode from rencode.
2012-12-10 00:19:24 -05:00
8658be3b05 Fix #2227 : Torrent file contains sha1 and ed2k digest that needs encoding to hex 2012-12-09 23:24:01 +00:00
2a8b8e93da Use try-except instead of if statement to gain a little performance 2012-12-09 23:12:26 +00:00
ac6785eb1a Fix #2232 : WebUI: Flag Icon path in Peers Tab missing deluge.config.base 2012-12-09 19:09:57 +00:00
848b14605e Make sure pending gtk events are processed before quitting gtkui. 2012-12-08 17:57:12 -05:00
2a0048afbb Add unit test for new component dependency stopping code. 2012-12-08 16:26:32 -05:00
cc943cea4a Merge branch 'master' of deluge-torrent.org:deluge 2012-12-08 12:57:13 -08:00
2f3623d430 Fix component tests 2012-12-08 12:56:58 -08:00
fe44a5ba69 Fix #2231 : WebUI: Fix unneeded scrollbars in webui add dialog
Also fix spinner display issue
2012-12-08 19:18:51 +00:00
d3a0b9d877 Small tweak to make sure writing fastresume is not skipped when torrents are paused. 2012-12-08 00:39:02 -05:00
25efa5437b Update folder rename to use deferreds. 2012-12-07 22:50:53 -05:00
67b40a8442 Remove unneeded import from torrentmanager. 2012-12-07 22:29:56 -05:00
bcac44bcb4 Increase libtorrent alert queue size. refs #2204 2012-12-07 22:29:49 -05:00
58cb9e1c22 Make sure dependent components are stopped before their dependencies.
Make sure deferreds are not lost in new resume saving code.
2012-12-07 22:22:24 -05:00
ce99b5f688 Refactor resume data saving to not read and write fastresume unnecessarily.
Refactor saving resume data on shutdown to use deferreds.
Make bulk resume data saves write to disk only once.
2012-12-07 22:22:12 -05:00
ce76c278ed fix snafu in last commit 2012-12-05 19:11:06 +00:00
bb5dbecbf2 Fix #2130 : Same name can be given to different files in Add Torrent dialog 2012-12-05 18:28:17 +00:00
eed46994da Fix #2129 : Empty filename can be set in AddTorrent dialog 2012-12-05 18:28:04 +00:00
a5df53249a Fix #2228 : Apply-To-All in AddTorrent Dialog is copying file renames to other torrents 2012-12-05 14:07:06 +00:00
331cef16ef Fix #2220 : MacOSX homebrew build not finding boost libs 2012-12-05 13:50:12 +00:00
e79c695732 Remove some backwards compatibility code for libtorrent 0.14. 2012-12-03 01:18:25 -05:00
b4d7e42973 Update libtorrent minimum version checking. 2012-12-03 01:03:58 -05:00
71183f6c19 Add windows support to is_ip 2012-12-01 02:22:49 +00:00
0b5b585992 Replace subprocess.call with subprocess.Popen to start deluged from gtk client
The use of Popen was originally a fix for a Win32 issue on 1.3 but makes sense to
apply to all OSs and simplify code.
2012-11-30 16:04:15 +00:00
7492d48029 Added test if self.model_filter is None
self.model_filter will be None if no list was ever loaded in the
Client, so listview.create_column_state would fail.
2012-11-30 09:23:42 +01:00
b4903b763e Fix torrent names on libtorrent 0.16 on windows. 2012-11-29 23:26:37 -05:00
3d76ab1832 Update version for rencode module. 2012-11-29 23:11:16 -05:00
48cbf0d9b0 Update Changelog 2012-11-29 22:43:36 +00:00
6b9ae264ff Fix typo in json_api docstring 2012-11-28 23:36:23 +00:00
e90e608fdd Fix #1474 : on_show_prefs hook is not executed immediatly after enabling a plugin 2012-11-27 23:18:12 +00:00
6fe350fa52 Fix #2110 : Accept magnet uris with xt param anywhere within them 2012-11-27 23:18:12 +00:00
c426f998e2 Fix #2147 : Missing translations for plugin preferences page 2012-11-27 23:18:12 +00:00
2187cef14f Add decode_utf8 argument to rencode.loads, which decodes all strings from utf8.
Update rpc protocol to load all strings as unicode.
2012-11-26 23:19:13 -05:00
6b5cf3396d Rencode module now always loads strings as utf-8 encoded byte strings. 2012-11-26 23:19:13 -05:00
4f59a48f57 Fix #2146 : Missing translations in View|Tabs submenu
Also fixed small bug when hiding Status tab
2012-11-27 02:03:25 +00:00
d48d3c9c2f Make sure queue order is preserved when restarting daemon. 2012-11-26 17:19:09 -05:00
4579886bb5 Fix file renaming and moving with unicode characters on libtorrent 0.16
Fix torrent creation with unicode characters
2012-11-26 17:18:41 -05:00
bd979da949 Update Changelog, translation files and compress js 2012-11-26 17:43:41 +00:00
d5e340354e Avoid running chardet in decode_string if not needed 2012-11-26 15:54:01 +01:00
19bbf5ac8f Fix Windows tray submenu items requiring right-click instead of left-click 2012-11-26 13:42:40 +00:00
b8deea5c76 Fix #2208 : Win32 Open Folder not working with non-ascii paths 2012-11-26 13:42:32 +00:00
88223fc058 Fix #2086 : Enable submenus for appindicator 2012-11-26 02:19:33 +00:00
09e43f3e41 Fix use of translated text for widget name in build_menu_radio_list 2012-11-26 02:07:48 +00:00
751bc317ea Fix #2201 : auth fails if auth file has extra newlines 2012-11-26 02:07:43 +00:00
60f196ff93 Changed decode_string to always return unicode. 2012-11-25 20:33:00 +01:00
294fc48bd1 Fixed setting some of the torrent options via the manage command 2012-11-25 20:18:35 +01:00
d3d07f7f11 Fixed setting move on complete option in new console 2012-11-25 20:12:55 +01:00
ca272bb36a GTKUI Torrentview Speed optimizations 2012-11-25 00:40:14 +01:00
cd41089e49 Fix #2069 : WebUI: Login window layout problem when using larger than default font size 2012-11-24 18:19:37 +00:00
b1cf5b9c40 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 18:16:38 +00:00
c37cfdfa2f Fix config not defined in ipcinterface 2012-11-24 18:06:13 +00:00
84bc2e78bc Fix #2103 : WebUI: Sorting by name is case-sensitive 2012-11-24 18:05:04 +00:00
0676d7e2dc Fix #2120 : WebUI: Manually entered values not being saved in Spinners 2012-11-24 17:52:49 +00:00
dd8dac0574 Fix #2212 : WebUI: Unable to scroll in proxy preferences page 2012-11-24 17:49:32 +00:00
d6d1cc5f45 Updates to web gen_gettext script and add .build_data to gitignore 2012-11-24 17:44:49 +00:00
f016160c62 Removing unneeded webui files 2012-11-24 17:43:27 +00:00
7119e0d95f Fix #2100 : Add option not to bring main window to front when adding torrents through ipcinterface 2012-11-24 17:42:24 +00:00
ffb902ba06 updated gitattributes to ignore deluge-web debug files 2012-11-22 23:27:52 +00:00
dc14453f34 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:24:13 +00:00
f83e772030 Make sure 'quit and shutdown daemon' option is not visible when not connected to a daemon. 2012-11-16 00:46:00 -05:00
0c1dd44cd6 Simplify cross-platform clipboard code in gtk add torrent dialog. 2012-11-14 20:58:48 -05:00
5b2be2d190 Update to depend on libtorrent >= 0.16.1 2012-11-13 21:13:59 -05:00
9d28aa9521 Fix bug in prioritize_first_last, also fixes selective downloading. refs #2211 2012-11-13 01:36:04 -05:00
8298a93dcc Make path separators in Torrent.get_files consistent across platforms. 2012-11-12 21:27:08 -05:00
a78731c8cd Eliminate the need to manually call the on_toggle handler for move completed in add torrent dialog. 2012-11-12 21:24:12 -05:00
15492028fc Make sure sensitivity of move completed path is always set correctly in add torrent dialog. 2012-11-10 22:20:27 -05:00
db5a4f84f6 Fix daemon starting with config dir containing spaces on Windows. 2012-11-09 18:24:26 -05:00
4b75ec5b55 Add move completed option to add torrent dialog. 2012-11-07 22:35:41 -05:00
1daae0135d Implement pseudo stable sort in the gtk torrent view. 2012-11-07 19:41:04 -05:00
dd511df194 Replaced WMI process enumeration with the EnumProcesses API call. (Shorter, faster, does not depend on pythoncom.) 2012-11-06 22:31:08 +00:00
e43e4e2ee0 Fix 2107 : create_plugin.py call correct version of python 2012-11-06 22:24:40 +00:00
b67bae31ba Fix #2174 : Console: Unable to add torrent via URL 2012-11-06 21:27:02 +00:00
5cb85472c6 Fix #2185: register call should be deregister in deregister_event_handler 2012-10-14 00:31:45 +01:00
1c865ebeb9 Tweaks to console info code 2012-10-13 02:27:18 +01:00
a18bdcf7cd 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().

Conflicts:

	deluge/ui/gtkui/addtorrentdialog.py
2012-10-06 23:00:30 +01:00
0a36baa7d7 Fix #2171 : Add Peer dialog stops responding if empty or invalid values entered 2012-09-30 18:29:22 +01:00
47958f708f Fix #2104 : Deluge has no indicator title 2012-09-30 18:29:09 +01:00
d030850638 Update Win32 Installer readme
Also remove unneeded StartX.exe

Conflicts:

	win32/Win32 README.txt
2012-09-29 17:22:27 +01:00
9360378ae9 Fix common.open_file for osx 2012-09-29 17:12:48 +01:00
a3268dd403 Console: Fix test for empty color string 2012-09-29 17:12:26 +01:00
b34e38df57 Fix #2112 : World readable tmp directory in json_api 2012-09-29 17:02:52 +01:00
5188750332 Fix 2163 : Cannot add torrent file with empty (0:) encoding tag 2012-09-29 15:03:13 +01:00
7275cdd3d9 Fix exception handling in rencode 2012-09-29 15:03:05 +01:00
f6c201f02f 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-29 15:02:55 +01:00
1ec51cec18 Fix copy pasta fail :( 2012-09-19 22:24:10 +10:00
2531271fe2 Merge branch 'master' of deluge-torrent.org:deluge 2012-09-18 18:00:13 -07:00
9055019cc2 Fix previous commit 2012-09-18 17:59:01 -07:00
9829bec390 Fix execute plugin not working with unicode torrent names 2012-09-16 18:41:40 +10:00
183c47f810 Fix deluge-gtk not working with twisted 12 (fixes #2148) 2012-09-16 18:41:35 +10:00
129c09c5a7 Don't use deprecated twisted imports (fixes #2164)
Aliases have been removed in twisted 12.2.0.
2012-09-16 17:19:46 +10:00
c8384bf304 Update google.ico so tracker_icons tests pass again 2012-09-16 17:14:47 +10:00
5e1caf3746 Add compile arg needed by libtorrent 0.16.x 2012-09-16 15:31:36 +10:00
532b409a54 Only convert the move path to unicode if on windows 2012-09-14 15:55:28 -07:00
7dd4645a7b Quick and hacky fix for console event view crashing on long torrent names 2012-08-26 20:02:59 +02:00
0bf1379cc5 Added active time and seeding time columns to console 2012-08-26 15:00:39 +02:00
6f98e1fddb Don't clobber filename when adding torrents with mapped_files 2012-08-21 18:30:53 -07:00
d3f6616d5d Made status bars update correctly in Legacy 2012-08-20 16:27:15 +02:00
8cdf914f5d Fix to the last fix ^^ 2012-08-09 14:56:23 +02:00
6c6292135f Fixed some problems with help popups 2012-08-09 14:56:23 +02:00
75c4135d6e Made delete key open up the delete torrent dialog in view torrent detail mode 2012-08-09 14:56:23 +02:00
5927f2fa30 Made 'Esc' exit AddTorrents and allowed scrolling with j/k 2012-08-09 14:56:23 +02:00
bd13457f33 Fixed AddTorrents crashing on folders containing unicode characters 2012-08-09 14:56:22 +02:00
8de9843e7e Replaced a dictionary comprehension with dict(list comprehension) to keep 2.6 compatibility 2012-08-09 14:56:22 +02:00
a73fb338f1 Fix console not working with an empty session 2012-08-09 14:56:22 +02:00
ae8751461a Replaced 'inf' with '-' for ratio column in AllTorrents mode 2012-08-09 14:56:22 +02:00
9c0c7b060c Added progress to list of required columns 2012-08-09 14:56:21 +02:00
da5140e615 Fixed (this time properly) crapping out when waiting for torrent data after enabling a column 2012-08-09 14:56:21 +02:00
fa32d4e3f4 Fixed lack of formatting in some of the event messages 2012-08-09 14:56:21 +02:00
52541df3f9 Added another check to prevent event spam when adding a new torrent 2012-08-09 14:56:21 +02:00
39d75ee7d5 Display a 'Please Wait' string instead of crapping out when waiting for column data to be fetched 2012-08-09 14:56:20 +02:00
246a8409bf Fixed a crash when trying to change sort order from an invisible column 2012-08-09 14:56:20 +02:00
c554bf9edd Made scrolling not reset the breadcrumbs in AddTorrents as it's meaningless 2012-08-09 14:56:20 +02:00
ef522ba292 Added scrolling with PgUp/PgDown and Home/End to SelectablePopup 2012-08-09 14:56:20 +02:00
3602fb76c5 Fixed a little problem with multiselection in AddTorrents 2012-08-09 14:56:19 +02:00
8dfc405c3e Added error handling for inaccessible directories 2012-08-09 14:56:19 +02:00
567f4e5c3d Removed debug code, made AddTorrents save path and sorting column/order 2012-08-09 14:56:19 +02:00
57b1820fd7 Got rid of old add torrents dialog and replaced it with a new one that either opens file browser or an add from URL/magnet dialog 2012-08-09 14:56:19 +02:00
6a54c71c94 Wrote a help string for AddTorrents 2012-08-09 14:56:18 +02:00
2b244f0628 Changed format of add torrent reports a bit 2012-08-09 14:56:18 +02:00
be23d00042 Extended torrent add screen with a proper file browser and multiselection. Experimental 2012-08-09 14:56:18 +02:00
d9a2597617 Made wrap_string carry format strings over to the next line 2012-08-09 14:56:17 +02:00
33e5cad75a Made Popup accept a width_req argument 2012-08-09 14:56:17 +02:00
8c9a89bcd2 Added missing coding declaration to manage.py 2012-08-09 14:56:17 +02:00
0c93d20980 Treat empty rename field as canceling the rename 2012-08-09 14:56:17 +02:00
93a0040b68 Added renaming files and folders in a torrent. Note: For the sake of your sanity, if you ever wish to modify this code, better rewrite it from scratch instead. 2012-08-09 14:56:16 +02:00
e4a4f0eb4a Fixed a problem with message popup 2012-08-09 14:56:16 +02:00
78137540f2 First change outside of deluge/ui/console - fixed a problem when removing torrents 2012-08-09 14:56:16 +02:00
76babd951d Fixed a bug that caused torrent options popup to not display in some circumstances 2012-08-09 14:56:16 +02:00
a66bd5e847 Fix crash when entering unicode characters from keyboard into an input popup 2012-08-09 14:56:15 +02:00
dcd3bc10e1 Chaned DL/UL colors on status bar to magenta/green (from green/red) 2012-08-09 14:56:15 +02:00
08f5841522 Performance improvements - console should now be much faster with many torrents and slightly faster to somewhat slower with few 2012-08-09 14:56:15 +02:00
7a55a2e6ce Set default priority for file priority dialog to 'Normal', added colors 2012-08-09 14:56:14 +02:00
ac79938c20 Fixed a minor problem with events on torrent addition 2012-08-09 14:56:14 +02:00
1da24fbeaa Updated some event handlers 2012-08-09 14:56:14 +02:00
a20b39325e Made detail and event views scrollable with j/k keys as well 2012-08-09 14:56:14 +02:00
f7a4951e0d Fixed sorting by ETA 2012-08-09 14:56:13 +02:00
9abfc5b250 Added a first run popup(actually just ordinary help with changed title) 2012-08-09 14:56:13 +02:00
a41c950b11 Made popup windows request height of 65, updated help 2012-08-09 14:56:13 +02:00
718bf57b5d Allowed float sizes of Popups between 0.0 and 1.0 which make them take specified amount of available screen space, made help popups larger 2012-08-09 14:56:13 +02:00
11e3a66484 An _UGLY_ but working fix for an alt+backspace problem in Legacy 2012-08-09 14:56:12 +02:00
9a322ed67f More Unicode handling fixes for Legacy 2012-08-09 14:56:12 +02:00
4e1573cb39 Fixed 'Queue' option not being display in all torrents view 2012-08-09 14:56:12 +02:00
28e36c7edc Fixed offset issues in torrent detail view 2012-08-09 14:56:12 +02:00
bbdf710b52 Another search behaviour change: Enter now opens torrent menu and '/' closes search(as it cannot occur in torrent name anyway) 2012-08-09 14:56:12 +02:00
3634f457b4 Fixed an additional character being deleted when pressing alt+backspace in legacy mode 2012-08-09 14:56:11 +02:00
a956f0a5d7 Add / to list of word-separating characters 2012-08-09 14:56:11 +02:00
265f9f295e Made connection manager handle resizing 2012-08-09 14:56:11 +02:00
6888c6ef60 Made history saving/loading respect the 'do not save duplicate lines' setting 2012-08-09 14:56:10 +02:00
50b84c3e91 Allow exiting preferences with escape if category zone is active 2012-08-09 14:56:10 +02:00
9152d322ac Fixed resize bugs in event view, torrent detail and preferences(also made it actually handle resizing) 2012-08-09 14:56:10 +02:00
18091c5ad6 Fixed an error that arised when no torrents matched current filter 2012-08-09 14:56:09 +02:00
4a58e339cb Split console options into two panes - interface and columns 2012-08-09 14:56:09 +02:00
31dd1be090 Fixed command line history saving problems 2012-08-09 14:56:09 +02:00
3cc97accfc Added saving and loading legacy history. Optional, enabled by default 2012-08-09 14:56:08 +02:00
555717b9a0 Modified torrent detail view. Needs more work 2012-08-09 14:56:08 +02:00
cf58aa780a Added an audible bell on torrent completion (optional, off by default) 2012-08-09 14:56:07 +02:00
935777fb49 Fixed resize causing crashes and/or improper resize of AllTorrents view 2012-08-09 14:56:07 +02:00
0dbea0ed01 Made torrent info popup request larger size 2012-08-09 14:56:07 +02:00
84425d7786 Fix inability to open torrent options with 'o' key 2012-08-09 14:56:06 +02:00
3920a93cba Replaced infinity symbol with 'inf' 2012-08-09 14:56:06 +02:00
4735a6c49a Add a visible columns dialog in all torrents view under 'v' key 2012-08-09 14:56:06 +02:00
a8549ef882 Another popup system upgrade: Preserve requested height on resize, do not fail if it's too much, add infinite and default options, add align option, slightly change SelectablePopup. Update rest of the code 2012-08-09 14:56:05 +02:00
0df1255ae5 Replace the popup scroll bar with a red '#' for visibility 2012-08-09 14:56:05 +02:00
f6d87c7a7e Highlight prompt in yellow in line history 2012-08-09 14:56:05 +02:00
1f59b4d2ba Add reload and install plugin functionality to the 'plugin' command 2012-08-09 14:56:04 +02:00
1df173d684 Added tab_complete_path method to LegacyUI and ConsoleUI, made add command use it for completion 2012-08-09 14:56:04 +02:00
b2f78786a5 Don't append a space after directory completion 2012-08-09 14:56:04 +02:00
314b6138d7 Add preliminary(Torrent ID/name only) autcompletion to manage command 2012-08-09 14:56:04 +02:00
1bc3c293fa Added another fix for flicker bug. Looks like it's not possible to completely get rid of it, but it should be around 10000 times less common now 2012-08-09 14:56:03 +02:00
bbf0666539 Fixed '<command> -h', added syntax highlighting to command help 2012-08-09 14:56:03 +02:00
2ed60de628 Allow 'help' command to print help for multiple commands at once 2012-08-09 14:56:02 +02:00
76546ec176 Fixed double space being appended after commands 2012-08-09 14:56:02 +02:00
0a9a1db942 Fixed another splitting bug 2012-08-09 14:56:02 +02:00
d589823f4a Fixed accidential highlight on time zone name 2012-08-09 14:56:02 +02:00
33decd1780 Finally and definitely fixed all flickering bugs 2012-08-09 14:56:01 +02:00
6269076c7e Added scrolling to event view, fixed all crashes 2012-08-09 14:56:01 +02:00
506a98aee2 Implemented the .clear() -> .erase() change which supposedly fixes a lot of flicker issues 2012-08-09 14:56:01 +02:00
8d1e4297ec Append space after completed line. With enhanced tab completion it poses no problem 2012-08-09 14:56:01 +02:00
8678121210 Made it possible to open torrent options with 'o' in detail view 2012-08-09 14:56:00 +02:00
24d801d18a Fixed a parameter splitting bug that prevented help command from working and could have lead to rm disaster 2012-08-09 14:56:00 +02:00
2e647c6b41 Fixed help string in torrent detail and event views 2012-08-09 14:55:59 +02:00
a47b2bc715 Show torrent options entry in torrent menu (both alltorrents and torrentdetail views) 2012-08-09 14:55:59 +02:00
e1a3a9e077 Fixed a harmless mistake that I made 80 commits earlier 2012-08-09 14:55:59 +02:00
3488a761b8 Changed default column settings to be friendlier to small terminals 2012-08-09 14:55:59 +02:00
822ddc2182 Place completed torrents after the rest regardless of sort keys(optional, on by default) 2012-08-09 14:55:58 +02:00
f5f1f11f61 Fixed sorting by some of the keys, reversed sorting order where appropriate 2012-08-09 14:55:58 +02:00
864785752f Change primary sort field with '<' and '>' keys 2012-08-09 14:55:58 +02:00
60e534f59b Removed trailing whitespace 2012-08-09 14:55:57 +02:00
c0f76bef1b Highlight current primary sort column 2012-08-09 14:55:57 +02:00
920e765790 Changed behaviour of search heavily - you can no longer move cursor around the input field, instead right arrow opens torrent detail view and left cancels searching. You can also go to first/last result with PGUP/PGDOWN 2012-08-09 14:55:57 +02:00
cc99279ad1 Improved logging - added dates, time, changed formatting and made it always log both to console and event log 2012-08-09 14:55:57 +02:00
48dd049cbd Log events to legacy mode even when in AllTorrents view 2012-08-09 14:55:57 +02:00
09c830c6ae Yet another search scrolling bug 2012-08-09 14:55:56 +02:00
39a896e59e Add proper sorting by primary/secondary fields. No preferences yet, defaults are queue/name 2012-08-09 14:55:56 +02:00
ca6c647bd2 Color-coded the statusbars 2012-08-09 14:55:56 +02:00
d2dc62f0b3 Remove option to hide name column as something to identify the torrent is needed anyway 2012-08-09 14:55:56 +02:00
4983110d50 Highlight matches when searching (only for >=2 chars entered) 2012-08-09 14:55:55 +02:00
00bf1d31a2 Fixed a severe torrent matching bug caused by spaces not being unescaped when parsing 2012-08-09 14:55:55 +02:00
2092a0d090 Fixed halt command. I totally have no idea why it worked before and why it stopped working now.... 2012-08-09 14:55:55 +02:00
d3e70b7f7f Don't reset cursor position when going back from torrent detail view 2012-08-09 14:55:55 +02:00
d86168cb41 When no filename is supplied in torrent add dialog, treat is as cancel and don't display an error message 2012-08-09 14:55:54 +02:00
5a096768e0 Fixed another search scrolling bug. New search is now only not performed if the same part of torrent name matches after entering a new character 2012-08-09 14:55:54 +02:00
c2f97356c6 Fixed minor searching problems 2012-08-09 14:55:54 +02:00
b5cfbbcdec Made popup windows scrollable with page up/down and home/end 2012-08-09 14:55:54 +02:00
6326902287 Do not empty search_string so user can continue to cycle through results with 'n' key 2012-08-09 14:55:53 +02:00
a9af9cabb4 Remove '(end/start reached)' message after changing search string 2012-08-09 14:55:53 +02:00
546aa58482 Fixed scrolling bug when searching backwards 2012-08-09 14:55:53 +02:00
be79c586da Made search case insensitive 2012-08-09 14:55:53 +02:00
819377b0bb Searching in main view now searches immediately and you can cycle through results with up/down keys. Failure/success/end/start reached are now color-coded 2012-08-09 14:55:53 +02:00
b37965de3d Add deleting words with alt+backspace and a minor change that could have potentially caused some misc bug 2012-08-09 14:55:52 +02:00
d7391611dd Do not use shlex for splitting as it breaks on torrents containing quotes 2012-08-09 14:55:52 +02:00
fa1a1eb939 Add permission checking to add command(fixing few crashes), sort files by date, place folders before files and ignore files other than .torrent files 2012-08-09 14:55:52 +02:00
5a33e66c2c Fix add command reporting success for some failures 2012-08-09 14:55:51 +02:00
3bc25d44ee Fixed a crash bug introduced with inexact case matching 2012-08-09 14:55:50 +02:00
ba7e36c719 Sort files by date when using 'add' command autocompletion, listing newest on top 2012-08-09 14:55:50 +02:00
e6e0eefaa4 Added (quite elaborate) inexact-case torrent name completion 2012-08-09 14:55:50 +02:00
a750999e0e Do not append space after the math. It ruins file path autocompletion 2012-08-09 14:55:50 +02:00
40a6b11a1b Re-fixed shortening which I broke during the last rebase 2012-08-09 14:55:49 +02:00
471757d6c6 Fix problems with moving selection caused by deluge-console emptying selection when only one element is selected 2012-08-09 14:55:49 +02:00
2373eda462 Add config option to change amount of torrents to list per tab press 2012-08-09 14:55:49 +02:00
a0a18e1036 Make 3rd+ tab list more/all of the remaining torrents and a preference to toggle these behaviors 2012-08-09 14:55:49 +02:00
04ed96d121 Made additional formatting for input controls optional and on by default for popups so it doesn't show up in preferences but still works when setting torrent options 2012-08-09 14:55:48 +02:00
05758245a1 Added functions for adding spin inputs to popup. Added support for default non-number values to them(they return None in that case). Added proper scrolling to InputPopup. Tweaked visual style 2012-08-09 14:55:48 +02:00
a28e40ea35 Add option(on by default) to move selection when moving torrents up/down the queue. Known bug: Incorrect behavior when trying to move bottommost torrents to the bottom, has no impact besides being unexpected. 2012-08-09 14:55:48 +02:00
14bfa24195 Add smarter selection selection for torrent detail view - highlight directories with selected files inside as partially or fully selected, select not only directories but also files inside. 2012-08-09 14:55:47 +02:00
8a261b26e8 Revamped info command detailed file view so it now shows a pretty tree look and made it ensure at least 8 characters of torrent ID get printed before deciding not to wrap to next line in the default, compact view 2012-08-09 14:55:47 +02:00
a2c347a79c Add proper support for double width characters to legacy mode and few related formatting functions 2012-08-09 14:55:47 +02:00
415bc22dd9 Completely remove placement of three dots symbol between columns, including option concerning it. 2012-08-09 14:55:47 +02:00
6edd159626 Add scrolling using Page Up/Down and Home/End in torrent detail view 2012-08-09 14:55:46 +02:00
1a1518ac1d Fixed autocompletion bug, removed some useless comments 2012-08-09 14:55:46 +02:00
508dec4858 Modified autocompletion to only list a limited amount of matches(use info for full list), color coded it, modified to show both torrent names and ID as well as highlight matching part, show green 'Autocompletion matches' text for more than 4 matches so it's more readable. Depends on previous commit 2012-08-09 14:55:46 +02:00
80b88bf047 Modified the info command to be more compact and concise by default, old behavior(with tracker and save location info added) moved to -v switch, old verbose mode(files and peers) moved to -d switch 2012-08-09 14:55:46 +02:00
249e331ae9 Add option to not store duplicate input in command history for legacy mode. 2012-08-09 14:55:45 +02:00
47ba11be1b Pass console config to torrentdetail and format_utils, add an option to disable three dots when trimming columns(they piss me off) 2012-08-09 14:55:45 +02:00
163870afd9 Rename torrent_options to manage. 2012-08-09 14:55:45 +02:00
117d29ae72 Author: eirikba
Found this in the trac
http://dev.deluge-torrent.org/ticket/1858
description:
This patch adds a command to deluge-console to show and set per-torrent options. I have called the command "torrent_option" and mostly modeled it on the "config" command. A better name for the command would be nice, but I have no better suggestion at this time.
2012-08-09 14:55:45 +02:00
8dc5b07818 Map delete key to remove torrent(s) dialog 2012-08-09 14:55:44 +02:00
acb77213e1 Make torrent_actions_popup capable of directly displaying/executing one of the torrent actions without displaying choice dialog 2012-08-09 14:55:44 +02:00
e68358661a Revamped torrent removing dialog so it's harder to accidentally remove data. Also, it lists torrents being removed now 2012-08-09 14:55:44 +02:00
d9789504ff Replace empty lines in InputPopup with generic text(lines are of course still there) 2012-08-09 14:55:44 +02:00
98101ea411 Implement a call to os.sep in regards to auto completion
Added small amount of code which calls os.sep so we know if we should append "/" or "\\" to the end of a dir.
2012-08-09 14:55:43 +02:00
f33a6a68e4 Inform the user how to navigate connection manager
Added a quick line to let the user know to user the up & down arrows when adding a host[it isn't as intuitive as you might think]

Using tab to switch input fields when adding a host is something that *should* be added in the future… [more intuitive]
2012-08-09 14:55:43 +02:00
03fefc279b Change .clear() -> erase()
Change .clear() to -> .erase() should eliminate flicker issues.
I'm unsure whether I should've  changed line 105 of popup.py.. we can revert if there is any issues.

Note: we only want to erase() during refreshes, if we are changing modes we do want to clear() the screen(at least I think we do… it might make sense to just use erase() everywhere for consistency… I/we should look into this)
2012-08-09 14:55:43 +02:00
e85be7cccb Update help for 'info'
This commit updates help information when you run `help info`. We inform user of Tab Completion, and of `info *`.
There is also some removal of duplicate information(no need for line about `info -s <state>` since we tell the user that when they read the option about '-s')
2012-08-09 14:55:43 +02:00
b8f2a1da1a Removed trailing whitespace 2012-08-09 14:55:42 +02:00
b1ce567819 Add config option to change amount of torrents to list per tab press 2012-08-09 14:55:42 +02:00
68db1d4c13 Restored underline for currently selected option in SelectInput that I accidentally did in few commits ago 2012-08-09 14:55:42 +02:00
5796e025e6 Make 3rd+ tab list more/all of the remaining torrents and a preference to toggle these behaviors 2012-08-09 14:55:42 +02:00
8819ec0575 Escape spaces in paths in legacy mode 'add' command. This also makes backslashes unsupported(but you're a bad person for having them in paths anyway) 2012-08-09 14:55:41 +02:00
a24c679510 Made additional formatting for input controls optional and on by default for popups so it doesn't show up in preferences but still works when setting torrent options 2012-08-09 14:55:41 +02:00
c2b4ccdc77 Fixed info sometimes shortening the ID even when there's enough space. 2012-08-09 14:55:41 +02:00
8d07a697d3 Made moving selection along with queue delayed, just like queue operations themselves 2012-08-09 14:55:41 +02:00
459c4aebb9 Updated "move selection with queue" feature to reflect changes in behavior 2012-08-09 14:55:40 +02:00
010fd165c6 Fixed bugs concerning negative numbers in spin inputs and sometimes returning wrong values. 2012-08-09 14:55:40 +02:00
27f0e86afd Add setting sequential_download option, set options that core.set_torrent_options doesn't support directly, remove setting 'private' torrent option as it's read-only anyway 2012-08-09 14:55:40 +02:00
a436eb8aa6 Fixed spin inputs not updating their values until deselected 2012-08-09 14:55:40 +02:00
3f5099bd05 Added setting per-torrent options to console mode. Mapped to 'o' key, supports setting options for multiple torrents at once(when values differ, leave the default value alone to not touch that option) 2012-08-09 14:55:40 +02:00
2625bbc7fd Added functions for adding spin inputs to popup. Added support for default non-number values to them(they return None in that case). Added proper scrolling to InputPopup. Tweaked visual style 2012-08-09 14:55:39 +02:00
0f18463df0 Fixed bug that would cause info command to sometimes 'shorten' torrent ID in a way that in the end makes it longer(some of characters repeat) 2012-08-09 14:55:39 +02:00
6b8428e262 Fix behavior of __get_contained_files_count when passed file id parameter and thus fix bug causing discrepancy in behavior when (un)selecting partially selected folders(will now unselect them all the time) 2012-08-09 14:55:39 +02:00
a8a24bf0d9 Removed trailing whitespace 2012-08-09 14:55:39 +02:00
c30a86e52a Add option(on by default) to move selection when moving torrents up/down the queue. Known bug: Incorrect behavior when trying to move bottommost torrents to the bottom, has no impact besides being unexpected. 2012-08-09 14:55:38 +02:00
591f9a19e5 Add smarter selection selection for torrent detail view - highlight directories with selected files inside as partially or fully selected, select not only directories but also files inside. 2012-08-09 14:55:38 +02:00
c62547d401 Revamped info command detailed file view so it now shows a pretty tree look and made it ensure at least 8 characters of torrent ID get printed before deciding not to wrap to next line in the default, compact view 2012-08-09 14:55:38 +02:00
16f62bbcfe Add proper support for double width characters to legacy mode and few related formatting functions 2012-08-09 14:55:38 +02:00
412d0e7be9 Completely remove placement of three dots symbol between columns, including option concerning it. 2012-08-09 14:55:38 +02:00
98c9aaf600 Remove trailing backslashes to avoid breaking shlex that is used to split parameters passed to commands 2012-08-09 14:55:37 +02:00
f5c8968aa6 A quick and ugly fix(try-except) for crashes involving multiselection 2012-08-09 14:55:37 +02:00
149cbae4dc Add scrolling using Page Up/Down and Home/End in torrent detail view 2012-08-09 14:55:37 +02:00
b689fe1d98 Fixed autocompletion bug, removed some useless comments 2012-08-09 14:55:37 +02:00
a6c1bc1d4a Modified autocompletion to only list a limited amount of matches(use info for full list), color coded it, modified to show both torrent names and ID as well as highlight matching part, show green 'Autocompletion matches' text for more than 4 matches so it's more readable. Depends on previous commit 2012-08-09 14:55:36 +02:00
ab6dc2d11f Added a function for stripping formatting to be used in other places. 2012-08-09 14:55:36 +02:00
ced1475233 Modified the info command to be more compact and concise by default, old behavior(with tracker and save location info added) moved to -v switch, old verbose mode(files and peers) moved to -d switch 2012-08-09 14:55:36 +02:00
1391f20658 Add option to not store duplicate input in command history for legacy mode. 2012-08-09 14:55:35 +02:00
b1439274c6 Pass console config to torrentdetail and format_utils, add an option to disable three dots when trimming columns(they piss me off) 2012-08-09 14:55:35 +02:00
6422f11971 Fix autoconnecting to the default host 2012-07-17 17:23:39 -07:00
8e7432e71c Added a protocol for the network traffic between client and daemon.
Implemented a protocol layer above twisted.internet.protocol.Protocol
which guarantees correct transfer of RPC messages. The network messages
are transfered with a header containing the length of the message.
2012-07-02 02:09:14 +02:00
5dc6dbf216 Fix #1943 - invalid session id when calling a rpc exported function from a plugin when no client is connected 2012-06-10 16:59:49 -07:00
6cb1fd76cc Fix #2062 : Console discards text before first colour string 2012-04-20 12:35:21 +01:00
934a0f6495 fix mistake in last commit 2012-04-19 18:09:31 +01:00
266127bb69 Fix #2065 : Console crash with missing closing quote 2012-04-19 16:02:09 +01:00
acecd6d522 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-18 13:29:13 +01:00
2cdcae8d31 win32 build scripts updated from 1.3-stable 2012-04-18 13:27:24 +01:00
cb2212d2f3 Update Changelog 2012-04-18 13:27:00 +01:00
9fd527f465 WebUI: Increase focus delay for password field cursor 2012-04-18 13:00:14 +01:00
828b3204b8 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-18 12:58:09 +01:00
8fdfdc2b25 Gtkui: move height request to child widget in create dialog 2012-04-18 12:57:53 +01:00
bfae766f8a Fix missing semi-colon in deluge.desktop 2012-04-18 12:55:52 +01:00
569dd0c585 Console: Fix prefixed space for tab completing commands 2012-03-26 19:27:58 +01:00
211c27aaae Console: Fix missing trailing space for command options with tab complete 2012-03-26 19:27:01 +01:00
e2608a0ac9 Remove unnecessary translation from connection manager 2012-03-26 19:17:56 +01:00
7625812c8c Use (documented) formatdate over format_date_time 2012-03-23 19:28:29 +11:00
beb35c5c35 Grey out file priorities for 'is_seed:True' seeding torrents 2012-03-22 01:34:49 +00:00
14eb3e51b0 Bring MainWindow to front when opening another instance of gtkui 2012-03-22 01:15:45 +00:00
d62da02bae Improve Magnet and Url support for add command in console 2012-03-21 22:35:14 +00:00
61dbd349ab Hide unused Infohash button in WebUI 2012-03-14 00:26:08 +00:00
f102e988c9 Preserve order when moving multiple torrents in the queue 2012-03-12 23:51:47 +11:00
78df634fed Add get_queue_position & use it for sorting ids 2012-03-12 23:51:45 +11:00
e6e677e7d0 Fix not properly detecting when torrent is at end of queue 2012-03-12 23:51:21 +11:00
edca36fa73 Update Changelog 2012-03-11 20:22:47 +00:00
758f4ef920 Label Plugin: Mark 'Label Options' for translation 2012-03-11 20:19:07 +00:00
30ee7fb170 Label Plugin: Disable menu items for 'All' in sidebar 2012-03-11 20:19:00 +00:00
8010f2fcc1 Label Plugin: Defer translate No Label text in submenu 2012-03-11 20:17:11 +00:00
d98eb06f69 Fix Label Plugin text 'All' for translation in sidebar 2012-03-11 20:16:13 +00:00
7f88f59272 Mark torrent menu Pause text for translation 2012-03-11 20:09:42 +00:00
f6127e1747 Fix #2052 : Progress bar state text marked for deferred translation 2012-03-11 20:07:40 +00:00
9ecc9ab7ad Modified fix for #1957 non-acsii columns 2012-03-11 01:05:12 +00:00
17d12fbaf2 Fix for Up Speed column not sorting in Webui 2012-03-10 13:21:09 +00:00
068ba7bc6f Allow a minimum of 0.1 for "Stop Seed at Ratio" regarding label options. 2012-03-08 18:53:09 +00:00
713f7eff7a Fix collapsed treeview in Create Torrent dialog 2012-03-04 19:34:27 +00:00
74181469bc 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-03-04 19:28:51 +00:00
b396b11611 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-04 19:13:33 +00:00
8503687136 Fix adding magnet error in webui when started from classic mode 2012-03-03 23:43:34 +00:00
f0051ee81f Add a define to fix build error with libtorrent trunk 2012-03-03 11:52:44 -08:00
31222a5ab6 Add gtkui template to feeder plugin 2012-03-03 02:09:23 +00:00
752e5a7a8f 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:44:08 +00:00
2ecb54c4f7 Ensure is_finished value is correct after state changed alert
Set torrent.is_finished to false when torrent is in a Checking or Downloading state
2012-03-02 14:23:25 +00:00
7ae912114b 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-03-02 14:21:16 +00:00
e33d834cc9 Update Changelog 2012-03-02 14:00:58 +00:00
9c0a450a47 Blocklist: remove default url as it is outdated 2012-03-02 13:59:59 +00:00
debae00246 Fix preferences dialog not opening with main window on Windows 2012-03-02 13:55:52 +00:00
a1949bc020 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-03-02 13:54:08 +00:00
968abf9d54 Add optparse custom version to prevent unnecessary loading of libtorrent 2012-03-02 13:31:38 +00:00
9053280e14 Alternative fix for re-enabling plugin issue 2012-03-02 13:19:23 +00:00
6d2e88eeee Update Changelog 2012-03-02 13:16:13 +00:00
f1ddd236ce Fix #2038 : Chrome 17 disconnecting from webui 2012-03-02 13:10:35 +00:00
be5a0b3dc5 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-03-02 13:09:44 +00:00
614b002d8b Fix plugins not showing enabled in webui 2012-03-02 13:07:29 +00:00
a494471ed4 Fix potential keyerror for on_torrent_removed in sessionproxy 2012-03-02 13:02:11 +00:00
31ff64b537 Execute: log stdout/stderr when command fails 2012-03-02 13:34:56 +11:00
ba75ae4ccc 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 13:34:49 +11:00
fd28bf8619 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-01 13:11:11 -08:00
ae6af18f0d Remove setting torrent.is_finished in the resume alert 2012-02-29 15:23:17 -08:00
b47dc73d30 Disable check for user and group options on Windows 2012-02-24 15:29:58 +00:00
1696fd1103 Updated Changelog and compressed js 2012-02-23 00:49:55 +00:00
b5c63c4d58 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-23 00:49:55 +00:00
330019bb3d Fix #2036: new labels are not sorted on torrent right click 2012-02-23 00:49:55 +00:00
4bbf9e2ea6 tabs to spaces label.js 2012-02-23 00:49:55 +00:00
6e6f6313a8 Fix missing desktop file preventing install 2012-02-23 00:49:55 +00:00
af19e3bc62 Fix setting daemon listen interface from command line 2012-02-23 00:49:55 +00:00
40e4fb9b8e Catch and log ReactorNotRunning when stopping reactor in gtk 2012-02-23 00:49:55 +00:00
62c7209558 Add Webui keymaps for torrents - Ctrl-A (select all) and Delete 2012-02-23 00:49:55 +00:00
f897f03227 Add magnet uri support to Add Url in Webui 2012-02-23 00:49:55 +00:00
38210ae11e Fix #2037: webui 'Add Torrents' dialog torrents list not scrolling 2012-02-23 00:49:55 +00:00
0ccf0730ea Fix progress bar display
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-23 00:49:54 +00:00
abc82c1439 Update extensions to Ext JS 3.4.0 2012-02-23 00:49:54 +00:00
e9239be691 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-23 00:49:54 +00:00
8452b63d19 Multiple Magnet links support in autoadd plugin 2012-02-23 00:49:54 +00:00
6f77703e29 Magnet link support in autoadd plugin
Check the watch folders for .magnet files which contain valid magnet links
and add them.
2012-02-23 00:49:54 +00:00
2b01ba43cb Fix #2035: If auto_add_trackers is empty, it is an array 2012-02-23 00:49:54 +00:00
eceaa0ae4f catch and log 'glib.GError: Unrecognized image file format' error 2012-02-23 00:49:54 +00:00
ae9eb15d5c Update Changelog 2012-02-23 00:49:54 +00:00
2793e1ec53 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-02-23 00:49:54 +00:00
ec27028f1b Webui applies changes when OK clicked in Preferences 2012-02-23 00:49:54 +00:00
ba60ae09d5 Fix #1954 : 'invalid literal for float' console error when setting listen interface 2012-02-23 00:49:54 +00:00
aa0f41ac17 Cleaner log entry if deluged missing 2012-02-23 00:49:54 +00:00
4a7876f203 Add scheduler plugin page to webui 2012-02-23 00:49:53 +00:00
101ad99c14 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-02-23 00:49:53 +00:00
0d3ba7541e Remove unnecessary migration function as this default value should be picked up from the DEFAULT_PREFS dictionary 2012-02-19 17:57:44 -08:00
c8718ad643 Implemented #1382:
* Implemented whitelist support to both core and GTK UI.
* Implemented ip filter cleaning before each update. Restarting the deluge
  daemon is no longer needed.
* If "check_after_days" is 0(zero), the timer is not started anymore. It would
  keep updating one call after the other. If the value changed, the timer is
  now stopped and restarted using the new value.
2012-02-15 14:21:02 +00:00
da868347cf 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-19 01:42:17 +00:00
f4fab86767 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 01:33:16 +00:00
517addb9f9 Update Changelog 2012-01-10 02:10:20 +00:00
8c1ef7d6af update changelog 2012-01-10 02:10:13 +00:00
c87245320d fix #1481 file uploads from behind a reverse proxy 2012-01-10 01:26:05 +00:00
983c9dad99 apply patch from #1548 2012-01-10 01:19:24 +00:00
f299be0eb9 Fix #1929 : Update setup.py to clean deluge*.egg_info dir from root dir 2012-01-09 23:20:48 +00:00
a01f45cc7a Fix #1936 : Referenced before assignment error in json_api 2012-01-09 23:20:48 +00:00
3b1ac4e81f Fix #1895 : Files Tab showing wrong files due to torrent_info race condition 2012-01-09 23:20:48 +00:00
bebdec9ebb Update AUTHORS 2012-01-09 23:20:48 +00:00
3a91f87679 Remove unneeded license from blocklist 2012-01-09 23:20:48 +00:00
be49fd6a40 Fix #2010 : Move speed text in titlebar to the beginning 2012-01-09 23:20:48 +00:00
c88ba97531 Strip trailing space and tabs in aboutdialog 2012-01-09 23:20:47 +00:00
aa726f723b 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:48 +00:00
f8651b63c8 Webui: Smaller minSize for Sidebar and remove 1px border from mainpanel 2012-01-07 21:16:13 +00:00
c020d71327 Remove dotted line on buttons in Firefox 2012-01-07 21:12:29 +00:00
527d5541d7 Add Deluge and icon to start of toolbar in webui 2012-01-07 21:12:07 +00:00
57df1bb7c4 Fix clipped Browse button in WebUI 2012-01-07 21:09:32 +00:00
5ad9ff7333 Fix plugin uploads from behind a reverse proxy 2012-01-07 21:06:54 +00:00
7d7e3fad1e Fix password box focus issue in Firefox 9 for WebUI 2012-01-07 21:05:29 +00:00
e8eb7a33f0 Fix #1915 : Unable to stop the status bar from autohiding 2012-01-07 21:02:47 +00:00
8da618a4f2 Remove uneeded Title to save space in WebUI 2012-01-07 20:58:59 +00:00
1c3d8c214c Hide unused Create button in WebUI 2012-01-07 20:57:33 +00:00
bbde86cfb8 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-07 20:55:27 +00:00
5e36722047 Update Changelog 2012-01-07 20:55:15 +00:00
ee35fe1cad Fix #1961 : Missing 'All' filter option for Label plugin 2012-01-07 19:54:00 +00:00
a83fd1d597 Update About dialog for translation 2012-01-07 19:50:14 +00:00
4dbbb4d676 Add clean desktop file to setup.py 2012-01-07 19:47:16 +00:00
6c8e2b48e3 Fix issue in saving libtorrent session state 2012-01-07 19:46:38 +00:00
55892061f5 Update AUTHORS with new paths to plugin and data locations 2012-01-07 19:37:15 +00:00
ae8ea820ef Update Win32 README 2012-01-07 19:33:17 +00:00
d06a0e4f40 Update README file 2012-01-07 19:31:10 +00:00
9bfb565354 New AUTHORS file 2012-01-07 19:26:11 +00:00
132a8f9f0c Add unneeded files for release to export-ignore 2012-01-07 19:25:36 +00:00
75b9fd5cb4 Build deluge-all.js 2011-12-07 01:03:00 +00:00
774e614f7b Update webui build file to run on Ubuntu 2011-12-07 00:52:10 +00:00
9e43956e1b Fix spelling mistake 2011-12-06 23:51:00 +00:00
9d16b50075 Fix #1917 : UnicodeDecodeError with long torrent names 2011-12-04 13:01:50 +00:00
04b8949178 Fix #1988 : Problem retrieving colormap for piecesbar 2011-12-04 00:03:39 +00:00
b69163b57d Fix #1828 : Auth issue with args passed to console 2011-12-03 23:04:47 +00:00
006624f568 Fix missing comma in notifications plugin 2011-12-03 17:09:55 +00:00
4acf548436 Revert "Fix #1338 Seeds and Peers totals not updating"
Did not fix the issue.
This reverts commit 1a9ae62669.
2011-11-29 19:17:30 +00:00
d9193fcc4f 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-29 19:17:20 +00:00
a779a4a7ea Fix #1905 : No email sent to second email address in Notifications plugin 2011-11-29 19:14:42 +00:00
2a3d8ae156 Fix #1945 : Mutable default arguments in deluge.ui.client 2011-11-29 19:10:53 +00:00
07d4aff13b Change Windows default download path from '~' to '~\Downloads' 2011-11-29 19:08:41 +00:00
838f9331be AddTorrent file dialog now can browse network shares 2011-11-29 19:08:34 +00:00
3c3f93db3e Fix #1918 : Drag'n'Drop not working in Windows 2011-11-29 19:06:56 +00:00
d98231a713 Remove code duplication in queuedtorrents.py, use ipcinterface process_args() instead 2011-11-29 19:03:59 +00:00
a50c83c284 Modify log message from Error to Warning level 2011-11-29 19:02:20 +00:00
05f30b58c1 Fix Webui files-tab menu setting wrong priority 2011-11-29 19:01:20 +00:00
a932767545 Fix #1921 : GTKUI reports free disk space incorrectly 2011-11-29 18:59:13 +00:00
c29d3bb930 Fix #1967 : IndexError when trying to open a non-json conf file 2011-11-29 18:55:30 +00:00
b4a73cabf3 Fix LP#821577 : UnpicklingError when external selection dragged onto Files Tab 2011-11-29 18:55:22 +00:00
16bbedaf2b Fix #1964 : Unhandled UnpicklingError with corrupt state file 2011-11-29 18:55:14 +00:00
b2eb5aeb8c Fix #1944 : Use errno constants for portability 2011-11-29 18:54:06 +00:00
3dcfa5cfd8 Fix #1912 : Exit nicely from get_libtorrent.sh if svn not installed 2011-11-29 18:47:05 +00:00
307ffe734a Fix #1941 : Increase UIs max cache value to 999999 (15GiB) 2011-11-29 18:46:26 +00:00
ead734cbf0 Fix #1960 : Web UI statusbar shows total_payload_download for upload 2011-11-29 18:42:28 +00:00
46ab11961e 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-29 18:32:06 +00:00
58adbe94b9 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-29 18:27:44 +00:00
7227c97cac Fix typo in Windows shutdown handler 2011-08-08 10:42:29 -07:00
4fcfb677a4 Allow changing ownership even though the owner column is not visible. 2011-08-03 11:59:42 +01:00
808ff02130 Fix path for desktop file 2011-07-29 20:56:48 -07:00
08a0a2de99 Fix i18n sub-dir issue in gitignore 2011-07-28 22:56:22 +01:00
fd56ccaabf Fix .desktop file creation on Windows by just ignoring it 2011-07-28 22:53:40 +01:00
cebddf9c79 Add my name to author list 2011-07-22 19:29:32 +01:00
e9b602d85f Update windows setting 2011-07-19 16:50:56 -07:00
5b2d37954c Add intltool to dependencies 2011-07-13 23:27:00 +01:00
fcc13f454b Fix torrent file and folder renaming issues
Adds `sanitize_filepath` for use before passing to libtorrent rename_file
2011-07-13 22:44:13 +01:00
15ef668fef Localize the Desktop file
Conflicts:

	setup.py
2011-07-13 21:49:25 +01:00
bf145c0715 Option tab spin buttons connected to key press events 2011-07-11 17:23:42 +01:00
192f3d88e5 set spinbuttons numeric only 2011-07-11 16:27:48 +01:00
d9cf3a8c08 Remove un-needed signal handlers. 2011-07-11 15:15:45 +01:00
a41b1357b5 Update translations files 2011-07-11 14:27:08 +01:00
c3c21dae72 More missing(?) signal handlers. Refs #1891. 2011-07-10 23:24:10 +01:00
4daa7e2470 Fix the options tab. Refs #1891 2011-07-10 22:51:10 +01:00
b301051cdd Fix #1637: UnicodeDecodeError from 'deluge-console --help' with other languages 2011-07-10 16:45:02 +01:00
456f660878 Add some more lost signal on the Glade to GtkBuild migration. 2011-07-10 02:58:46 +01:00
f7ce07c68f Tidy up location of gettext setup_translations 2011-07-10 02:10:14 +01:00
9eb85cb6eb Fix lost signals for peers tab menu, files tab menu and options tab. 2011-07-10 02:05:20 +01:00
40fd945f70 Fix translation string in Freespace plugin 2011-07-10 01:58:08 +01:00
78944f47f3 Allow compiling translations in develop mode.
Translations will compiled into `deluge/i18n` instead of the build lib so that they can be used in a deluge develop mode install.
2011-07-10 01:20:13 +01:00
acb747bfd5 Log from where translations are being loaded. 2011-07-10 00:43:56 +01:00
0c1055511d Raw attempt of fixing the GtkBuilder introduced bugs. 2011-07-10 00:43:01 +01:00
f0c327a024 Fix #1505: Add libtorrent info to --version output 2011-07-09 23:19:57 +01:00
b81159f295 Fix #1801: ConsoleUI failed connect missing error message 2011-07-09 22:11:13 +01:00
ca86aa5714 Fixes keyerror with existing file priorities set to High 2011-07-08 23:34:02 +01:00
fc7fa94319 Add handler for drag_data_received to supress warning 2011-07-08 23:23:03 +01:00
c6ee8cf39d Do not use Ellipsis. 2011-07-08 10:03:04 +01:00
bd7bbc4e33 Add some "now needed" missing imports. 2011-07-08 04:07:04 +01:00
312a57aa50 Remove some left overs. 2011-07-08 00:39:48 +01:00
f87ed6d5a6 Moved the MainWindow to GtkBuilder.
This probably broke some behaviour because converting and splitting from libglade to GtkBuilder is not as perfect as it should be. What I noticed was fixed.
Also, GtkBuilder only allow calling `connect_signals()` once. Some code had to change to handle this and a "handlers proxy class" was created to keep the behaviour we had, ie, connect signals from where it was needed. Then I monkey patch the main windows GtkBuilder to not allow anyone to connect signals through it since it would break behaviour. Connecting signals to the main window builder instance is now done like `component.get("MainWindow").connect_signals()`. The best solution will probably break the main window ui into the needed parts in order to not have to monkey patch main windows builder.
Plugin's trying to get the main windows `main_glade` are now broken, on purpose, ie, the code they have needs to change since the calls to the builder are not the same as the calls to libglade. The plugins we ship with deluge will be fix as soon as possible.
2011-07-07 20:48:02 +01:00
4234311050 Start with a bigger width. 2011-07-07 20:48:02 +01:00
a47da57c0d Make sure the tracker url is of type string and not unicode. Never had this issue previously though. 2011-07-07 20:48:02 +01:00
13528fe7f8 Fix httpdownloader Tests 2011-07-07 01:22:51 +01:00
99358dcbb0 Fix httpdownloader error with existing filename 2011-07-07 00:11:00 +01:00
16cc8f6eea LP Bug #496265: Peers in PeersTab show non-zero download rate when seeding 2011-07-07 00:11:00 +01:00
a384cd70b3 Moved system tray to GtkBuilder. 2011-07-06 22:20:15 +01:00
0e00aa479b Moved queued torrents dialog to GtkBuilder. 2011-07-06 22:14:20 +01:00
807bc095b4 Moved remove torrent dialog to GtkBuilder. 2011-07-06 21:10:24 +01:00
5a81ab3c35 Moved the preferences dialog to GtkBuilder. 2011-07-06 20:56:58 +01:00
bad228645c The Stats plugin should not be using the old logging system. 2011-07-06 20:56:08 +01:00
e016b2106f Fix some broken GtkBuilder files. 2011-07-06 20:03:32 +01:00
f63f247ac5 Forgot to rename a glade from when migrating it to GtkBuilder. 2011-07-06 19:31:47 +01:00
0228af6b50 Add some missing .ui files. 2011-07-06 19:30:01 +01:00
90fb40b741 Moved the menubar to GtkBuilder. 2011-07-06 19:29:27 +01:00
367631c9aa Migrated filtertree_menu.glade to GtkBuilder. 2011-07-06 19:17:44 +01:00
b36d62be9b 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:16:31 +01:00
b4cc1d4358 Splited dgtkpopups.glade into other_dialog.ui and connect_peer_dialog.ui which are now using GtkBuilder. 2011-07-06 19:09:25 +01:00
39ad5a3596 Moved edit trackers dialog to GtkBuilder. Min PyGTK version is now 2.16. 2011-07-06 18:54:40 +01:00
dbad4684db Create torrent remotely progress information.
Support progress information when creating torrents remotely. For this to be possible, a method was added to the `RPCServer`, `emit_event_for_session_id()`, which does exactly what is says. This is needed because the event created, `CreateTorrentProgressEvent` needs to be addressed to a single session id, not all session ids interested in that event.
Fixed a bug that apparently was not found yet. When creating torrents locally, we defer that task to a thread. Since this thread updates UI widgets, namely the progress bar info and since we can't guarantee that it's the main thread, updating the widgets must be done by calling `gobject.iddle_add()`.
2011-07-06 16:45:02 +01:00
12d0e9574b Migrated create torrent dialog to GtkBuilder.
Additionally creating a torrent and saving it on a remote path now mimics the behaviour on doing it locally. Need to evaluate to see if it's possible to also show a progress when doing this remotely as now, the progress is only seen when doing it locally.
2011-07-06 12:45:50 +01:00
dd50b7bea1 Include deluge/ui/gtkui/glade/*.ui data files in setup.py. 2011-07-06 12:33:44 +01:00
4dc4049851 Migrated the connection manager to GtkBuilder. 2011-07-06 11:33:31 +01:00
27a6e398ee Migrated the "add torrent dialog" to gtkbuilder. 2011-07-06 11:17:13 +01:00
7035b1f166 Specify the plugin's name on logging calls. 2011-07-06 11:10:46 +01:00
a701fddbe8 Fix #948: New Release Dialog does not show server version 2011-07-05 19:49:53 +01:00
b512a664c6 Properly set/restore visibility when torrent is/is not "compact". 2011-07-05 15:46:36 +01:00
5bffa3757d Don't default to "localclient" as owner unconditionally.
Only set "localclient" as a last resort, first try to find out who is logged in.
2011-07-05 15:29:51 +01:00
8b6d6e3836 Fix broken SessionProxy tests. 2011-07-05 09:29:12 +01:00
37b9277c0e Update ubuntu tracker icon test 2011-07-05 18:00:06 +10:00
cf891125e6 Only deregister component if registry still exists 2011-07-05 17:58:18 +10:00
f75ec9d484 Fix translation of KiB/s 2011-07-04 21:39:08 +01:00
9a1ae06033 Fix #1239: Translated Tracker Error text not counted in sidebar Error status 2011-07-04 21:29:58 +01:00
55f456d851 Fix up/down speed labels in status tab 2011-07-02 19:14:26 +01:00
c346687510 Fix #1715: AddTorrentsDialog does not display filename changes when switching between torrents 2011-07-02 19:14:26 +01:00
08ee3d8f69 Fix #1582: Wrong path separator returned when moving storage in Windows 2011-07-02 19:14:18 +01:00
795f633bc4 Fix #491: Add auto_manage_prefer_seeds to prefs manager and UIs 2011-07-02 18:44:26 +01:00
b6596a27bc Add 'Last Seen Complete' to GTK and WebUI Status Tabs 2011-07-02 15:50:04 +01:00
b7fd2d1bf1 Fix #1338 Seeds and Peers totals not updating 2011-07-01 02:40:40 +01:00
0f625943c0 Fix #1477: Execute Plugin should ignore Added events from state file on startup 2011-06-30 19:24:38 +01:00
420447e386 Fix #1232: Improve display of Peers Tab IPv6 addresses 2011-06-30 18:02:06 +01:00
a79520e3ee Fix append trackers error occuring with magnet uris 2011-06-30 17:30:46 +01:00
8ae26c368e Add #890: If added torrent already exists, append extra trackers to it 2011-06-28 01:34:58 +01:00
981ad6d7d2 Fix #1246: Losing Labels upon restart 2011-06-27 22:53:47 +01:00
3b5e70580e Fix from_state in TorrentAddedEvent 2011-06-27 22:50:47 +01:00
71f9ef6499 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:50:57 -07:00
7dd54b4b34 Save and restore Preferences dialog size from config 2011-06-19 23:29:54 +01:00
c64ed6adc5 Fix preferencesmanager from failing to stop when trying to stop
loopingcall that wasn't started
2011-06-18 20:13:58 -07:00
a82c753ac0 Fix uri handling when dragged to gtk window 2011-06-18 12:45:21 +01:00
96b5f617f2 Change log level of connect failed to INFO 2011-06-17 18:07:34 +01:00
842734c4e4 Add a file exists check to torrents passed as arg 2011-06-16 21:18:10 +01:00
095f4ff20a Fix path error with torrent files prefixed with 'file://' from Firefox 2011-06-16 21:18:09 +01:00
ed0b017fe1 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:24:36 +10:00
ce9b540b97 Initial GTK UI Speedups.
The speedups work is being separated into 2 different phases and possibly branches. The idea is to have this minimal speedup merged into master as soon as possible since it's pretty simple. Reduces initial data transfer to about 10% of what was previously being transfered when client connected.
The second phase is regarding row updates, ie, reduce them to what's actually being seen. This part is way more tricky.
2011-06-09 13:49:07 +01:00
5112ed48d1 Fix starting deluge-web when using osx/windows since the options are presented, the later conditionals fail since the options object does not have those attributes 2011-06-06 14:57:50 -07:00
dfa8834db8 Fix starting deluge-web 2011-06-06 14:57:38 -07:00
5bc63fa910 Change component.deregister to take the object as the parameter, not the name 2011-06-06 14:19:51 -07:00
24c945f139 Add a RPCServer.deregister method
Deregister RPC exports when disabling a Core plugin
2011-06-06 13:55:51 -07:00
2542ad9234 Let the Core fire the PluginDisabled event instead of disabling the plugin right away 2011-06-06 13:55:17 -07:00
acb4ab44d2 Merge branch 'stats_plugin_master' 2011-06-06 21:37:08 +01:00
16fbf27b90 Stats plugin update 2011-06-06 21:36:37 +01:00
3397c2487b Fix bug introduced on previous commit. We need to get a selection first! 2011-06-06 19:46:02 +01:00
66e8b34a54 GTK UI un-select row on torrentview shutdown and filter change.
This is specially useful when multiple torrents are selected. This way, the "changed" signal won't be triggered for every row.
2011-06-06 19:40:14 +01:00
59f9d4e5cc Revert "Work around plugins being garbage collected once enabled twice."
This reverts commit 2f71ef4264.
2011-06-06 18:16:05 +01:00
221dea1f1a GTK UI. Center the custom speed dialog on parent(statusbar). 2011-06-06 17:45:51 +01:00
4420aae092 Late import GTK UI's ConnectionManager so that the translations code can be properly setup. 2011-06-05 22:48:17 +01:00
ddc0957e3e Wrap non deluge exceptions so that they can also be sent to the client. 2011-06-05 22:44:01 +01:00
2f71ef4264 Work around plugins being garbage collected once enabled twice.
When a plugin is enabled, disabled and then enabled again, on that second enable, that instance is being garbage collected causing the loading of the plugin to fail. Work around that until we can narrow down why is this is happening on the second enable.
2011-06-05 22:28:37 +01:00
bc56b749ee Merge branch 'translate_updates' 2011-06-05 17:03:21 +01:00
34c95a08a3 Fix translations texts in glade and python files 2011-06-05 17:02:33 +01:00
9ae19e173f Remove page x from translatable in pref_diaog glade 2011-06-05 17:02:33 +01:00
6672aaba1b Change translatable to No for gtk stock labels 2011-06-05 17:02:33 +01:00
0712fc9dee Add gtk-* items to gettextize 2011-06-05 17:02:33 +01:00
07dc9005f3 Update gettextize to ignore .git folder 2011-06-05 17:02:33 +01:00
274a76ab3b Fix translate string in notifications plugin 2011-06-05 17:02:33 +01:00
777993f74a Fix translated string in addtorrentdialog 2011-06-05 17:02:33 +01:00
d1037ae213 update create_potfiles_in to ignore plugins build dir 2011-06-05 17:02:33 +01:00
15e9f5f218 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-05 16:58:27 +01:00
4aab110aaf Remove duplicate code. 2011-06-05 16:23:09 +01:00
8933ac3123 Fix #1560 - FilesTab Progress value sorting by int instead of float 2011-06-05 13:23:23 +01:00
2e896b520e Fix #1456 - No ETA showing with multiple files 2011-06-05 13:23:16 +01:00
16d27b9657 Catch snd_path is None error in Notification Plugin 2011-06-04 23:24:39 +01:00
d3e8afdda1 Fix Extractor and Example plugin not starting 2011-06-04 22:56:36 +01:00
b86ba13376 Fix Feeder plugin name 2011-06-04 22:51:41 +01:00
f736576436 Fix Execute plugin not starting 2011-06-04 22:51:15 +01:00
9d1715405f Try to get some more debug info for plugins which are failing to load. 2011-06-04 19:25:53 +01:00
ee0d757b0e Some more fixes for plugins not fetching data from the correct namespace. 2011-06-04 19:23:03 +01:00
32c95fac1e Fix the Label plugin to get resources from the namespace. 2011-06-04 19:19:01 +01:00
df3214168c Cleaner fix for #1874, code clean up and reusability.
Translations are now setup on `deluge.common`. Where they used to be setup, a call to `setup_translations(setup_pygtk=False)` is now made.
Every call to `pkg_resources.resource_filename()` is now made through `deluge.common.resource_filename` to make sure that we're loading data from the right deluge install.
2011-06-04 18:06:45 +01:00
9e9261e6f8 Fix #1874.
While developing, if there's a second deluge package, installed globally and another in develop mode somewhere else, while pkg_resources.require("Deluge") returns the proper deluge instance, pkg_resources.resource_filename does not, it returns the first found on the python path, which is not good enough. Work around this issue.
2011-06-04 15:56:14 +01:00
087e94f6a1 Update all columns which use the "state" status field on the GTK UI TorrentView and not just the Progress column. 2011-06-04 10:43:24 +01:00
abe0031c2b Trigger a deprecation warning for code calling "getPluginLogger".
Since the plugins namespace was merged into master, calling "logging.getLogger(__name__)" will result in a properly named logger for plugins which will allow logging filtering.
The previous workaround "getPluginLogger()", is now deprecated.
2011-06-04 09:02:53 +01:00
13db148a11 Now that the plugin's namespace is in use, make the plugins get their own logger instead of using getPluginLogger() 2011-06-03 23:10:43 +01:00
84c5078667 Merge branch 'master' of deluge-torrent.org:deluge 2011-06-03 14:55:34 -07:00
cebdc89b18 Fix systemtray from stopping properly when appindicator is enabled 2011-06-03 14:53:41 -07:00
87e767d4c1 Merge branch 'master' into plugins-namespace 2011-06-03 17:48:22 +01:00
ce406674ec Update setuptools version in ez_setup 2011-06-02 21:50:38 +01:00
ac5f9a2828 Fix up stopping classic mode 2011-06-02 11:55:26 -07:00
6d55c44983 Fix menubar component stopping properly 2011-06-02 11:54:53 -07:00
1557d0da1f Move the log level to the left of the module because this field is a fixed width and its easier to read this way 2011-06-02 11:53:54 -07:00
2f785216f6 Show errors when trying failing to properly stop a component 2011-06-02 11:53:34 -07:00
8f1730591b While clearing the search filter, restore from pre-filter if available. 2011-06-02 11:16:11 +01:00
9ec44894d4 Fix #1873. Re-add the files and peers tab menus. 2011-06-02 10:58:45 +01:00
bb981127db spaces FTW 2011-06-01 20:29:38 +01:00
a96aeed706 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:56:23 -07:00
f14de6553a GTK UI search box grab_focus() on show. 2011-05-31 15:20:15 +01:00
b521b3065b GTK UI search box pre-filter implementation.
Implement a pre-filter for the search-box which will filter the currently visible torrents while waiting for the filter request to sent to the demon. This will make the searches seem way faster :)
2011-05-31 14:36:05 +01:00
ea438609bf GTK UI search by torrent name filter as a "toolbar".
Now, instead of permanently having a search box to filter the visible torrents by name, we now, mimic a toolbar just for that, mapped to CTRL-F. There's also a menu item in the "View" menu and a toolbar icon to toggle it. Implemented "Match Case" for the search.
2011-05-31 13:38:48 +01:00
0ba51d0e51 Fix peers tab flagsos.path.join 2011-05-30 22:14:36 +01:00
53370e4639 Fix peers tab flags missing 2011-05-30 21:33:17 +01:00
c70c8ea45d Add check to key_press_event for keyname returning None 2011-05-30 18:18:27 +01:00
937b53b355 pixmaps and icons moved to ui/data, all necessary references changed. 2011-05-30 17:57:39 +01:00
27cd89c4ad Remove setting the resume_data key to '' in the add_torrent_params as this causes libtorrent 0.16 to crash 2011-05-29 18:09:04 -07:00
c4dbf017a5 Merge branch 'master' into pieces-progress-bar
Conflicts:
	deluge/ui/gtkui/glade/main_window.glade
2011-05-29 20:00:25 +01:00
ec74f9aae3 Merge branch 'gtkui-search-by-name' 2011-05-29 19:21:12 +01:00
cfd955a605 AutoAdd plugin: Don't try to remove the same path twice! 2011-05-29 19:06:54 +01:00
feed806983 Wait at least 0.7 secs before triggering an update because of the search box, ie, allows typing the full search string before making the request. 2011-05-29 19:02:33 +01:00
c66637116b Allow searching torrents by name on the GTK UI. 2011-05-29 17:10:57 +01:00
4d4c6404b1 Log exception occurring while sending RPC errors to clients. 2011-05-29 16:39:00 +01:00
042ddd2891 Checkbox had no signal. 2011-05-29 14:36:26 +01:00
af24542856 AutoAdd plugin fix for #1863
In some cases, using `os.rename` between different mount points can trigger an `OSError`. Try to address these issues properly.
2011-05-29 11:37:31 +01:00
6dc393ed23 Allow a smtp port higher than 100
Add a shadow to scrolled window
2011-05-28 18:26:53 -07:00
c13eade81c Merge branch 'master' into pieces-progress-bar 2011-05-28 21:59:20 +01:00
eb639c3722 AutoAdd plugin auto fill.
When adding new entries, the dialog is auto-filled with what's defined for the Downloads entry in the preferences.
When showing errors, use the dialogs module.
Added some tooltips to the dialog.
2011-05-28 19:43:25 +01:00
dc514d308c GTK ui dialogs now have deluge's icon set. 2011-05-28 18:59:04 +01:00
67b5cde128 Fix #1867.
Now, if any option is changed on a torrent's options tab on the GTK UI, the apply button is set to sensitive.
2011-05-28 11:42:09 +01:00
ef98d19ed4 Merge branch 'master' into pieces-progress-bar 2011-05-28 10:54:03 +01:00
94a7b2ebf1 Fix #1861 - AutoAdd Warning (column number is a boolean) 2011-05-28 00:14:01 +01:00
e0443943b5 Catch an IndexError occurring in Files Tab when scrolling through long list of torrents 2011-05-28 00:05:18 +01:00
dd78a75ca8 Fix #1860 - Files Tab TypeError (could not parse subscript as a tree path) 2011-05-28 00:05:12 +01:00
82712c80e1 Fix #1195 - Right-click selecting issue when switching between files and folders 2011-05-28 00:05:00 +01:00
a710bcaed4 Add F2 key shortcut to rename files in Files Tab 2011-05-28 00:04:55 +01:00
3a7c182f83 Add XDG_DOWNLOAD_DIR for default download folder #1788 2011-05-28 00:01:58 +01:00
d42778afa3 Show the checking icon for the Checking Resume Data state 2011-05-25 13:21:16 -07:00
724025092a Set the WM_CLASS name to Deluge 2011-05-25 13:18:12 -07:00
bd43f3c464 Small text updates 2011-05-24 02:00:05 +01:00
8464a938b2 Fix up displaying versions in the about dialog 2011-05-23 17:09:16 -07:00
b8fad45eaa Change Connection Manager Key Shortcut to Ctrl-M 2011-05-23 22:23:35 +01:00
b08e90ac2a GTK UI edit trackers dialog. Remove un-used attribute. 2011-05-23 09:37:02 +01:00
13a379ef6c Update certain torrentview columns to default to not visible 2011-05-23 01:06:37 +01:00
09e24df4bb Merge branch 'masterchanges' 2011-05-22 23:36:49 +01:00
019f2a0619 Fix Up/Down buttons in Edit Trackers Dialog 2011-05-22 23:22:37 +01:00
2fb874d486 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:12:11 -07:00
85b4ceec30 Feature #1308: Add Seeds/Peers ratio to torrent list view 2011-05-22 22:48:03 +01:00
b0599313bc Feature #1646: Add columns for per torrent upload and download speed limits 2011-05-22 22:35:20 +01:00
974f48380f Change default value of close_to_tray to False
Prevents default install of Deluge disappearing if tray icon is missing.
2011-05-22 22:19:36 +01:00
b3865d0a7f Fix GTK UI edit trackers dialog.
Fix an issue with the edit trackers dialog where editing, adding or removing trackers was not "saved" in client/daemon mode.
2011-05-22 21:56:16 +01:00
79c9dd3076 Add libtorrent version to user_agent string
Example: Deluge/1.3.900-dev Libtorrent/0.15.5
2011-05-22 19:20:40 +01:00
edb0c2e71d Modify setup scripts to be executable 2011-05-21 18:54:15 +01:00
1c58dce3c1 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 17:32:20 +01:00
445f3c0123 Fix menu bug caused by Change Owner menuitem code
The right-click torrent menu would move/jump around when the option submenu was opened with the mouse, possibly due to a conflict between glade file and append menuitem code in menubar.py. Solution was to create a menuitem entry for Change Owner in glade file and update code to add submenu to this new entry.
2011-05-21 16:23:36 +01:00
eb15c96403 Add key shortcuts for menu items 2011-05-21 16:22:42 +01:00
71f411e458 Some comment explanation. 2011-05-19 00:29:30 +01:00
856a6cd1ab Pieces bar "calculation" bug fix. 2011-05-18 05:01:30 +01:00
99f2dbd178 Minor __doc__ naming change. 2011-05-18 05:01:30 +01:00
0e4747bf22 Lower debug messages level. 2011-05-18 05:01:30 +01:00
81637f4572 Add a nice border to the pieces bar. 2011-05-18 05:01:30 +01:00
25f086fa85 PiecesBar caching.
The drawings made on the pieces bar are now cached in "sub-drawings" kept in memory. If no data has changed, those "sub-drawings" are used. If data changed, redraw whatever is necessary.
2011-05-18 05:01:30 +01:00
6d57a29f1d PiecesBar rounded corners. 2011-05-18 05:01:30 +01:00
9b3f5783d5 Update ChangeLog. 2011-05-18 05:01:30 +01:00
b3492b07a1 PiecesBar
Now, either show the pieces bar or the progress bar, not both.
2011-05-18 05:01:30 +01:00
28def22625 PiecesBar enhancement.
The pieces bar will now draw status text, like a regular progress bar does, and for the overall progress, a semi-transparent overlay is also drawn.
2011-05-18 05:01:30 +01:00
427fe23bdc Minor comment cleanup. 2011-05-18 05:01:30 +01:00
da5c5d4b84 PiecesBar implementation.
We now provide an option to the user to see the states of a torrent's pieces, ie, completed, downloading, waiting, missing.
If the user has this option enabled, another 3 will be shown to him(on the GTK UI), which will allow him to choose the colors for each piece state.
2011-05-18 05:01:29 +01:00
438cbd2238 Correct the pieces states "calculation". 2011-05-18 05:01:29 +01:00
2d59b62317 Provide the option to the user to use the pieces bar or not(Glade file only). 2011-05-18 05:01:29 +01:00
19f32b1446 Provided a method to get the pieces information.
Each piece will return 0 for a missing piece, 1 for a not downloaded piece, 2 for a downloading piece and 3 for a downloaded piece.
2011-05-18 05:01:29 +01:00
9b812a4eec Extend RPC Protocol.
While adding the multiuser auth related stuff, RPC_AUTH_EVENT was added, simply to not touch how RPC_ERROR was handled. It was created to allow recreating the exception on the client side. Instead of adding another rpc event type, extend RPC_ERROR to send the proper data to recreate the exception on the client side.
2011-05-18 03:56:17 +01:00
e383187796 Fix #1281. Show a nice dialog stating that the client is incompatible on the GTK UI. 2011-05-17 22:50:05 +01:00
6151050ad4 PEP-8 2011-05-17 22:16:12 +01:00
9a3bf35cdf Include our custom lower log levels into python's logging. 2011-05-17 02:47:16 +01:00
6391970fad 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:11:20 +01:00
0ba0e013b5 Force backwards incompatibility.
Force clients prior to 1.4 to fail authentication, this was we might reduce tickets like #1852.
2011-05-15 22:18:38 +01:00
552c898998 Fix #1844.
The submenu got lost on one of the glade files merges. Re-added.
2011-05-15 11:26:41 +01:00
bc5b4d902f Fix LP Bug #779074 - TypeError in on_key_press_event(): cannot concatenate 'str' and 'NoneType' 2011-05-12 22:42:13 +01:00
6a8e3f1c49 Minor code cleanup. 2011-05-11 09:06:21 +01:00
81ca9952e9 Moved core.conf config upgrade to core instead of pref's manager. 2011-05-10 20:15:33 +01:00
74618d5a65 GTK UI move storage fixed. Was still not allowing moves. 2011-05-10 20:13:26 +01:00
0c110c2408 Fix broken tests. Twisted deferred loops, must be stopped! 2011-05-10 11:21:24 +01:00
1ac997e7d7 Upgrade core config and handle empty AutoAdd watchdirs.
We now upgrade the core's config to include 'sequential_download'.
On the auto add plugin, if there are no watchdir, provide a default that will allow the GTK UI not to thrown an exception.
2011-05-09 15:47:10 +01:00
d4692bef42 AutoAdd Plugin. Remove line feeds from log messages. 2011-05-08 23:48:42 +01:00
77fc53afc0 Sequential downloads. Was querying for the wrong key on the torrent status. Fixed. 2011-05-08 23:46:55 +01:00
3b676eca40 Sequential downloads: Implemented in GTK UI torrent options tab. 2011-05-08 23:33:21 +01:00
ce3ce2c035 Sequential downloads: Implemented in GTK UI preferences dialog. 2011-05-08 23:11:51 +01:00
c8735b5cab Sequential downloads: Implemented in add torrent GTK UI dialog. 2011-05-08 22:55:55 +01:00
cc5f2ffe18 Implemented sequential downloads on core. 2011-05-08 22:39:11 +01:00
89b79c76a3 Multiple files prioritize first last.
Now `set_prioritize_first_last()` sets the first 2% and the last 2% of the pieces of each file on a torrent at a high priority, ie, it no longer works on just single file torrents.
2011-05-08 22:11:20 +01:00
837c39fdda Last seen complete checks.
Remove some un-necessary `lt.version_minor` checks since these checks will remain for a while, at least until deluge depends on libtorrent >= 0.16 which should preferrably not happen.
2011-05-08 21:58:26 +01:00
110026edbe AutoAdd plugin #1842
Fix bug #1842 and also implement "delete torrent file on torrent removal from session".
2011-05-08 21:38:53 +01:00
3b8ebf68a6 GTK UI menubar accounts retrieval.
Only ask for known accounts if we have the required level for it.
2011-05-08 21:36:10 +01:00
ffd344d0b5 On some "race" conditions, the torrent is removed before it's status could be retrieved. Return an empty status. 2011-05-08 21:35:06 +01:00
9d29ca7b29 Check against libtorrent >15 not >16. 2011-05-08 02:39:35 +01:00
38906468c1 Last seen complete
Update last_seen_complete when a status is queried for and that key is on the keys to get or it's a full status query. Either way, only "calculate" last seen at a minimum of one time per 60 seconds(simple caching).
2011-05-08 01:36:40 +01:00
95d7caf3ac Implement Last Seen Complete, on core and on GTK UI. 2011-05-07 20:22:55 +01:00
4044f52f77 GTK UI Torrent's options tab.
Set the apply button to sensitive if the value of a spin button changed. This was missing.
2011-05-07 15:54:10 +01:00
a7bd953169 GTK UI Connection Manager (#1824)
Warn the user if he's trying to connect to a local daemon that's not running and "start local daemon if necessary" is not enabled.
Extend and reuse the connection callbacks on the connection manager to re-use code.
2011-05-07 15:14:32 +01:00
8922717ff2 fix unrequired requests 2011-05-07 13:20:09 +01:00
117d50b728 fix a bug when the host_id doesn't exist 2011-05-07 13:20:04 +01:00
04af8965bc apply patch from #1742 2011-05-07 00:02:49 +01:00
d6f5e5b4ec fix #1537 editing trackers list, trackers have to be reselected 2011-05-06 23:44:19 +01:00
1f3a7bf44c Fix #1333 Peer list doesn't update automatically 2011-05-06 23:25:07 +01:00
2e62ced811 fix #1323 filter panels not scrollable 2011-05-06 22:33:10 +01:00
95819c79e5 Fix #1268, Torrent errors not displayed in webui 2011-05-06 22:23:25 +01:00
5ad21303c6 fix issue #1567, js from plugins not working with different base setting 2011-05-06 22:09:17 +01:00
922e64a07e fix issue #1799 2011-05-06 22:01:06 +01:00
30d70d2b9b apply patch from #1562 2011-05-06 19:16:20 +01:00
a06b350858 Correct log message. 2011-05-06 19:10:26 +01:00
06f025f4bd fix the widths on the input boxes, whitespace changes too 2011-05-06 19:03:05 +01:00
d362a6ceba fix the path given by the set-cookie header 2011-05-03 19:05:15 +01:00
138b8ae314 Sorry for the noise. Email change. 2011-05-02 05:02:46 +01:00
6f3bc5620f Fix #1824.
When connected to a client, and then trying to connect to another, the connection manager component will be stopped(while the connect deferred is still running), so, the ConnectionManager.connection_manager reference will be deleted. If that's not the case, close the dialog.
2011-05-01 07:41:44 +01:00
f2249d5803 Remove un-used import. 2011-05-01 04:46:54 +01:00
f26de83509 Don't run into loops when the auth file does not exist and we're trying to create it. 2011-05-01 04:44:42 +01:00
f6826a4f48 Fix #1822
Only query the core for the known accounts if connected to it.
2011-04-30 20:45:15 +01:00
dd3f78bd36 More changes related to automatic connections.
Auto-connecting on start of the gtk ui is now fully working.
Auto-staring localhost if needed is now also working.
Authentication failures now get passed correctly to the client implementation which will allow the user to enter username and/or password to complete authentication.
It's now possible to shutdown the daemon from the connection manager even if not on localhost, it just needs all required information to be present on the liststore.
2011-04-30 07:42:06 +01:00
63d0d0c69b GTK UI connection manager fixes.
Auto-connecting to daemon now works. Fixes #1815.
Auto-starting a `localhost` daemon now also works, the reconnecting attempts were not being "triggered".
When not connected to a daemon, "Quit & Shutdown Daemon" is not present. So #1818 is also fixed.
Some more work regarding #1819 was done.
Client now disconnects before shutting down the GTK UI.
2011-04-28 16:59:01 +01:00
1be59bb116 don't show decimals for 100% progress (100% instead of 100.00%) 2011-04-28 14:28:53 +02:00
751345fc28 minor function renaming to make things properly private 2011-04-28 14:28:53 +02:00
12ea65d188 show priorities for directories. fulfills feature request 1688 2011-04-28 14:28:53 +02:00
e950cca059 reset selection to top on alltorrent resume in case another mode has effected torrent list 2011-04-28 14:28:53 +02:00
a063095dad Make sure we have a config loaded in the connection manager. Fixes #1819. 2011-04-28 11:06:26 +01:00
39978d5ade Fix #1278 by keeping references. 2011-04-28 10:37:35 +01:00
9fa8748432 Fix some clean config dir issues.
Moved some auth stuff to `deluge.common` because they're also used on the GTK UI.
Now, if a user starts deluge in classic mode and tries to change it to client/daemon mode, he see's a dialog stating that the current session will be stopped. If he answers no, nothing is done, the classic mode pref is set back as it was. If he answers yes, all components are stopped and client is disconnected. At this stage the user can open the connection manager to start the daemon and connect.
If the user starts in client/daemon mode and switches to classic mode he see's a dialog stating that deluge must be restarted.
The GTK UI connection manager now loads it's default config with the localclient username and password. If not present in the auth file, the auth file will be recreated.
2011-04-27 22:06:13 +01:00
18b27d4b49 Remove a pref regarding auto adding in queue thinking it was from the core's previous AutoAdd. Re-Added. 2011-04-27 19:42:54 +01:00
f41f6ad46a Test fixes and #1814 fix.
All test were adapted, and some more were added to comply with the new multiuser support in deluge.
Regarding #1814, host entries in the Connection Manager UI are now migrated from the old format were automatic localhost logins were possible, which no longer is.
2011-04-27 19:32:13 +01:00
bb9a8509c8 Fix trying to load the AutoAdd component as it no longer exists in core 2011-04-27 11:03:43 -07:00
6694ac7a58 Merge branch 'master' of deluge-torrent.org:deluge 2011-04-27 17:30:09 +01:00
81d22eb730 When parsing the auth file, if an old format is found(with no auth levels), make sure that the localclient always has the ADMIN permission as he should. 2011-04-27 17:30:00 +01:00
47a9b18b89 enforce min/max values for float/int spin inputs 2011-04-27 18:09:20 +02:00
292929ba59 better handling of keyboard input in int/float spin inputs 2011-04-27 18:09:20 +02:00
cbcf413ffd use callbacks for mode switching when stopping alltorrents component. should fix bug 1686 2011-04-27 18:09:20 +02:00
4d8b34209b fix column trimming a bit 2011-04-27 18:09:20 +02:00
98a8be7131 avoid having the tests hang due to a failing to connect client! 2011-04-27 13:38:23 +01:00
2e68e0181c Remove some leftovers from the old multiuser branch. 2011-04-27 13:18:59 +01:00
e6773dfce1 Merge branch 'master' into multiuser-oldprefs 2011-04-27 13:15:05 +01:00
f56be66556 Update ChangeLog. 2011-04-27 13:06:26 +01:00
67a4fd49e9 fix problem when not showing name,state or queue columns. fix problem if there were no var length cols. 2011-04-26 22:59:48 +02:00
e992ac3eab ignore key presses that only makes sense when we have a state when we don't have a state 2011-04-26 14:18:25 +02:00
d05352db65 fix bug for selecting multiple torrents with cursor above last mark (bug 1689) 2011-04-26 14:03:49 +02:00
b1e0dd66eb handle files with [ and ] characters in them 2011-04-26 13:53:11 +02:00
897c2f981f Add help to torrent details mode.
fixes bug: 1687
2011-04-26 12:41:19 +02:00
91801e1632 Cleanup debug message new lines. 2011-04-26 10:14:39 +01:00
fa20e49a93 Fixed 2 bugs regarding torrent ownership change.
On the core, the code was not adapted to the new AuthManager. On The GtkUI, nothing was being shown to the user when errors occurred while changing ownership.
2011-04-26 08:37:20 +01:00
4432e6e6e3 Also handle moving the torrent files after adding them besides renaming or deleting(per whatchdir) 2011-04-25 16:38:49 +01:00
c225c045cb Better file modification detection. 2011-04-25 15:07:07 +01:00
e552c21f66 Automatically detect auth file changes and reloading those changes. 2011-04-25 14:43:44 +01:00
89d04a393b Upgrade old auth file, save it and reload it. 2011-04-25 14:35:01 +01:00
f1730dc4d4 Removed leftovers from the core autoadd. All autoadd features are now addressed by the AutoAdd plugin. NOTE: Console UI and Web UI should also remove the core auto add stuff. 2011-04-25 13:44:27 +01:00
fb5005e3f6 The AutoAdd plugin now supports multiusers. 2011-04-25 13:16:11 +01:00
51b5b23f76 Remove debug printing. 2011-04-25 13:12:18 +01:00
78e966946f Allow setting torrent ownership when adding new torrents. 2011-04-25 09:13:45 +01:00
936bd925d9 Some changes were left behind on last commit. 2011-04-25 08:12:46 +01:00
43e3fe2a1a Account Management Implemented.
Account management is now implemented for the GTK UI. Some changes to the core were required since the clients need to know which authentication levels exist, and, to expose account creation, update, and removal to the clients. The best effort is done to try not to compromise the auth file.
2011-04-24 17:38:35 +01:00
6ed3136c8e No server side logouts.
Do not try to for a disconnect on this branch, maybe on another one.
2011-04-24 17:19:57 +01:00
8195421c99 Some account management work. Not yet complete. 2011-04-22 18:51:51 +01:00
342da12d0c Merge branch 'master' into multiuser 2011-04-22 11:44:10 +01:00
5296fc7d4c Fix one more possible issue with regard to #1786 2011-04-22 11:42:48 +01:00
233e814547 Late import twisted's reactor, it allows the gtk reactor to be proper installed. 2011-04-22 11:33:45 +01:00
03325c5f48 Add some missing code 2011-04-22 11:27:14 +01:00
1a6742b1e2 Keep consistency on deluge.config. 2011-04-22 11:26:09 +01:00
154688a3e2 Implement __delitem__ on deluge.config.Config. 2011-04-22 11:26:09 +01:00
fe12552590 Now, when the authentication dialog appears, user fills in the password and hits ENTER, the authentication call will be made.
Implement tooltips on treeview's headers when adding columns.
Renamed the "public" state of a torrent to "shared", ie, shared among other deluge users. Allow changing shared state from clients and currently from the    GtkUi.
2011-04-22 11:26:08 +01:00
e63c33c496 Allow changing ownership of torrents. In order to achieve this, added deluge.core.set_torrents_owner(), deluge.core.get_known_accounts(), deluge.core.authmanager.get_known_accounts() and deluge.core.torrent.set_owner()`. So far only the GtkUi has this fully implemented. 2011-04-22 11:25:33 +01:00
105cb52cb0 Add method to return the current authenticated username. 2011-04-22 11:24:42 +01:00
3e0ea26e5f Remove unused method, duplicate log messages and add a method to get the logged in user's authentication level. 2011-04-22 11:24:42 +01:00
e44cac0eaa Since there's no default username for authentication, update hostlist to include the username.
Remove debug prints or extreme debugging. Minor code cleanup. Remove un-used imports.
2011-04-22 11:24:42 +01:00
86a1b801f5 Now it is possible to not even store the username on the hosts entry in the connection manager, both username and password will be asked to the user. WARNING: No more "localclient" automatic login, ie, username, is mandatory else, it will be asked to the user. 2011-04-22 11:24:42 +01:00
b3870ad6dd Use a specific response code for authentication requests. Recreate authentication request exceptions on the client end. 2011-04-22 11:24:42 +01:00
67ff83360f Use the exceptions from deluge.errors. 2011-04-22 11:22:19 +01:00
b2a16a0240 Move deluge errors to the errors module, they will be reused later on other parts of code.
Now, calling connect on client has two behaviours, if username/password is passed the client connects, authenticates and returns daemon info, if username/password is not passed, only the daemon info is returned. This might change a bit later on though.
2011-04-22 11:22:19 +01:00
e17c035521 Cleaned up previous commit regarding threads and the GTK2Reactor.
Now a dialog apears if the daemon complains about a missing password in order to authenticate. Asks the password from the user and retries to connect.
2011-04-22 11:22:19 +01:00
249398489e Removed problematic code. GTK2Reactor takes care of all that. 2011-04-22 11:22:19 +01:00
d44f59a0e7 Add some docstrings. 2011-04-22 11:22:19 +01:00
6c99204828 The GtkUi's connection manager now has the ability to edit existing host entries besides adding and deleting them.
It also asks for a password prior to attemting to connect in case the password is null, this alows host entries not to store the passwords on file like it has done so far.
NOTE: This is not yet the desired behaviour, ie, the daemon should simply complain if the authentication details are incomplete and the client should act accordingly. I had an issue with this though, I catched the errback the daemon was sending, asked the user for the password and re-tried to authenticate again. However, twisted always locked when I tried this. I'm investigating it.
2011-04-22 11:22:19 +01:00
1794f09b21 Make branch runnable. 2011-04-22 11:22:19 +01:00
b08a4679de Respect the torrents ownership and unless the logged in user is an admin, only return his own torrents plus all other public torrents. 2011-04-22 11:21:12 +01:00
bfc221fc18 Begin work on fixing up the Preference dialog
Split up the glade file for each individual page
2011-04-22 11:21:12 +01:00
5ad3a1666c Update the ErrorDialog 2011-04-22 11:20:15 +01:00
49d5ed6bde Hopefully, final fix for #1786:
We now make sure that a state file exists when trying to restore an order from it.
The best effort to restore the previous order is made, though, in some cases, since we're matching against names which are translatable, a match might not be found, in that case, continue the effort though skip the non matching column name. On next load, everything should be fine since the state file will include the, now in use, translation.
2011-04-21 20:55:01 +01:00
4b9209674e Merge branch 'master' of deluge-torrent.org:deluge 2011-04-21 18:31:03 +01:00
b9a688013f Fix #1786:
Don't reorder duplicate columns, need to dig how duplicate columns got into the state file, and also skip non visible columns.
2011-04-21 18:29:59 +01:00
387b746fae Merge branch 'master' of deluge-torrent.org:deluge 2011-04-21 10:41:15 +01:00
796109649d fix the client tests albeit in an ultra hacky way 2011-04-21 10:41:00 +01:00
d258794517 Merge branch 'master' of deluge-torrent.org:deluge 2011-04-21 00:47:01 +01:00
98f80c0eb6 Restore column order from state.
On the TorrentView's treeview, the column's position stored on state was being ignored, but event if that info was not being ignored and passed to the several `add_column`'s the order could not be added because the order the columns are added does not(might not) match what was stored in state. So, we now restore the ordering once all columns are added.
2011-04-21 00:42:36 +01:00
d18becc861 fix bug due to vim stripping regex being wrong 2011-04-20 18:37:39 +01:00
0503db85ea Merge branch 'master' of deluge-torrent.org:deluge 2011-04-20 18:34:02 +01:00
bcb636dda4 improve the core tests to use a built in webserver 2011-04-20 18:32:55 +01:00
5bc304470c Let's use what the stdlib provides us. Use email.utils.formatdate instead of strftime() a datetime object. 2011-04-14 09:29:40 +01:00
42e1e2fd20 Include proper Date header in email notifications. 2011-04-13 12:54:59 +01:00
bb0746c3e8 use os.sep and strip what's already in input box from complete options 2011-04-13 11:52:03 +02:00
19799d74b4 Include gif pixmaps in the package data 2011-04-09 22:36:12 +10:00
0d560bcd6f Add update-tracker/reannounce command for command-line/legacy interface 2011-03-29 14:56:39 +02:00
69b79756f2 Merge branch 'master' of git.deluge-torrent.org:deluge 2011-03-28 16:51:23 +01:00
fd248eb1fd split the auto_add_trackers textfield otherwise it breaks the label plugin 2011-03-28 16:51:03 +01:00
45ccd3b84a Fix libtorrent not compiling with boost libs 1.46 2011-03-26 17:33:26 +11:00
298b85c368 Improve autoadd filename matching (fixes #1614) 2011-03-26 17:33:26 +11:00
67add964de Apply patch from #1581 to add an option to enable the app indicator
interface
2011-03-22 17:16:50 -07:00
e81a279dc2 fix naming issue with close callback in popups 2011-03-19 12:38:55 +01:00
280781ded9 queue management in torrent actions 2011-03-13 12:53:13 +01:00
f30a2858ce convert the tests to use a local webserver instead of pinging deluge-torrent.org and damoxc.net 2011-03-08 14:43:09 +00:00
32b41fabd6 Handle redirection when adding a torrent by url 2011-03-09 00:44:42 +11:00
a0f9689664 Handle partial downloads due to incorrect headers (fixes #1517) 2011-03-09 00:40:15 +11:00
08843ccad5 support prefs that don't fit on the screen
remove superfluous log message
2011-03-08 12:21:45 +01:00
e0bb8869aa add some more columns 2011-03-08 11:34:59 +01:00
255af3c485 set status fields to get from visible columns 2011-03-08 00:35:55 +01:00
f35145b0a6 make alltorrents a component like it should be and get rid of alltorrentsstateupdater 2011-03-08 00:16:42 +01:00
f2d560351e add preferences for display and size of columns in alltorrent mode 2011-03-07 13:40:25 +01:00
62da60a0e4 break out each column preference 2011-03-07 12:37:23 +01:00
d9c1a56d44 use config params for columns to show 2011-03-07 12:14:36 +01:00
84f278dbcc show a 'scrollbar' of sorts for popups with a lot of text 2011-03-01 19:39:55 +01:00
356f298e9c update help display using new wrap_string.
re-wrap on resize

add some highlighting
2011-03-01 19:13:17 +01:00
5fb01dacc0 add a {!normal!} color scheme 2011-03-01 19:12:48 +01:00
8d541ad419 use new wrap_string function in MessagePopup 2011-03-01 19:12:05 +01:00
426eea154e add a wrap_string function that works properly 2011-03-01 19:11:53 +01:00
ccc047848a split long lines in torrent info popup 2011-02-28 20:22:49 +01:00
11d8332e43 make sure we're in interactive mode before checking for screen 2011-02-28 14:03:39 +01:00
2193240c66 update help for legacy mode 2011-02-27 17:15:12 +01:00
e43c532e63 remove screen.py
all functionality has been moved elsewhere at this point
2011-02-27 17:14:50 +01:00
930addb389 add 'legacy' mode, which is basically just the old deluge-console, for curmudgeons 2011-02-27 17:12:57 +01:00
fab1e8412d encode string before write to specified encoding 2011-02-24 14:18:49 +01:00
1cce30393b add interactive field to commander so command -h will work 2011-02-24 13:24:45 +01:00
510c81776f add status command 2011-02-24 13:24:35 +01:00
e7096d9509 Merge branch 'master' of deluge-torrent.org:/deluge 2011-02-24 12:13:06 +01:00
5ae242472f don't search for empty string in alltorrents.py 2011-02-24 12:11:14 +01:00
ee75786e40 handle the case where libtorrent doesn't know what files are in a torrent.
this is the case when torrent was added by a magnet link
2011-02-24 12:08:42 +01:00
87473f2cde support magnet uris in add command/dialog 2011-02-24 12:08:22 +01:00
b2f349c05d Remove unnecessary import 2011-02-23 11:22:29 -08:00
9ac0d62149 Remove some imports that are no longer neccessary 2011-02-23 11:21:47 -08:00
db46a97263 Merge branch 'master' of deluge-torrent.org:/deluge 2011-02-23 20:05:48 +01:00
4c2f9a1a0a un-revert main.py as it doesn't actually handle events. 2011-02-23 20:04:15 +01:00
64e38eac20 Revert "Fixed "PluginEnabledEvent" and "PluginDisabledEvent" the argument cannot be called name since that should contain the event name."
This reverts commit 078ed6ba71.
2011-02-23 11:01:59 -08:00
499a58f50d Revert 67ea05921c which changed how event handlers worked.
Unfortunately this will not work with plugins as they do not have the events defined and
the creation of the event object fails.
2011-02-23 10:47:16 -08:00
5f0f7204a8 don't use libtorrent anymore in add 2011-02-23 16:15:34 +01:00
62f6683730 support urls from add dialog 2011-02-23 16:12:49 +01:00
60d96c6f20 add add_spaces to InputPopup 2011-02-23 16:07:47 +01:00
d1efe5f1b4 support adding url arguments in add.py command 2011-02-23 15:53:14 +01:00
62421080ef better unicode handling and trimming 2011-02-22 18:04:16 +01:00
9e4ea0a671 don't trim rows
(basemode seems to get confused on strings with double-wide chars)
2011-02-22 17:18:12 +01:00
b11468c19b handle double-wide unicode characters 2011-02-22 17:17:55 +01:00
40a5722987 support -s STATE in info 2011-02-22 16:57:56 +01:00
956ea10a00 convert torrent_ids back into a list in case we need to remove from it 2011-02-22 16:56:54 +01:00
543fcf722c use os.path.commonprefix to do better completion 2011-02-22 14:58:40 +01:00
7f52472e9e add move command for console ui 2011-02-22 13:56:22 +01:00
5619991f2a add move storage option to torrent actions 2011-02-22 13:39:38 +01:00
2b04955128 don't double add current torrent on action popup 2011-02-22 13:39:20 +01:00
e83d540fe4 update help 2011-02-22 13:38:54 +01:00
4e5d88da82 import deluge.ui.common for TorrentInfo command 2011-02-22 12:34:29 +01:00
10816cb8f4 always have a torrents list, in case get_torrent_name gets called from a mode without get_torrent_name in new ui 2011-02-22 12:32:32 +01:00
5f8eda9204 Merge branch 'newconsole'
Conflicts:
	deluge/ui/console/main.py
2011-02-22 00:26:57 +01:00
b0c561dbbc add add_checked_input 2011-02-22 00:09:27 +01:00
1173f1c714 support globbing for multi-file add and have better fail reports 2011-02-21 17:44:12 +01:00
3da5cd9816 add get_torrent_name 2011-02-21 17:43:35 +01:00
d9d8762c8e add get_torrent_name 2011-02-21 17:41:28 +01:00
e16ee523a5 fix messagepopup height_req 2011-02-21 17:41:10 +01:00
3db7bcbfc7 make message popups a bit more sane 2011-02-21 16:30:49 +01:00
e1a3a431f0 support command line options again 2011-02-17 16:26:58 +01:00
9a3316f950 use '-' instead of '~' in progress bar 2011-02-17 16:04:54 +01:00
1789e8d03c Minor changes for command line usage 2011-02-17 16:03:11 +01:00
837322478b return deferred for proper command line behavior 2011-02-17 15:30:14 +01:00
ce2516ab2c search field is black,white 2011-02-15 20:15:43 +01:00
962bfc3d2c support searching torrent names in alltorrent view 2011-02-15 20:14:14 +01:00
4ff0fb19ee left arrow goes back to overview from torrent details 2011-02-15 19:36:17 +01:00
7a4006439b add preferences help 2011-02-15 19:10:57 +01:00
c015c3a57d update help a bit 2011-02-15 19:10:51 +01:00
8a9e732f95 lots of new preference work 2011-02-15 18:55:27 +01:00
0b3c408e64 make the edit trackers window resizable 2011-02-15 12:54:35 +00:00
d3a61bbda4 fix scrolling on the edit trackers window 2011-02-15 12:49:04 +00:00
c523958bf6 Fixes for gtk-ui translations 2011-02-14 23:50:08 +00:00
06003b3650 Fix translate issue for Trackers tree in sidebar 2011-02-14 23:49:45 +00:00
1e0005f572 Fix: os.join created root path in Remove_Empty_Folder if variable 'folder' had a leading slash 2011-02-14 23:49:04 +00:00
4a071ecba1 add an eventview 2011-02-14 12:38:18 +01:00
77eb1a5f82 prefs actually work. some tweaks to inputs to better support prefs
not all prefs available yet
2011-02-14 12:26:24 +01:00
ac8c928a5b don't always refresh on __init__ 2011-02-14 12:25:43 +01:00
23f64a5440 add back write method and keep track of events for (future) event view 2011-02-14 12:25:04 +01:00
98ca371b15 Sidebar: Enabled strings for translation and added icons to Trackers filter 2011-02-11 22:10:00 +00:00
f8737777b1 Fix #1527 - Converting unicode to unicode error in move_storage 2011-02-11 21:58:40 +00:00
e198ea14e4 Fix Create Torrent Dialog Box - Some buttons raise Type Error if no row selected 2011-02-11 21:58:32 +00:00
553f35eae5 Fix #1510 - Cannot create a torrent with only non-zero tier trackers 2011-02-11 21:58:24 +00:00
376a23e6fd Fix #1513: Unhandled Twisted Error in test_listen_port 2011-02-11 21:58:18 +00:00
077f35ec5c use selection input for cancel/apply/ok 2011-02-10 17:54:59 +01:00
00ab9ff499 support offset text/select inputs and select inputs with no message 2011-02-10 17:47:50 +01:00
20302021c4 initial prefs mode. doesn't do anything yet 2011-02-10 17:39:42 +01:00
9e5455793b remove unused code
this breaks command line right now, will put it back in later
2011-02-10 16:45:10 +01:00
7f6a1db89a start with a connection manager instead of just alltorrents 2011-02-10 01:12:14 +01:00
cdcab320fb add current_selection to SelectablePopup 2011-02-10 01:11:31 +01:00
ea22bb0b10 #1514 - Indicator Applet Patch 2011-02-09 19:15:34 +00:00
554f34a261 Fix #690 - Renaming folders does not remove old empty folders 2011-02-08 19:34:54 +00:00
ad2b13eb2c Fix #1248 - Deluge-console unicode support on redirected stdout 2011-02-08 17:36:09 +00:00
ce636ccd57 Catch a possible DivByZero error when moving folders around in fileview tab 2011-02-08 17:36:09 +00:00
053700342a Fix #1336 - Uneeded Horizontal Scrollbar shows in Files&Peers Tab 2011-02-08 17:35:57 +00:00
cd7805bfda make text input not go over width 2011-02-08 14:43:41 +01:00
79869faa53 #1494 - Add Downloaded and Uploaded columns to torrent view 2011-02-08 06:49:30 +00:00
b77f8929d6 oops, add torrent actions new file 2011-02-07 15:10:41 +01:00
e1d8025309 show torrent actions form details when 'a' pressed 2011-02-07 15:10:18 +01:00
183a97785b split off torrent actions popup 2011-02-07 15:01:07 +01:00
f748660cac show status message 2011-02-07 15:00:51 +01:00
cea6c817df Fix #1506 - max speed not restored on a yellow->green transition 2011-02-05 01:12:52 +00:00
b9ff47e10f Fix #755 - Can't set listen_ports through console UI 2011-02-05 01:12:48 +00:00
14746bf94d Fix #1450 Trailing white space in paths 2011-02-05 01:12:47 +00:00
87f871f40a 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:12:45 +00:00
9f3ac37f25 Fix #1282 - Text for AutoManaged changed to 'On/Off' and localized 2011-02-05 01:12:44 +00:00
417a9f6e63 Fix #1373, #1386 - Creating and moving non-ascii folder names in MS Windows 2011-02-05 01:12:43 +00:00
ba6389bcac Updated help text for deluge-console on Windows 2011-02-05 01:12:42 +00:00
9bca1a72b1 Fix for deluge-console adding torrent files in Windows 2011-02-05 01:12:41 +00:00
e688b45448 Fix #1508 - TypeError in cell_data_queue() could not convert argument to correct param type 2011-02-05 01:12:36 +00:00
4c54cfedb9 Fix #1507 - Temporary file race condition in core/core.py:add_torrent_url 2011-02-05 01:12:35 +00:00
88039a0eda fix patch, missing deluge.common when adding the options 2011-02-04 19:57:31 +00:00
9a54beef78 add patch from #1473 2011-02-04 19:43:27 +00:00
b0a0574ae0 Apply patch from #1194 2011-02-04 19:37:42 +00:00
db64745862 fix priority popup title 2011-02-02 20:50:48 +01:00
0353a388b3 add option to action popup for torrent details 2011-02-02 20:49:27 +01:00
b41ebe1b89 don't show action popup if there are no torrents in the view 2011-02-02 20:49:11 +01:00
1952357f35 update help 2011-02-02 20:40:15 +01:00
6c8529b3ba updated file seperator 2011-02-02 20:39:57 +01:00
78ea5c9bd3 don't enter torrentdetails if nothing is selected 2011-02-02 18:32:03 +01:00
b35875e300 attempted fix of color/underline issue.
this is a bit of a hack, and seems to work some places, but not everywhere
2011-02-02 16:21:52 +01:00
ad498c6e42 Revert "remove special case white/black pair. doesn't seem needed and breaks white,black,attrs"
This does actually seem to break some terminals

This reverts commit ba3a093746.
2011-02-02 13:57:31 +01:00
d1b3aa54ad support setting file priorities in torrentdetails 2011-02-02 13:46:05 +01:00
d0346a104f don't need len() 2011-02-02 13:45:17 +01:00
5f888faceb handle resize in torrentdetail 2011-02-02 13:11:15 +01:00
f6f3a8e084 allow marking in file view (no actions just yet) 2011-02-02 13:09:41 +01:00
5dcc935852 fix for only drawing one effected line and only draw effected lines on marking 2011-02-02 12:50:40 +01:00
eba7c2bf17 add index value to directories in file_list 2011-02-02 12:44:07 +01:00
00fa074452 small fix for scrolling 2011-02-01 18:00:25 +01:00
5d46d2aee5 add torrentdetails state, allow state switching, move some formating to format_utils 2011-02-01 17:23:15 +01:00
007dd67ea1 only redraw effected lines on scroll. seems to get rid of the flickering problem :) 2011-01-29 14:04:32 +01:00
ff3c3f7148 add torrent can add paused. remove torrent works 2011-01-29 12:29:18 +01:00
68c04acf50 refactor + support selectinput 2011-01-28 22:42:04 +01:00
44676f282a use some caching to speed up row drawing.
still some flicker unfortunatly.  seems to be related to the length of the row line, not sure if there's much i can do there
2011-01-28 17:54:36 +01:00
182ec0cd97 specify hotkeys for filter/action popups 2011-01-28 17:34:03 +01:00
6f0b1fd7f2 support hotkeys in selectable popup 2011-01-28 17:33:51 +01:00
ba3a093746 remove special case white/black pair. doesn't seem needed and breaks white,black,attrs 2011-01-28 17:04:28 +01:00
b7e7a4bc49 Fix typo 2011-01-27 11:18:59 -08:00
ac18ecd1f0 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:12:40 -08:00
2f6283ea39 initial checkin of new console ui
pretty alpha code, but it works and gives an idea of the direction the ui might go
2011-01-26 22:18:18 +01:00
b30499c6ac Fix #1484: trying to access the screen object when not using interactive mode 2011-01-16 15:59:29 -08:00
8c12c47d3e Add "none" as a log level to support quieting the logging messages. Refs #1470. 2011-01-02 16:06:28 +00:00
356808b02c Fix #1470. 2011-01-02 16:03:00 +00:00
1f800bf49a On a 64bit platform with old plugins, the deprecation code was unable to find out which was the caller module. This might also happen on other platforms although I was unable to reproduce it on x86. Anyway, handle it cleanly. 2011-01-01 18:33:41 +00:00
d1b4523733 Let log files be a little bigger, 50Mb is not that much anyway. 2010-12-28 01:58:38 +00:00
c00391a852 Merge branch 'master' into plugins-namespace 2010-12-28 01:45:50 +00:00
5841521133 Added missing import.
Removed log message that caused error. It was never logged anyway, even on the master branch before the improved logging branch was created.
2010-12-28 01:26:25 +00:00
7e2411289d Merge branch 'master' into plugins-namespace
Conflicts:
	ChangeLog
2010-12-13 12:37:37 +00:00
2fa8ca6753 Merge branch 'master' into improved-logging
Conflicts:
	ChangeLog
	deluge/plugins/autoadd/autoadd/gtkui.py
	deluge/ui/client.py
2010-12-13 12:31:20 +00:00
1c15df8e00 Merge branch 'master' of deluge-torrent.org:deluge 2010-12-12 17:50:13 +00:00
f282487806 fix bug #1355 2010-12-12 00:03:04 +00:00
078ed6ba71 Fixed "PluginEnabledEvent" and "PluginDisabledEvent" the argument cannot be called name since that should contain the event name.
Ported plugins on deluge's git to this new event dispatching style.
2010-12-11 05:42:45 +00:00
67ea05921c Implemented passing a copy of an event instead of it's arguments to event handlers. Necessary changes to the event handlers on deluge's code were made, plugins still need to be ported to this new style. 2010-12-11 05:11:18 +00:00
0f36a65aaf Update ChangeLog with the backwards incompatible notice. 2010-12-10 05:49:38 +00:00
90d23ce582 Revert e52018bfcd. Simply fail. It's documented on the ChangeLog. 2010-12-10 05:42:19 +00:00
860457ff48 Update ChangeLog. 2010-12-10 05:01:31 +00:00
e52018bfcd Dont make code that still uses the old "TorrentAddedEvent" fail, instead log a warning and make it work. 2010-12-10 04:59:05 +00:00
9bd11ab204 Update ChangeLog. 2010-12-10 04:35:41 +00:00
c164013725 Ported Feeder(although not working on current deluge), Notifications, Scheduler, Stats, Toggle and WebUi to the deluge.plugins namespace. 2010-12-10 04:31:51 +00:00
b9a8bf2409 Ported the Label plugin to the deluge.plugins namespace. 2010-12-10 04:09:25 +00:00
4c3d068f0c Improve create_plugin.py and the generated create_dev_link.sh. 2010-12-10 04:08:36 +00:00
c9e4d286c3 Ported the FreeSpace plugin to the deluge.plugins namespace. 2010-12-10 03:29:36 +00:00
e43146a4ac Simplify some code on create_plugin.py. 2010-12-10 03:25:39 +00:00
1c2eb0c737 Improve and port the create_plugin.py script to generate the plugins under the "deluge.plugins" namespace.
Any plugin not using the "deluge.plugins" namespace will get a `DeprecationWarning` printed on the console.
2010-12-10 03:15:36 +00:00
b0d77a4f20 Ported the Extractor plugin to the plugins namespace. 2010-12-10 00:35:51 +00:00
20635773b3 Ported "Blocklist", "Example" and "Execute" to the "deluge.plugins" namespace. 2010-12-09 23:11:20 +00:00
f17634ea63 Drop pkutil and simply use pkg_resources. 2010-12-09 22:18:59 +00:00
16f617d240 Initial commit to implement the "deluge.plugins" namespace package support. 2010-12-09 22:05:34 +00:00
1c7676bfe5 Finish last commit, forgot to revert some of the files. 2010-12-09 18:12:25 +00:00
63fa5bf85b Reuse existing "TorrentAddedEvent" instead of creating a new one. 2010-12-09 18:08:34 +00:00
6cefb49f28 Diferentiate adding an already managed torrent from adding a new, unmanaged torrent, to the session. 2010-12-08 19:33:05 +00:00
eeed72a977 Fix tweak_logging_levels(). 2010-12-07 14:21:45 +00:00
49e10ea0cf Fix bug introduced in previous commit. 2010-12-06 12:34:57 +00:00
26e45dcbc8 Make use of logging.handlers.WatchedFileHandler if deluge is running on python 2.6. 2010-12-06 11:59:37 +00:00
b7bc1fdb1d configmanager needs to be imported at a latter stage at least for the gtk frontend. 2010-12-06 11:45:17 +00:00
3b00a7de59 Swhiched the old style logging, ie, a single logger for all logging output to several loggers. This brings the ability to tweak the logging levels for each of the loggers, ie, we can have the "deluge" logger be at the ERROR level while having "deluge.core" at the DEBUG level, meaning we will only see log message for all of the deluge loggers above the ERROR level while still having all messages above the DEBUG level for the "deluge.core" logger and it's children. This kind of tweak can be achieved by adding a file named "logging.conf" to deluge's config dir and this is explained on the deluge.log.tweak_logging_levels function.
Passing `-r` to the cli's while also passing `-l` will make the logfile rotate when reaching 5Mb in size. Three backups will be kept at all times.
All deluge's code is now using this new style logging along with the git hosted plugins. For other plugins not hosted by deluge, which still imports `LOG` as the logger, a deprecation warning will be shown explaining the required changes needed to use the new style logging. New plugins created by the `create_plugin` script will use the new logging facilities.
2010-12-06 11:20:22 +00:00
14ec9464aa fix a bug that can occur when upgrading 1.1 config files 2010-12-01 10:21:26 +00:00
3d64f0d8da Fix #1283 Consistent icons and add localization to file priorities
Signed-off-by: John Garland <johnnybg+deluge@gmail.com>
2010-11-11 14:01:58 +11:00
87e3a5f515 rebuild the compressed javascript 2010-11-01 09:14:23 +00:00
75e9ff57de update the build file to include the spinnerfieldfix file 2010-11-01 09:13:37 +00:00
b180d2a900 remove the convert conf script that won't actually work anymore 2010-10-31 14:35:00 +00:00
1822c2bde9 fix a silly bug 2010-10-31 10:13:33 +00:00
40e6777c48 Merge branch 'master' of deluge-torrent.org:deluge 2010-10-31 09:18:26 +00:00
f88b24d507 apply 41ffee5 to master 2010-10-31 09:18:09 +00:00
593452ed63 update bbfreeze script 2010-10-29 10:11:40 +01:00
4197e129fe change location of httpdownloader as a temporary fix 2010-10-25 00:13:09 +01:00
0360cbe0b8 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
d2f41fe7e5 apply patch from #1377 2010-10-24 13:30:40 +01:00
0a2e9a5324 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
3c302088f6 fix the path to the loading gif (not that its actually used) 2010-10-23 21:24:06 +01:00
3b6bad2f13 fix up the tracker icon tests 2010-10-22 19:47:38 +01:00
6fd4b298f3 fix up the core tests that were erroring 2010-10-22 19:42:07 +01:00
2beec764c9 move tests back inside the deluge package, makes it easier to run trial on them 2010-10-22 16:36:52 +01:00
e5760ee341 Fix uncaught exception when quitting 2010-10-23 01:12:21 +11:00
45940b9064 Fix #1373 use of cyrllic paths 2010-10-16 12:56:00 -07:00
c97f809bdc Fix #1349 force a theme style with expander-size = 15 to show entries in the sidebar properly. 2010-10-15 19:32:13 -07:00
ae6837c88c create the toolbar with the rest of the UI 2010-10-14 13:54:26 +01:00
a827cf6c7a Keep a torrent paused after a forced recheck if it was paused to start. 2010-10-10 12:36:25 -07:00
f52e3c4aa0 add a check to ensure that the events loop doesn't continue indefinitely 2010-10-10 19:52:08 +01:00
8f7e307f33 wrap client.disconnect() call with a check to see if its classic mode 2010-10-07 00:14:21 +01:00
f1f6f137c3 Make sure config value strings are utf8 encoded (fixes #1369) 2010-10-03 18:33:57 +11:00
ff7ff8eac7 Move decode_string/utf8_encoded to common 2010-10-03 18:12:42 +11:00
4cb2bcae25 Fix sidebar not updating (#1365) 2010-10-02 23:55:51 +10:00
df95222849 Use better attribute / method names in blocklist 2010-09-26 11:39:17 +10:00
463fd3ac04 Fix attribute error in blocklist plugin 2010-09-26 11:30:58 +10:00
eb37c91866 Set locale to the user's default settings in the gtkui 2010-09-20 02:43:07 +10:00
7cd210a59b include missing theme images 2010-09-18 00:47:47 +10:00
eee27868a8 include the .order files 2010-09-16 12:16:07 +01:00
e5dec3f020 add all the other scripts to package_data 2010-09-16 08:52:16 +01:00
def1127c78 More clean-up of setup.py 2010-09-14 11:29:47 -07:00
847f2c2ebd Remove the custom 'install' class and include_package_data 2010-09-14 10:56:42 -07:00
fb49aa02a8 Fix preference page index when removing a preference page 2010-09-13 18:21:31 -07:00
f8dc66b773 Fix bugs with unicode torrents in AutoAdd plugin. 2010-09-13 02:23:10 -04:00
c17b466bae Fix bug in AutoAdd plugin where watchdirs would not display in gtkui when first enabled. 2010-09-13 02:23:09 -04:00
d9cdff9525 Increase max piece size to 8 MiB in create torrent dialog (closes #1358) 2010-09-13 08:50:29 +10:00
915db80a55 Fix VersionSplit behavior when comparing to a dev version. 2010-09-11 16:27:29 -04:00
350d4d7260 Add rpc to check if authorized to call a rpc: daemon.authorized_call() 2010-09-04 12:31:27 -07:00
4b92912577 AutoAdd plugin can now recover when one of the watchfolders has an unhandled exception. 2010-09-03 22:34:28 -04:00
a794223d96 Fix "adjustment with non-zero page size" deprication warning in autoadd plugin. 2010-09-03 22:34:27 -04:00
5811d372f9 Fix up some docstrings 2010-09-03 17:21:56 -07:00
0b2f2f2c8a Add TorrentFileCompleted event. 2010-09-03 17:11:37 -07:00
64022d7bc7 Add 'Owner' filter 2010-09-03 15:15:29 -07:00
bf715d90fd Save 'owner' and 'public' to the torrent state 2010-09-03 15:15:02 -07:00
fdbd9e6687 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:28:16 -07:00
0a0383d075 Use a temp filename with add_torrent_url 2010-08-31 00:04:56 +10:00
5b1bed5a48 Update get_free_space test 2010-08-30 23:49:49 +10:00
7ed33192ec Ensure preferencesmanager only changes intended libtorrent session settings. 2010-08-26 01:31:53 -04:00
c82ba44be8 Fix scheduler so that it keeps current state, even after global settings change. 2010-08-26 01:22:14 -04:00
729daf331c Ignore global stop ratio related settings in logic, so per torrent ones are used. 2010-08-24 23:16:33 -04:00
db1835d942 Merge branch 'newscheduler' 2010-08-24 00:57:15 -04:00
7d4a316733 Add max active downloading and seeding options to scheduler. 2010-08-24 00:30:54 -04:00
da8629db97 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.
2010-08-24 01:38:05 +01:00
df573c66c6 Merge branch 'master' of deluge-torrent.org:deluge 2010-08-23 17:35:42 -07:00
29f61b58fb Fix key error after enabling a plugin that introduces a new status key 2010-08-23 17:34:30 -07:00
15ce2b71f9 Moved xdg import so it is not called on Windows, where it is unused. fixes #1343 2010-08-22 15:39:12 -04:00
116ccc21fd AutoAdd plugin changes
adds queue to top option
adds ability to append extension instead of deleting torrent once added
2010-08-22 00:31:41 -04:00
dee33745c8 Merge branch 'master' into multiuser 2010-08-21 13:00:47 -07:00
8586cda4e0 Fix unhandled exception when adding a torrent to the session 2010-08-21 12:53:44 -07:00
db9b5580d7 Fix issue where the save_timer is cancelled when it's not active 2010-08-21 12:53:21 -07:00
10aebd600a Add 'Owner' and 'Public' fields to the details tab 2010-08-21 12:42:01 -07:00
f0fe3c7879 Add 'Owner' and 'Public' columns to the TorrentView 2010-08-21 12:28:26 -07:00
33fd852bda Add 'public' torrent option to allow making a torrent publically viewable by other users 2010-08-21 12:25:05 -07:00
65c9dc5fa8 Add new torrent status key 'owner' for keeping track of who added the torrent to the session 2010-08-21 12:15:41 -07:00
7e2eea46d3 Fix man deluged not showing '-u' on its own line 2010-08-20 01:15:27 +10:00
01773e433f Fix #1341 issue where Config would try to cancel the save_timer when it is None. 2010-08-18 12:33:09 -07:00
ca5eaf4270 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:15:53 -07:00
7d64f057c7 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:15:16 -07:00
48d016e97d 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:06:10 -07:00
e9ce506d1c fix the script resource on windows 2010-08-14 17:38:30 +01:00
e0eb0bd06a add the apple iOS bookmark icons from #1339 2010-08-14 16:16:10 +01:00
9f992ec40d fix the system.listMethods json call when running in classic mode 2010-08-14 16:05:40 +01:00
ce8ef4f95b Add test suite for SessionProxy 2010-08-10 09:57:00 -07:00
4d0560eff2 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:28:16 -07:00
d49cde1994 use the get_libtorrent.sh script to get libtorrent if it is missing 2010-07-22 21:13:26 +01:00
16a1173f1d change default version to 0.15 2010-07-22 18:18:15 +01:00
333d2f5562 add libtorrent fetch script 2010-07-22 18:17:51 +01:00
c7fe1bdef5 remove the libtorrent submodule 2010-07-22 18:05:46 +01:00
46a967fb8c a couple of fixes to stop the webui crashing when running within the gtkui 2010-07-18 23:11:02 +01:00
ca22e84858 Alternate tooltip when toggling session 2010-07-18 01:17:33 +10:00
20bd962e6a Add Toggle plugin 2010-07-18 00:56:56 +10:00
22a1448372 Only use an icon if it passes some sanity checks 2010-07-17 17:11:19 +10:00
722a5cd9e1 Use a blank icon when the tracker icon downloaded isn't a proper image 2010-07-15 19:17:17 -07:00
efecf38bcd Attempt to create a move_storage destination path if it doesn't exist 2010-07-15 10:51:06 -07:00
dfb75d67b9 Do not attempt to move a torrents storage if the destination path does
not exist
2010-07-12 14:45:13 -07:00
961d405921 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:02 -07:00
e025b6b9db Fix hang when quitting in classic mode 2010-07-08 16:23:12 -07:00
bc5aa1bf71 Add logging the user when a torrent is added or removed 2010-07-05 21:08:15 -07:00
3cd30ea96a Use torrent state name instead of number if available 2010-07-02 18:09:21 -07:00
504751424f Use basestring instead of str and unicode 2010-07-02 15:19:42 +10:00
37a00a48a7 Fix uncaught exception when closing deluge in classic mode 2010-07-02 02:45:47 +10:00
2a2f5d90ae Fix typo 2010-07-02 02:43:32 +10:00
f0920f5638 more improvements to the shift select 2010-07-01 14:21:37 +01:00
43fb998651 fix select 'upwards' 2010-07-01 14:08:21 +01:00
148fcdbe37 allow for shift selecting in tree grids 2010-07-01 13:45:23 +01:00
de79bba540 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:24:27 -07:00
d5881142aa Always look for -mt boost libraries first 2010-06-18 09:50:58 -07:00
494c468da8 fix typo 2010-06-12 22:47:59 +01:00
672668ccdb change bits to bytes, thanks to charles 2010-06-11 15:59:33 +01:00
538aed9147 Fix typo in label plugin - thanks konti 2010-06-11 00:49:42 +10:00
d800273891 Handle os.remove failing on windows 2010-06-08 03:19:30 +10:00
94f96c5165 Python independent version of previous commit 2010-06-08 01:55:48 +10:00
4b1d60c727 Fix console ui not liking paths with backslashes on windows (#1293) 2010-06-08 01:25:21 +10:00
cfe547b31a Print a more informative error message if the torrent file doesn't exist 2010-06-08 01:22:19 +10:00
f6195f775f Fix execute plugin only executing last event (#1306) 2010-06-08 00:17:22 +10:00
87879ab3b8 Only encode if necessary 2010-06-07 20:12:31 +10:00
81a837faed Fix unicode support in console ui (#1307) 2010-06-07 20:11:11 +10:00
c06f905702 Add some debug logging statements 2010-06-04 18:05:21 +01:00
f6f9e0234a Fix an error in the key 2010-06-04 17:37:53 +01:00
e1e1472a8f Fix saving the correct event name 2010-06-04 16:37:37 +01:00
b7e1fe1696 Save the execute config after adding/removing/saving commands 2010-06-04 16:31:51 +01:00
0314d0440f Fix typo in execute plugin 2010-05-20 00:04:43 +10:00
3226b1819d Fix man deluged not showing '-d' on its own line 2010-05-16 22:32:12 +10:00
4b8a85763c Fix remote save path dialog not disappearing after creating a torrent 2010-05-16 18:10:13 +10:00
ae4f2c3bb0 Fix only being able to click "remote path" once when creating a torrent 2010-05-16 18:08:33 +10:00
bc28b83062 Fix deluged crashing on windows when logfile's directory doesn't exist 2010-05-16 13:11:18 +10:00
2603c36e7d Revert "Fix trac wiki turning CamelCase words into broken links"
This reverts commit 81b56cce62.
2010-05-11 23:47:06 +10:00
81b56cce62 Fix trac wiki turning CamelCase words into broken links 2010-05-11 23:23:39 +10:00
649a2b6f8e Update email address and copyright 2010-05-11 03:51:45 +10:00
4caf81ef89 Fix new release check pref 2010-05-09 22:45:28 -07:00
65c33a37a1 Fix the naming of the some of the config set methods 2010-05-09 22:36:31 -07:00
eff17931eb Fix preferences manager not setting initial settings on start-up 2010-05-09 22:32:14 -07:00
b33c2abf82 Fix label plugin not remembering newly created labels 2010-05-09 17:50:39 +10:00
ba514f0b0e Remove unused code from label plugin 2010-05-09 17:39:45 +10:00
7f60867ae9 Update docstrings to use names from previous commit 2010-05-09 17:05:22 +10:00
71d8836118 Use better names for TrackerIcons' args 2010-05-09 17:01:15 +10:00
97d6f8ce80 Return the noIcon for empty strings as well 2010-05-09 16:43:22 +10:00
ca7f009e74 Raise IconsError instead of IndexError (fixes infinite looping) 2010-05-09 16:31:32 +10:00
f08e5176c3 Do not request a tracker icon if the host is "" 2010-05-08 20:06:15 -07:00
70161a54fa Simplify PreferencesManager by simply looking for the _on_get_<config key> method instead of registering a set function for each 2010-05-08 20:04:55 -07:00
a945d0a78d Use previously defined host variable instead of getting the tracker host from the TreeModel 2010-05-08 20:02:58 -07:00
245b799ccf 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:01:46 -07:00
0dc6c3ecfd Return 0 in get_free_space if the download_location is invalid 2010-05-08 20:00:41 -07:00
98f000cc70 rebuild deluge-all and ext-extensions 2010-05-08 16:18:48 +01:00
8d4daff068 update the build files for deluge-all and ext-extensions 2010-05-08 16:18:48 +01:00
79d68a5b9b fix the null comparison 2010-05-08 16:18:48 +01:00
412d0ee4f9 set the baseCls for the add label form panel to x-plain 2010-05-08 16:18:47 +01:00
e8788bde08 Make host_to_url support redirection and add another test 2010-05-08 16:25:16 +10:00
815a71fe8b Try favicon.ico if there's a HTMLParseError 2010-05-08 15:50:04 +10:00
fce16ba51f Fix relative redirecting in blocklist plugin 2010-05-06 23:27:04 +10:00
50cfd9c9b1 Update tests 2010-05-06 23:06:53 +10:00
369b03bffb Update version 2010-05-05 14:46:27 -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
93670b05bc Only overwrite blocklist.cache if the import was successful 2008-12-18 02:38:34 +00:00
3f46136362 lt sync 3060 2008-12-18 02:13:08 +00:00
fcc975006a Automatically attempt to get localclient auth when setting core uri to localhost 2008-12-18 02:03:41 +00:00
69e2154004 Make preferences tabs translatable 2008-12-17 01:01:49 +00:00
1b8efd5d10 Rename Statistics tab to Status 2008-12-17 00:38:15 +00:00
3dce47d1f0 Don't include LICENSE or readme.txt in package data 2008-12-17 00:11:00 +00:00
d4445adf20 Fix importing system libtorrent 2008-12-16 04:32:03 +00:00
24a0ccee0a make test active port use internal graphic instead of launching browser 2008-12-16 02:49:06 +00:00
f136d41b62 fix alignment 2008-12-15 17:39:13 +00:00
19b7369786 Continue starting Deluge if the gettext/locale initialization doesn't
work.. It will now just print an Error message.
2008-12-14 17:53:42 +00:00
43e28ec9d5 Add some more details about UI choice 2008-12-14 16:54:51 +00:00
1d16e05f55 remove no longer needed hackery 2008-12-13 01:22:09 +00:00
f482d747e0 Fix installing with --root 2008-12-12 04:23:47 +00:00
d1aaad28e7 association dir update 2008-12-11 23:52:12 +00:00
227115551d Fix detecting localhost connection 2008-12-11 23:22:54 +00:00
fc25852e7b debian packaging fix 2008-12-11 17:34:29 +00:00
d544f73569 Remove Null since we now have Console 2008-12-11 10:06:14 +00:00
6f7231f0ca Strip out new lines when reading auth file 2008-12-11 10:04:25 +00:00
18f9165ba6 Fix closing the add trackers window by clicking Cancel 2008-12-11 10:03:43 +00:00
34678f1076 Ignore blank lines in auth file 2008-12-11 09:56:22 +00:00
c0bf133ab8 Add an error check when reading the auth file 2008-12-11 09:31:37 +00:00
c32eddfc48 Fix starting with new config folder 2008-12-11 09:20:32 +00:00
2b34f64304 Move get_localhost_auth_uri() to ui.common 2008-12-11 09:13:14 +00:00
7171df62eb Fix console daemon connect 2008-12-11 09:07:56 +00:00
c2c93f00de Fix display of icons in connectionmanager 2008-12-11 08:46:31 +00:00
484fe772c1 Do the egg_install in setup 2008-12-11 07:40:05 +00:00
baa7cc7a41 Fix WebUI connecting to localhost 2008-12-11 06:18:48 +00:00
66476d7ea0 Fix installing scripts 2008-12-11 05:40:06 +00:00
6cd1df0f13 revert root=/ 2008-12-11 03:54:18 +00:00
06354aa8cb Use distutils.install instead of setuptools 2008-12-11 03:52:12 +00:00
466ac404ec add --root=/ 2008-12-11 03:25:10 +00:00
ba813a8913 fix toolbar style in win32 2008-12-11 01:42:16 +00:00
2d25a09bfe lt sync 4382 2008-12-10 23:30:59 +00:00
55e694e80b Change libtorrent import behaviour to first try importing deluge.libtorrent and then libtorrent. It will now also raise an ImportError if libtorrent version is not 0.14. 2008-12-10 23:30:09 +00:00
831ac110a8 Change display of hosts and catch protocolerrors when testing hosts status 2008-12-10 22:28:11 +00:00
19196b1363 Fix classic mode 2008-12-10 22:15:09 +00:00
b91b750024 Just use a different filename for new hostlist config instead of trying to detect the old one 2008-12-10 22:03:35 +00:00
7a970305cd Add another missing define 2008-12-10 12:38:53 +00:00
33dfbca91c Another fix 2008-12-10 12:29:28 +00:00
feeb1469fa Fix check for old version 2008-12-10 12:24:45 +00:00
8bd49aef7a Add additional check for old config file 2008-12-10 12:17:25 +00:00
097664e890 Fix some minor bugs in ConnectionManager 2008-12-10 10:24:15 +00:00
33663a9d5d Strip new lines when loading auth file 2008-12-10 10:19:19 +00:00
da177ff4e4 Do not require a daemon restart to use updated auth file 2008-12-10 10:04:32 +00:00
85cef723c3 Fix file removal 2008-12-10 10:00:21 +00:00
37c3b4334c Add basic authentication -- your connectionmanager config will be cleared and this will likely break other UIs 2008-12-10 07:56:40 +00:00
cc7a685397 lang sync 2008-12-10 03:16:52 +00:00
7ad1699fa1 point default blocklist to our server and up interval to 4 days 2008-12-10 02:34:32 +00:00
ec4051de34 icons only in toolbar 2008-12-10 01:07:14 +00:00
b077d5075a Fix ratio calc 2008-12-09 11:14:11 +00:00
b142a1eaf9 Do not apply the set-function for 'show_rate_in_title' on startup 2008-12-09 11:04:05 +00:00
34cd3c1e35 Make filtertreeview view options more immediate 2008-12-09 08:27:43 +00:00
c1f977a2d1 Fix division by zero error in get_ratio 2008-12-09 08:22:20 +00:00
26c607ff66 Update the ChangeLog 2008-12-09 05:50:12 +00:00
7065df205b Fix #624 do not allow changing file priorities when using compact allocation 2008-12-09 05:40:56 +00:00
be0c891dd8 Fix up showing speeds in titlebar and make it an option 2008-12-09 05:27:01 +00:00
513c783045 transfer rates in title 2008-12-09 05:00:48 +00:00
7f59873f8a fix #547 add description to name field per HIG entry 2.1.1.1 2008-12-09 04:10:46 +00:00
10cf1043ff fix #571 notification-daemon-xfce dependency circle 2008-12-09 03:57:36 +00:00
e3bac06af0 pots updates 2008-12-09 03:42:18 +00:00
ae07d8c2d0 partial fix to #640. more work needed 2008-12-09 03:28:30 +00:00
44223592b0 Fix #646 when calculating share ratio use the 'total_done' value if 'all_time_download' is 0 2008-12-09 02:55:20 +00:00
56fb8f6225 not all use DD/MM/YY, so use locale's date format 2008-12-09 02:34:08 +00:00
819ab070b4 Add support for a basic auth transport and handler in rpcserver 2008-12-09 02:12:37 +00:00
ab56257b49 Fix typo in get_eta() stop_seed_ratio should be stop_ratio 2008-12-08 13:09:46 +00:00
24ad257fdd Fix tracker icons config dir 2008-12-08 07:38:17 +00:00
253b8a857f Fix drag n' dropping in the files tab 2008-12-07 12:42:09 +00:00
983c07f869 s/tango/16/g 2008-12-06 22:22:16 +00:00
4c7b2f85a6 ajax: oxygen-theme for popups 2008-12-06 22:07:30 +00:00
650d4d06a2 move ajax-ui to oxygen icon set 2008-12-06 21:52:56 +00:00
d4006bed50 switch to oxygen icons (1.1) 2008-12-06 20:47:41 +00:00
6676347a1b lang sync 2008-12-06 04:56:35 +00:00
8b48b3a00a add installer theme 2008-12-06 04:00:36 +00:00
8503e2cec8 Fix #636 not setting the daemon's config directory when using --config=
with the UI in classic mode.
2008-12-05 21:59:40 +00:00
0ffc306d83 Fix tracker_icons to use the correct config directory, not the default
one
2008-12-05 21:49:54 +00:00
307099a874 .error class set to 400 px 2008-12-05 17:15:51 +00:00
2f8c10b7ba focus on pwd field;patch from #365 by dasnyderx 2008-12-05 17:11:07 +00:00
92574feeb4 add get_config_values method to core to allow for multiple config values to be retrieved 2008-12-03 22:46:56 +00:00
7b243759f3 Remove unnecessary libtorrent files 2008-12-02 20:39:18 +00:00
121d638d03 Fix shutting deluged down when using Python 2.6 2008-12-02 04:48:57 +00:00
aebc019d12 add installer file and association reg 2008-12-02 03:51:35 +00:00
c905945513 Clean up win32/ 2008-12-02 03:01:10 +00:00
6fdd660883 remove iterator method put in by mistake 2008-12-02 00:14:23 +00:00
443fef1d95 add a basic interface to the glob module for use by a javascript file picker widget 2008-12-01 23:13:19 +00:00
57d3517ef2 Fix issue in setup.py where it would try to compile mapped_storage.cpp
or memdebug.cpp
2008-12-01 16:28:12 +00:00
245533b8e0 add win build requirements 2008-12-01 06:39:31 +00:00
ddaae2c28b Do not build memdebug.cpp 2008-12-01 01:43:19 +00:00
67c6758ecf lt sync 3006 2008-12-01 01:13:28 +00:00
d5f2a4d25f Log socket or xmlrpc errors that cause the ui to disconnect from the
core
2008-11-30 21:18:11 +00:00
90637921ee Add license info for blocklist icons
Fix up copyright notice in debugerror.py
2008-11-30 20:02:11 +00:00
baead73df0 Fix up some licence stuff 2008-11-30 19:25:45 +00:00
5d82cf8f87 Better libtorrent check in setup 2008-11-30 01:11:26 +00:00
ad4e276a39 Fix renaming folders when there is no trailing slash 2008-11-30 00:53:46 +00:00
4d65f237b1 lt sync 2996 2008-11-30 00:24:13 +00:00
ba148a30b1 fix icon in new release dialog for windows 2008-11-29 23:28:11 +00:00
495182832d Fix the files listed in the files tab when renaming files, removing them
and then re-adding them to the same session
2008-11-29 23:17:50 +00:00
a55901c87a lt sync 2995 - add port number of host field in http requests 2008-11-29 23:05:03 +00:00
403d71fdbb lt sync 2994 2008-11-29 21:53:57 +00:00
d7a76b3b5a Fix #619 return "" instead of "Infinity" if seconds == 0 in ftime 2008-11-29 21:35:44 +00:00
34671971be Clean-up gettext code and make it more portable 2008-11-29 21:21:05 +00:00
6bd1682728 Fix building on FreeBSD
Add some more metadata
2008-11-29 20:48:37 +00:00
bb8c41ad03 Change how gettext is initialized to be more simple 2008-11-29 20:44:53 +00:00
269c4ec70c Fix typo 2008-11-29 20:25:11 +00:00
32db5e2c5d Do not have signalmanager/receiver connections linger by setting the
SO_LINGER sockopt.
2008-11-29 19:07:28 +00:00
03c6e5ef9b Change xpm icon size to 32x32 2008-11-29 18:11:21 +00:00
5e8cf840e2 Add blurb about icon copyright 2008-11-29 17:53:04 +00:00
13c8108ce8 Fix man page 2008-11-29 17:25:00 +00:00
17eeae8bfa Add 'deluge.xpm' 2008-11-29 17:24:02 +00:00
cb77d16812 Minor optimization in ftime 2008-11-29 05:48:11 +00:00
95bf260518 Improve ftime() to format dates higher than 11 weeks. 2008-11-29 05:10:34 +00:00
0d429837b6 Fix gtk warnings 2008-11-29 03:31:04 +00:00
d59a59dadc Break out proxy preferences to include peer, web_seed, tracker and dht. 2008-11-29 03:16:43 +00:00
79684c3b11 Fix bug in systemtray when changing some config options when the
systemtray is not enabled.
2008-11-29 03:15:27 +00:00
6b22fb236e Have setup.py obey prefix when installing data files.
Add manpages to data files.
2008-11-29 02:12:09 +00:00
ae8f987bc0 Build translations in the build folder 2008-11-29 01:22:29 +00:00
256c5c71b8 Add copyright headers 2008-11-28 23:53:05 +00:00
5f4a2533ec Include the tracker host in tracker status string 2008-11-28 23:39:46 +00:00
4933618f50 Fix #47 the state and config files are no longer invalidated when there
is no diskspace
2008-11-28 23:36:18 +00:00
1440d6b247 Fix #531 set default log level to ERROR and add 2 command-line options,
"-L, --loglevel" and "-q, --quiet".
2008-11-28 23:28:06 +00:00
e759d61266 Fix #602 re-did files/peers tab state saving/loading 2008-11-28 21:31:50 +00:00
d64f8c3d93 Force a show event in the pop-up menu so that on first click the menu is
shown properly.
2008-11-28 20:24:03 +00:00
5ad2c87b77 Flip the traffic icon 2008-11-28 19:43:54 +00:00
578c451e9a Fix up some headers 2008-11-28 19:11:26 +00:00
a73928c231 Fix filtertreeview behaviour when stopping to clear the treestore 2008-11-28 19:09:04 +00:00
da120c744d Remove OpenSSL exception from headers 2008-11-28 17:54:17 +00:00
936cd9811d lang sync 2008-11-28 06:10:20 +00:00
ead53f3c88 fix remove dialog for multiple torrents 2008-11-28 01:14:29 +00:00
767a35c381 reorder protocol traffic 2008-11-27 19:34:00 +00:00
1e126995dc Minor tweak 2008-11-27 07:16:19 +00:00
2024c0cfb0 Decorate dialogs 2008-11-27 07:09:14 +00:00
05609bda61 Fix get_config 2008-11-27 06:40:21 +00:00
c6d67b824a Fix bug in preferences when opening to the plugins page 2008-11-27 05:19:29 +00:00
ccbf75d5b9 Fix last 2008-11-27 05:19:02 +00:00
3dc8ba3d6f Fix loading labels 2008-11-27 05:12:27 +00:00
0954c3f112 Re-do the 'set maximum' dialogs.. They are now decorated. 2008-11-27 04:24:30 +00:00
013e9d95f1 Fix bug in system tray menu when enabling system tray when connected to
a core
2008-11-27 04:17:11 +00:00
1515636ef3 Improve the remove torrent dialog 2008-11-27 02:48:56 +00:00
b4b7c50f6b lt sync 2987 2008-11-26 09:14:19 +00:00
c6422b53df Rework the Remove Torrent Dialog and change client.remove_torrent() to
only having the option of removing data, not torrent file.  Deleting the 
torrent file was deleting the torrent file in the Copy Torrentfile 
folder and this is not desirable.
2008-11-26 09:11:18 +00:00
e11b7adeff Fix ajax template package data 2008-11-26 07:32:27 +00:00
afd3178358 Fix missing comma 2008-11-26 07:24:29 +00:00
2969ff51f9 Add -P, --pidfile option to deluged 2008-11-26 07:01:19 +00:00
b141d91965 Remove install class 2008-11-26 06:50:39 +00:00
435dfa31a2 use new manpages in debian packaging 2008-11-25 23:44:48 +00:00
55c5a5d175 Add manpages 2008-11-25 23:21:22 +00:00
66ae89122d Fallback to using DNS for geoip lookups if the database file is not
available
2008-11-25 22:43:31 +00:00
4eedc1b23e Include a 'clean_plugins' command and make sure it's run with 'clean' 2008-11-25 22:21:14 +00:00
3afc5bfb19 smaller default size for newforms floats and ints(2) 2008-11-25 20:09:54 +00:00
ab8362432b smaller default size for newforms floats and ints 2008-11-25 19:56:46 +00:00
35ebf57060 get_stats+overhead 2008-11-25 19:28:25 +00:00
03e3ccc3a5 lisencing 2008-11-25 17:58:52 +00:00
207005e355 webui label options 2008-11-23 09:30:48 +00:00
08f2d5b412 Keep track of selected filter path and if necessary, select row when
expanding a filter
2008-11-23 08:56:46 +00:00
f252ca1775 Expand all filters on start 2008-11-23 08:43:07 +00:00
9bbc0fd8ea Enable expanding/collapsing filters 2008-11-23 08:04:03 +00:00
2b6b1a9ee7 Create a 'build_plugins' command and clean-up setup.py 2008-11-23 05:57:35 +00:00
c6ddaeaac7 Remove OpenSSL exception from license headers 2008-11-23 04:58:01 +00:00
67a3279840 rate_limit_ip_overhead 2008-11-22 11:27:27 +00:00
3dbd3a3fd3 Add an option to not include IP overhead in rate limiting (setting False
is equivalent to how 0.5.x behaves)
2008-11-22 09:00:01 +00:00
4bfd5646ad lt sync 2969 2008-11-22 01:00:58 +00:00
16934c8f6a Update flag icon license 2008-11-21 12:00:53 +00:00
92c0b92f29 Include GeoIP license 2008-11-21 11:46:05 +00:00
9e174166b8 Fix up the Label plugin's GTK dialogs to be more consistent 2008-11-21 10:11:36 +00:00
dc63d26cfe Add protocol traffic statusbar item 2008-11-21 09:35:29 +00:00
f5ad01a865 Add 'get_session_status' to core 2008-11-21 09:15:05 +00:00
c028b861f8 Fix bug in calculating the ETA for seeding torrents with a stop seed
ratio set
2008-11-21 07:49:15 +00:00
0459202653 fix license, again 2008-11-20 19:56:33 +00:00
97c6846486 fix license, again 2008-11-20 19:54:39 +00:00
4d29f19a2b fix license 2008-11-20 19:18:05 +00:00
7c8d8a22c2 fix executable flag 2008-11-20 18:02:19 +00:00
b9a7c87a2d fix torrent actions 2008-11-19 18:56:12 +00:00
52c6cce6b3 fix gtk labels 2008-11-17 19:52:02 +00:00
06c4f7af69 Fix setting default stop_at_ratio settings for torrents 2008-11-17 09:30:46 +00:00
e52efde4db lt sync 2946 2008-11-17 09:04:33 +00:00
c429d56170 Prevent wrongly encoded torrents from causing an xmlrpc exception thus causing
a blank torrent list
2008-11-17 08:28:32 +00:00
c4e4647f4b Do not set per-torrent stop_seed_ratio settings based on the global settings
when adding torrents
2008-11-17 06:37:56 +00:00
a0bf6d8fe1 Remove trailing whitspace from *.py 2008-11-17 00:57:32 +00:00
7813bd4098 Fix #475 catch unicode decoding errors 2008-11-16 08:29:31 +00:00
4933445d86 remove broken choose files 2008-11-15 10:19:29 +00:00
1725ab7569 Show plugin information in the preferences page 2008-11-13 22:39:57 +00:00
fb3e51d3e9 design the options tab of the add torrent window 2008-11-13 22:38:38 +00:00
af85f56b98 fix bug in adding torrent from file 2008-11-13 22:14:14 +00:00
06231c1799 2931 assert fix 2008-11-13 01:46:29 +00:00
c99736f207 allow multiple commands for deluge -u console -a ... 2008-11-12 18:17:14 +00:00
2ed7b5b747 lt sync 2926 2008-11-12 03:58:03 +00:00
5150d38f9c two new languages 2008-11-12 03:56:36 +00:00
81427006dd label plugin:InputSensitivity 2008-11-11 19:35:03 +00:00
8a4da5b712 update the style a little more, still requires a couple more fixes javascript side 2008-11-11 17:18:53 +00:00
fb1a62a9f8 add styling of the file input hack 2008-11-11 16:32:01 +00:00
bc3a7bd057 fix reloading the add from file iframe 2008-11-11 15:44:10 +00:00
374335cae8 slight improvement to the add torrent from file 2008-11-11 15:40:05 +00:00
d919a452dd implement the server side part of ajax add from file
implement the client side javascript (file input still needs themeing)
2008-11-11 11:14:02 +00:00
5eb92ab9b7 tie up the contents of the iframe with some javascript 2008-11-10 18:37:21 +00:00
b49a4c66d8 add the beginnings of add torrent by file 2008-11-10 18:27:16 +00:00
3b32edeed1 style the add from url window a little more 2008-11-10 18:07:50 +00:00
8398fa91f5 couple of bug fixes, add some strings to be passed through gettext in
the rendered html
2008-11-10 18:00:21 +00:00
480673c1d1 mooui compressed using the yuicompressor 2008-11-10 17:04:25 +00:00
f2c4660ded fix popup menus 2008-11-10 12:23:05 +00:00
a027010073 add a check to see if the ui is initialized before running an update 2008-11-10 12:19:50 +00:00
f2dc542aba add a stub page /json/upload
couple of fixes in mooui
couple of fixes in deluge-details
2008-11-10 12:05:21 +00:00
53f3e89640 lang sync 2008-11-08 22:56:11 +00:00
94c28f55ae update pots 2008-11-08 20:34:21 +00:00
695e6a8c6e Fix alignment of tracker icons when tracker does not have an icon 2008-11-08 15:49:32 +00:00
757f55f38e router:use_module 2008-11-08 14:31:29 +00:00
a183e665b0 empty options page 2008-11-08 14:16:54 +00:00
db283d9a14 i need to write my own url router someday.. 2008-11-08 14:13:49 +00:00
cb4320151d update mootools core to 1.2.1 2008-11-08 13:39:20 +00:00
1dfdcdf1f3 add a bit more documentation to it 2008-11-08 11:09:54 +00:00
83875bf7f2 fix template namespaces 2008-11-08 10:44:03 +00:00
05a982fd4b webui label config rework 2008-11-08 10:09:15 +00:00
944be0876b debugerror is even less serious 2008-11-08 08:22:28 +00:00
73dd64f8db Fix #528 make sure gtkui config file is written before exiting 2008-11-08 08:04:46 +00:00
b75fc32982 Fix some gtk warnings 2008-11-08 08:02:33 +00:00
b148d5497b Implement #478 display UI options in usage help 2008-11-08 07:26:52 +00:00
10fdd76e3d Rename 'null2' to 'console' 2008-11-08 07:20:49 +00:00
3f3092cd8a Fix json get_webui_config 2008-11-08 06:28:41 +00:00
f945a6f597 Increase the per-torrent stop share ratio max to 99999.0 and make the
spinner and remove at ratio checkbox insensitive if stop at ratio not 
checked
2008-11-08 06:17:42 +00:00
2e640b4cae Fix some typos 2008-11-08 06:15:51 +00:00
d25ad68521 Have the TorrentInfo object raise an exception if unable to open/bdecode
the torrent file
Catch the exception in AddTorrentDialog
2008-11-08 06:15:03 +00:00
35671b3f8e Update doc html 2008-11-08 06:13:40 +00:00
ca3cbf920c Fix typo 2008-11-07 06:52:15 +00:00
e7a353c251 Another config fix 2008-11-07 06:51:14 +00:00
35e41e3b17 Fix addtorrentdialog due to config class changes 2008-11-07 06:49:00 +00:00
e0137b6a4c Remove pythonize call -- it's not needed 2008-11-07 06:42:19 +00:00
3f86e440bd label js 2008-11-06 20:44:12 +00:00
cf1720b2b6 fix webui config dialog 2008-11-06 19:25:37 +00:00
39c289cbe6 fix oops 2008-11-06 19:18:10 +00:00
a311bcbcec config fixes 2008-11-06 19:12:11 +00:00
41dbab69b2 normalise the header comments 2008-11-06 07:59:38 +00:00
1920f3ce72 Fix up doc strings in deluge.common and generate documentation html for
it
2008-11-06 07:55:38 +00:00
277b75e66b add some missing semi-colons 2008-11-06 07:52:39 +00:00
5b96fd1d49 Fix doc tests 2008-11-06 05:42:15 +00:00
f4e81e1429 Fix typos 2008-11-06 00:32:46 +00:00
1ed82d6542 changelog 2008-11-05 22:42:10 +00:00
09c5236a4b javascript auto-refresh 2008-11-05 21:16:15 +00:00
21d707fa92 disale js plugins for now 2008-11-05 20:05:21 +00:00
d48076dd6f fix gettext 2008-11-05 20:01:25 +00:00
cc366e9369 Re-write the Config class 2008-11-05 12:35:02 +00:00
89ae872394 Initial support for sphinx documentation. Still need to create rst
files for the modules.
To build docs, goto docs/ folder and type `sphinx-build source html`
2008-11-05 03:14:45 +00:00
f2b057bd30 webui https 2008-11-04 19:15:56 +00:00
b3cda61961 Fix #577 adding torrents by drag n' drop in windows 2008-11-02 23:22:55 +00:00
be70707149 move deluge-strings.js to gettext.js 2008-11-02 22:30:39 +00:00
dae6252496 lt sync 2896 2008-11-02 21:49:06 +00:00
f4d7080492 Move fdate() to common, patch from Lajnold 2008-11-02 18:13:11 +00:00
3ecf6a187e Update Changelog 2008-11-02 04:53:43 +00:00
8e77ab4569 Update Changelog 2008-11-02 04:45:18 +00:00
e5cbca13dc Fix #229 add 'date added' column, with patch from Lajnold 2008-11-02 04:41:55 +00:00
a2a3bd2148 Fix Interface page of Preferences 2008-11-01 07:13:19 +00:00
6d3acf6dca add udp to is_url to allow udp trackers 2008-11-01 03:30:20 +00:00
72aaef6191 gettext again 2008-10-31 17:17:06 +00:00
41c121b729 update gettext and strings. 2008-10-31 17:04:30 +00:00
cb45b5c41f add gettext.js 2008-10-31 16:47:10 +00:00
2b75a75992 Don't invalidate the torrent status/info after a torrent.status() call 2008-10-31 03:45:28 +00:00
c66120ac95 use 1.36 on windows 2008-10-30 22:53:26 +00:00
9ae1a9b6e0 Fix building in windows 2008-10-30 20:56:10 +00:00
61985777da lt sync 2881 2008-10-30 17:23:36 +00:00
85e065c29d change a few names and add better documentation 2008-10-30 14:07:43 +00:00
93f083bde4 fix typo 2008-10-30 13:15:51 +00:00
0bdbc69f51 update the documentation in the mootools json-rpc proxy 2008-10-30 13:14:27 +00:00
47f2ebc37c update the copyright to include my email address 2008-10-30 13:10:25 +00:00
c1be1f3072 lt 2879-storage cleanup and truncating files that are larger than they should be 2008-10-30 06:38:25 +00:00
da6594d138 update label plugin javascript test case
alias _ to Deluge.Strings.get
2008-10-29 21:16:09 +00:00
86ce5d104a label plugin mooui-test1 2008-10-29 19:47:40 +00:00
150bbd51cd lt 2876 - support for UPnP routers that don't provide a urlbase 2008-10-29 02:42:45 +00:00
c2cbeda738 disable test-popup 2008-10-28 22:25:07 +00:00
adf56b023e Update bindings 2008-10-28 22:20:46 +00:00
d4dec67fc4 plugin-javascript 2008-10-28 22:20:38 +00:00
1945674c0a 2873 upnp fix 2008-10-28 21:37:33 +00:00
228ad4a500 update translator credits 2008-10-28 03:18:57 +00:00
6fe2602d79 Update the icons to be more rad 2008-10-28 03:04:33 +00:00
0589411224 Fix #570 use utf-8 encoding in statistics_tab.py 2008-10-27 23:31:09 +00:00
1349f313db update list of files for pot 2008-10-27 23:19:42 +00:00
3ac1dbee73 lang sync 2008-10-27 17:20:24 +00:00
ef7e000b70 lt sync 2868 2008-10-27 06:06:51 +00:00
a6802b455a Fix #570 Use utf-8 encoding in listview 2008-10-27 05:43:34 +00:00
eb9578c41d Attempt to get tracker icon from html source
Use blank icon for trackers that do not have a favicon available (to 
make things aligned)
Force 16x16 for tracker icons
2008-10-27 04:49:06 +00:00
ac9959a92b Convert plugins setup.py to new format
Update create_plugin script to use new setup.py format
2008-10-27 03:53:21 +00:00
edaf3da0fc Add 'get_plugin_info()' to PluginManagerBase -- returns a metadata info
dictionary
2008-10-27 03:31:11 +00:00
1c7ce61635 Update blocklist plugin setup.py to include more metadata and re-do
setup.py layout
2008-10-27 01:55:47 +00:00
1c121a8c17 move tracker_icons 2008-10-27 00:26:39 +00:00
0f94cf2316 allow favicon.png 2008-10-27 00:26:01 +00:00
0b09c6563c move mooui and mootools to /static 2008-10-26 23:40:32 +00:00
ee0cc92658 fix typo's/formatting 2008-10-26 22:12:12 +00:00
44a219fb3a add (disabled) notification config 2008-10-26 21:50:25 +00:00
2d257371d9 Add ability to send arguments to UIs with -a, --args 2008-10-26 21:31:13 +00:00
26eb2bbb3d proxy config 2008-10-26 21:17:48 +00:00
6aae2acbe5 Have torrent.get_ratio return -1 when downloaded bytes is 0.
Have torrentview and statistics_tab display an infinity character when 
ratio is -1
2008-10-26 21:10:03 +00:00
190b180255 keyword search enhancements 2008-10-25 07:04:22 +00:00
352427ca20 keyword search includes trcker status 2008-10-24 21:05:14 +00:00
03d1177085 gtk:allow icons for labels 2008-10-24 18:20:58 +00:00
56a3a03a59 move tracker icon cache folder 2008-10-24 18:16:12 +00:00
29c32c0b6a use the main tracker icon url 2008-10-24 13:42:43 +00:00
8fe301a3d9 change the icon for the "All" state 2008-10-24 13:34:53 +00:00
951c13f1ce Better fix for #565 2008-10-24 07:43:34 +00:00
dc0a2ce52e Fix #565 wait for the deluged process to start to prevent defunct
processes
2008-10-24 07:39:14 +00:00
1aa33421e9 redirects according to http spec 2008-10-23 18:41:07 +00:00
0896856908 1st argument for -u web is the base dir 2008-10-23 18:11:35 +00:00
cb19d71b7d Fix #545 use proper values in ratio calculation 2008-10-23 16:52:09 +00:00
bdbed9f893 fix test 2008-10-23 15:45:30 +00:00
1f0a6eb75e Add TorrentInfo class and use it in AddTorrentDialog 2008-10-23 14:41:51 +00:00
5af5749065 Allow the creation of .torrent files with no trackers 2008-10-23 13:47:20 +00:00
dbcf1e622a Fix adding torrent to session 2008-10-23 13:35:17 +00:00
a2b2ce2ca5 Fix saving files in create torrent dialog, also set a default filename
when saving
2008-10-23 13:23:26 +00:00
ecb80ea689 Fix creating torrent with file size less than smallest piece size 2008-10-23 13:22:40 +00:00
b83ef477e4 Fix and clean-up os checking functions 2008-10-23 11:27:37 +00:00
759bb8cc5d Fix locale stuff on OS X 2008-10-23 08:21:25 +00:00
ff6906997b Windows build system fixes 2008-10-23 08:13:08 +00:00
718c789c8e Handle OS X better in the build system - patch from hydri 2008-10-23 08:05:02 +00:00
16cc7be912 add darwin check to common 2008-10-23 07:22:08 +00:00
310d1e4e6e move torrent-add-dialog to interface tab 2008-10-22 20:47:35 +00:00
984c4f8203 webui : use TrackerIcons class 2008-10-22 16:08:53 +00:00
aadb6edec1 <image to <img 2008-10-22 15:39:13 +00:00
f051f050a9 move get_torrent_info into a new ui common module 2008-10-22 15:07:51 +00:00
e09a8f79a8 fix problem that sometimes occured when switching back and forth between daemons without disconnecting first 2008-10-22 08:54:26 +00:00
d4bbece86e use cache for async tracker images 2008-10-21 18:57:13 +00:00
7359ddb879 fetch tracker icons in thread 2008-10-21 18:36:53 +00:00
723715ec98 use the included json library when running on python 2.6 2008-10-21 16:19:11 +00:00
fbe62805c3 Some optimizations to the torrentview updating 2008-10-21 10:52:37 +00:00
058c66bfa8 Clean-up torrentview.update_view() code. 2008-10-21 10:23:42 +00:00
cb8125aa1b gtk tracker icons, some eye-candy 2008-10-20 18:57:38 +00:00
09fe2e696b Touch-up the stats tab 2008-10-19 10:24:46 +00:00
a8d132452a Fix open folder 2008-10-19 10:10:09 +00:00
56f1bff6d4 Use libtorrent smart_ban extension 2008-10-19 06:02:35 +00:00
9fc18f0e41 Fix the alert_type magic to work when libtorrent is not in the deluge
module
2008-10-19 05:43:58 +00:00
79209daf94 lt sync 2836 2008-10-18 23:57:39 +00:00
3405450256 ly sync 2832 2008-10-18 21:22:44 +00:00
a495738177 title for start/stop icon 2008-10-18 15:53:12 +00:00
976189a814 styles 2008-10-18 15:06:08 +00:00
f3382591ec fix highlighting;#514 2008-10-18 14:32:07 +00:00
8a86094abf webui new state=all icon 2008-10-18 14:20:30 +00:00
83360789d5 Add new 'All' icon 2008-10-18 07:56:19 +00:00
7caf26779f Fix #549 make sidebar width persistent 2008-10-18 06:43:38 +00:00
219be3f440 account for ipv6 brackets [ip:ip:ip]:port 2008-10-18 04:48:38 +00:00
37618e4a13 Fix up add peer dialog to be more consistent 2008-10-18 04:22:29 +00:00
a7068af238 Fix connection manager 'add host' due to common changes 2008-10-18 04:15:55 +00:00
da2499faa6 Fix adding peers 2008-10-18 04:10:34 +00:00
a36938729b Fix #552 wrong gentoo svn folder for grabbing revision 2008-10-18 03:57:26 +00:00
251b1733ce add port mention to add peer glade and fix poort oops in ip validation 2008-10-18 03:53:54 +00:00
fd1dfedfba Update changelog 2008-10-18 02:31:26 +00:00
cd671e58bd Add drag n' drop support to the files tab 2008-10-18 02:28:00 +00:00
7c8168fcd2 up changelog 2008-10-18 01:55:38 +00:00
9113744c40 add 'add peer' and create gtkui common 2008-10-18 01:53:13 +00:00
9472cab9bb Folder renaming support 2008-10-18 00:29:00 +00:00
8d2a658789 little cleaning 2008-10-17 21:36:03 +00:00
d12019cbc4 lt sync 2824 - fix segfault when passing None to torrent_info() 2008-10-17 19:38:33 +00:00
41bedda10a Updates for rename_folder 2008-10-17 18:22:18 +00:00
a555fecc18 lt sync 2823 2008-10-17 17:54:07 +00:00
86d1624cff Deluge will now use a system libtorrent library if available. 2008-10-17 17:52:12 +00:00
646901d8da lang sync 2008-10-17 03:02:17 +00:00
ecfbb3ceed fix opera 2008-10-16 17:38:46 +00:00
793e138d11 Add folder_rename to the core 2008-10-15 23:59:07 +00:00
0365ae00c0 Fix IP filter 2008-10-15 23:57:03 +00:00
170e430b8c lt sync 2803 2008-10-15 20:55:20 +00:00
e0a380fb0e webui:images for file-prio 2008-10-15 19:54:14 +00:00
aa66b8624e sync classic template to white 2008-10-15 19:23:57 +00:00
db736c9075 Use "127.0.0.1" instead of "localhost" when starting the SignalReceiver 2008-10-15 19:19:12 +00:00
56c496dc5d Change to use 'all_time_upload' and 'all_time_download' due to change
in recent libtorrent revision
2008-10-15 18:49:51 +00:00
fd4e548938 lt sync 2802 2008-10-15 18:45:35 +00:00
f1a81d9863 fix #546 2008-10-14 22:04:51 +00:00
88ac0cba11 show_keyword_search pref 2008-10-14 21:44:03 +00:00
7b3f6a31f6 Only update the specific row's filename instead of requesting a whole
new files list when the file_renamed signal is received.
2008-10-14 21:31:25 +00:00
4e720b9364 no label, ui fixes 2008-10-14 21:21:58 +00:00
8c676a950e id_to_label 2008-10-14 21:03:20 +00:00
531cf70911 favicon for tracker_host 2008-10-14 20:46:29 +00:00
d7aed2778d webui:sidebar config for trackers and hide_zero 2008-10-14 20:37:06 +00:00
cba021a19e label-plugin:fix unload 2008-10-14 20:04:23 +00:00
4e79fe3f7d Fix file renaming for files that are not within a folder 2008-10-14 19:09:50 +00:00
f8ad5ddb37 Changing filenames of files within a folder will keep the file in the folder. 2008-10-14 18:56:09 +00:00
70a58e969f lt sync 2796 2008-10-14 16:13:23 +00:00
b5b6bb6e1e update todo 2008-10-14 11:20:06 +00:00
49b9494bbe run the tab labels through Deluge.Strings 2008-10-14 09:20:59 +00:00
d98734b745 move some more css into the base 2008-10-14 09:17:50 +00:00
88b58bdce9 add a test shell script
add labels to be used by the legend
2008-10-14 09:02:09 +00:00
c6f6a110bc rename button to Add
reflect changes in the javascript behind
2008-10-14 01:26:58 +00:00
5ed4d601e8 just copy the style from the classic theme 2008-10-14 01:25:28 +00:00
ccce1938ac add transparency to the tab to simulate greying out when a torrent isn't
selected
2008-10-14 01:10:17 +00:00
a0eafb1518 restore defaults to the options tab 2008-10-14 01:06:59 +00:00
c6ed7e297b almost fixes the bug where if you apply a filter, whichever torrent was
selected before continues to be displayed in the tabs
2008-10-14 00:59:08 +00:00
d20628baff better spacing for the filter icons 2008-10-14 00:42:33 +00:00
3cb046c34c only set the background-image once 2008-10-14 00:37:51 +00:00
f5482d6a92 add dynamic tracker host icons 2008-10-14 00:31:59 +00:00
08fd7a14f9 Prevent the updating of row that is being edited 2008-10-14 00:11:35 +00:00
ed0c7f1b9f update icons with relative paths 2008-10-13 23:54:30 +00:00
7e5e858dad migrate all icons into the base css file, themes can override if need be 2008-10-13 23:51:14 +00:00
f5b3be82f5 Add active icon 2008-10-13 23:44:57 +00:00
794a5b01bb add active icon to the filter list 2008-10-13 22:47:33 +00:00
7085725be5 add missing glade file 2008-10-13 19:18:13 +00:00
02161ea6ef revert back to aclient and add force_call 2008-10-13 18:36:47 +00:00
a5c58fb8dd use the sclient, the aclient appears to be broken 2008-10-13 18:19:21 +00:00
9fb0494b2f remove unneeded braces 2008-10-13 18:05:14 +00:00
bd56957c27 remove this.info which remained from when the statusbar was at the top 2008-10-13 18:03:54 +00:00
2a09752fd9 make the event handlers on the statusbar generic, and add some doc
comments
2008-10-13 17:58:17 +00:00
5e29fabf1e more semicolons and fixes 2008-10-12 20:57:03 +00:00
13a2927762 fix a bug introduced by a name case change 2008-10-12 20:50:13 +00:00
c2140339a5 add a load of semicolons to the end of lines 2008-10-12 20:46:04 +00:00
20a6a302e6 add a progress bar to the statistics tab 2008-10-12 19:06:17 +00:00
a34d74d790 change show_zero default to False 2008-10-11 09:39:13 +00:00
81193d3d87 change sidebar_show_trackers default to false 2008-10-11 09:32:12 +00:00
fa05f1222c use deluge16.png for state=all 2008-10-11 09:22:59 +00:00
d65efb3f7a use deluge16 for state=all 2008-10-11 09:16:52 +00:00
c48932bab8 use temporary 'active' image, andar:please commit the final one 2008-10-11 09:07:24 +00:00
7b52f7fa97 rename hide_zero* to show_zero* because double negatives are not intuitive 2008-10-11 08:56:13 +00:00
9a8f8ce2f9 sidebar-gtk:show/hide zero_hits+trackers 2008-10-11 08:44:45 +00:00
5ebbff177f filter: hide_zero_hits;hide_cat : core+test 2008-10-11 08:04:02 +00:00
7564248431 use multithreaded ssl on windows 2008-10-11 07:30:18 +00:00
296c7fea82 sidebar: select default-item on hide and none-selected 2008-10-11 06:01:19 +00:00
19b58b2098 use theme for sidebar colors 2008-10-11 05:15:35 +00:00
20cfb836ff Sidebar translations+order 2008-10-11 04:49:47 +00:00
6b6eb9381b lang sync 2008-10-11 04:45:42 +00:00
f4ea3ee036 remove size from the returned dict as it's not used and causes
tracebacks
2008-10-10 08:19:35 +00:00
0ae879daf8 lt sync 2781 2008-10-10 05:00:40 +00:00
abfad5f19d improve the add torrent window 2008-10-10 02:09:05 +00:00
846d61516b another method for adding torrents from the ajax ui, not functional yet
though
2008-10-10 02:08:47 +00:00
df680926ac add a couple of extra methods to be used by the ajax ui when adding
torrents
2008-10-10 00:29:47 +00:00
0037922d9e make the add torrent window able to add from url again 2008-10-09 10:35:11 +00:00
5b06ecd52e Properly line wrap tracker messages 2008-10-09 07:26:48 +00:00
f4ff7ec3a6 Change max connections default setting to 200 2008-10-09 03:41:06 +00:00
f7a56b95ba begin testing gears, redesigning the add torrent window 2008-10-08 17:46:04 +00:00
c8901d31c5 Fix freezing on start-up issues on systems that do not have a properly
configured localhost entry.
2008-10-08 13:32:02 +00:00
2428cb4970 add a titlebar to the window 2008-10-08 13:22:10 +00:00
51730b2c55 replace the favicon on all templates with a png vs a gif fixing the jagged edges issue 2008-10-08 13:07:38 +00:00
c172a36ca2 complete the statusbar popup menus for changing max_* (download, upload, connections) 2008-10-08 12:55:55 +00:00
dd29746084 Prevent being able to set file priorities for compactly allocated
torrents as it is not intended to work.
2008-10-08 12:42:59 +00:00
ebe53dd634 add missing html files 2008-10-08 12:41:40 +00:00
93832f62e9 lt sync 2776 2008-10-08 12:40:46 +00:00
58d56f461c change the popup menu to go above the mouse if there is not enough
space below
2008-10-08 12:37:35 +00:00
2e6dd5b945 fix attribute error caused by attributes/functions without
_rpcserver_export
2008-10-08 11:57:55 +00:00
641c27a90a add popup menus, need some changes in mooui so they display correctly 2008-10-08 02:24:59 +00:00
2574e05ad4 show the max_* (download, upload, num_connections) in the status bar 2008-10-08 02:09:29 +00:00
5421ea77a6 initial create torrent window design 2008-10-07 21:08:54 +00:00
6447dbbea5 add simple background flipped 2008-10-07 20:35:04 +00:00
a5de65657c fix url 2008-10-07 19:55:18 +00:00
c2c84fd0fa increase the width of the toolbar in the css
migrate the window title of the add window to Deluge.Strings
add code to popup a window for torrent create
2008-10-07 19:54:11 +00:00
fb8a4d8b89 add a icon for creating a torrent 2008-10-07 19:46:16 +00:00
85ea737b0d Changed max half-open connections default limit to 8 on XP/2000 and 4 on
Vista
2008-10-07 08:54:19 +00:00
ee7edca06f Add new RPCServer class .. Not in use yet. 2008-10-07 02:23:20 +00:00
1004b8091f Set max connections per second default to 20 since this seems to fix
the slow speed issue that some people experience.
2008-10-06 10:58:28 +00:00
399304b8d4 rename the graph plugin to the stats plugin 2008-10-05 16:04:11 +00:00
90ccd65ea9 save stats,session totals 2008-10-04 21:39:33 +00:00
fafc2a4b76 fixed input line bug lines were not wrapped correctly 2008-10-04 20:02:00 +00:00
ff52254924 sanitize filter_dict input 2008-10-04 10:20:08 +00:00
6cd0ab30a5 merge the stats from status into the stats dict (allows additional stats
to be added more easily)
2008-10-04 10:10:49 +00:00
41d955a5ea fix logout 2008-10-04 09:59:41 +00:00
7c0e2fb813 remove pycha 2008-10-04 09:47:59 +00:00
d1fba0c3b0 dht graph 2008-10-04 09:42:40 +00:00
e075f46d6a improve the graph code 2008-10-03 13:49:45 +00:00
9b47465052 Make some toolbuttons translatable 2008-10-02 18:42:31 +00:00
3b29956346 pycha-tests 2008-10-02 00:56:35 +00:00
4b33809529 pycha:initial prototype with unmodified pycha_line_deluge 2008-10-01 22:40:35 +00:00
4da4b5ac03 pycha test 2008-10-01 22:10:49 +00:00
4f846d6f7c lt sync 2749 2008-10-01 19:11:13 +00:00
c57939baa2 Fix add_torrent_url() to download the torrent file in a thread to
prevent the main thread from blocking and causing the daemon to freeze.
2008-10-01 18:31:55 +00:00
435ef112fb fix the data checking 2008-10-01 08:02:45 +00:00
6db92cccb3 change to a more robust test 2008-10-01 07:50:32 +00:00
6333b32e0b include new mooui that contains some IE fixes 2008-10-01 07:47:10 +00:00
1c21066fec add a check to ensure data was returned and ignore otherwise 2008-10-01 07:28:13 +00:00
2765a97506 Prevent libtorrent from starting the default plugins and features. 2008-10-01 02:19:44 +00:00
c668a59a82 Fix resume saving on shutdown 2008-09-30 23:30:26 +00:00
7ed2d7c87a lt sync 2744 2008-09-30 22:37:50 +00:00
a449610e15 update bindings 2008-09-30 21:38:39 +00:00
26b872dee9 Implement #368 add torrents by infohash/magnet uri (trackerless
torrents)
2008-09-30 19:07:10 +00:00
87f3e1e3b8 Initial support for renaming files
Save .torrent file for torrents added by infohash or magnet uri
2008-09-30 18:45:32 +00:00
1cb4559362 graph plugin; initial commit 2008-09-30 18:05:16 +00:00
92608b436b add spinners in for the required fields in the preferences page 2008-09-30 16:44:57 +00:00
df84e34660 quick update to mooui fixing a recursion error 2008-09-30 16:27:17 +00:00
27d2a86c74 update to compressed version of mooui that includes spinners
use spinners on the options tab
2008-09-30 16:22:52 +00:00
789f4911bc grab the no connections and free space icons from the classic template 2008-09-29 23:16:45 +00:00
a2ba0c556f update the labels style 2008-09-29 23:15:44 +00:00
e250b7aaf4 Fix display of tracker error messages 2008-09-29 23:11:17 +00:00
a7f1704c28 huge update to mooui
continuting change to camelcase
2008-09-29 23:09:44 +00:00
92987a05cd Fix attempting to blink system tray icon when it's not enabled 2008-09-29 22:30:53 +00:00
244a437d1b Change the default max global upload slots to 4 instead of -1 since
libtorrent will automatically open more slots to meet the upload speed 
limit.
2008-09-29 19:12:27 +00:00
3867989dbd add some title strings for the items in the status bar 2008-09-29 12:26:36 +00:00
ccdb270b38 improve the statusbar css and add diskspace and incoming connections to
it
2008-09-29 12:23:49 +00:00
ec1513a2c4 fix error in IE7 2008-09-29 10:15:11 +00:00
a240cca0c6 update the TODO list 2008-09-28 14:37:21 +00:00
9933536892 fix the filtering within the grid
also fixes a torrent remaining if it's the last one removed
2008-09-28 14:34:24 +00:00
8d7e762b0a revert fork for now 2008-09-28 03:15:59 +00:00
20fe87868f copy some css needed to layout the preferences window correctly 2008-09-28 02:22:43 +00:00
7d2b566ec4 add enable auto add checkbox 2008-09-28 00:16:01 +00:00
be12f0e316 fix ajax install 2008-09-27 21:58:15 +00:00
5ba23ad5c2 fork webui to free terminal 2008-09-27 21:52:00 +00:00
a90c709d3b add some documentation 2008-09-27 17:20:05 +00:00
04abf85433 hugely improve the labels bar and disable filtering until i fix the grid 2008-09-27 17:11:02 +00:00
80659e882e update TODO
add an icon for the All states filter
2008-09-27 12:00:58 +00:00
f23d65364b traffic filter 2008-09-27 08:39:27 +00:00
fd544834e4 fix wrong method being called for menu clicks 2008-09-26 18:02:54 +00:00
eea926fadf fix persistent sessions 2008-09-26 17:43:25 +00:00
a038ca8df8 webui statusbar:add space,has_incoming_connections 2008-09-26 16:21:00 +00:00
14c1586d77 remove statusbar api 2008-09-26 15:56:40 +00:00
61b7b17fbb fix get_stats docstring 2008-09-25 20:59:32 +00:00
db6764ea9b statusbar api prototype 2008-09-25 20:56:05 +00:00
dbed97349c lt sync 2726 2008-09-25 20:45:31 +00:00
be27d97952 changelog 2008-09-25 19:21:44 +00:00
19cb72db58 changelog 2008-09-25 19:20:15 +00:00
c67bfe74a7 persistent sessions #486 2008-09-25 19:08:43 +00:00
5457cdcd80 Fix #503 change the boost lib detection logic to first look for -mt
and if not available, fall back to regular boost lib (non-multithreaded)
2008-09-25 03:30:08 +00:00
b47c4ad760 Fix #187 set a 5 second timer to save the config file after a config
value has been changed.
2008-09-25 02:03:58 +00:00
e32ce5b265 added 'all' subcommand to resume and pause, moved share ratio to general info view 2008-09-24 18:53:22 +00:00
a27b0c6329 Add the ability to add plugins from the plugins preference page (from
.eggs)
Add a rescan for plugins button to rescan the plugin folders
2008-09-24 01:23:38 +00:00
af0bd07d3e removed the 'builtin' commands and made 'help' a normal command. 2008-09-23 22:30:21 +00:00
4d79df5880 licence update fir webpy related files 2008-09-23 20:01:22 +00:00
335c50ec03 #483 2008-09-23 19:48:08 +00:00
35ac3dda26 fix webui add url: #483 2008-09-23 19:35:09 +00:00
35aa1aaec2 unregister->deregister fix #488 2008-09-23 19:20:24 +00:00
8a00b046d5 update create_plugin 2008-09-23 18:29:55 +00:00
bb7c5cb4af egg_render for templates files in plugin/templates (#497) 2008-09-23 17:34:57 +00:00
a870101dbe egg_handler for static files in plugin/data (#497) 2008-09-23 06:15:40 +00:00
ffb2de165d Fix #500 add scrolled window to sidebar 2008-09-22 23:17:51 +00:00
704ed1d0a8 fix missing gtk-add 2008-09-22 21:46:11 +00:00
868612413d adding null2 ui alongside the current null ui 2008-09-22 19:07:52 +00:00
71bc34be0d some name changes to camelcase and a few fixes for IE7 2008-09-22 14:07:32 +00:00
52cbd0a435 fixes a bug in IE7 2008-09-22 13:35:36 +00:00
9f3b3b32f2 fix the formatting in the menus file, and convert all displayed text to
use the gettext replacement.
2008-09-22 13:08:39 +00:00
a412547584 move away from the monolithic file approach and split out into smaller
more managable files. begin implementation of a javascript gettext.
this may break some things in the ajax ui.
2008-09-22 12:46:12 +00:00
cf6266e545 remove fsize 2008-09-21 20:09:34 +00:00
0712da0fd0 clean up free space 2008-09-21 19:52:47 +00:00
6465c8eede add free space of default save_path 2008-09-21 19:27:26 +00:00
dc49a43e70 lang updates 2008-09-21 03:06:21 +00:00
9d5be3e631 lt sync 2696 2008-09-21 01:44:11 +00:00
ec180b3735 Fix upgrading from 0.5.x state where torrents would have no trackers 2008-09-21 01:38:43 +00:00
68974ff459 Implement #28 Create Torrent Dialog 2008-09-21 00:33:37 +00:00
aec7f35a71 Add 'get_path_size' core method 2008-09-20 02:27:29 +00:00
f8c9d5f7ca Remove more un-used files 2008-09-20 02:25:55 +00:00
be09642542 Remove file, it is not used 2008-09-20 02:22:49 +00:00
31a157091a Allow adding multiple trackers at once in the edit tracker dialog 2008-09-20 02:08:56 +00:00
42d239c91a lt sync 2690 2008-09-19 22:57:05 +00:00
cb865f1373 Add metafile module for creating torrent files 2008-09-19 21:49:54 +00:00
e64595120e Include GeoIP database for country look-ups 2008-09-19 20:11:50 +00:00
58bca167b3 Change torrent.OPTIONS to a new TorrentOptions object 2008-09-17 00:26:14 +00:00
e48c091764 lt sync 2676 2008-09-16 02:39:03 +00:00
f285f607cd Convert unicode to str before saving to config. This should fix unicode
path issues.
2008-09-15 19:53:07 +00:00
42ca7b97bd Fix fastresume saving on shutdown 2008-09-15 17:06:36 +00:00
587edbb0b0 Fix setting file priorities on folders 2008-09-14 20:49:45 +00:00
fa0d3b9bfc Only show the error when displaying the tracker_error 2008-09-14 20:31:21 +00:00
479e6c3484 Fix move_storage when using unicode path 2008-09-14 20:16:35 +00:00
7786f6ca08 Update changelog 2008-09-14 20:11:32 +00:00
5e41c7ce78 Fix #475 the use of unicode paths when adding torrents 2008-09-14 20:08:19 +00:00
6ecf9125e6 include faq 2008-09-14 19:02:06 +00:00
3217113583 Load ut_metadata extension 2008-09-14 18:32:00 +00:00
fb0f1b9319 force local only 2008-09-13 23:01:53 +00:00
9c2658d833 Fix adding torrents with only 1 file 2008-09-13 22:26:11 +00:00
b9d1367564 allow network mounts in right-click->move torrent 2008-09-13 03:10:52 +00:00
eec5005214 Fix moving on complete 2008-09-13 02:58:45 +00:00
6bcb7fccf5 allow network mounts 2008-09-13 00:31:59 +00:00
9807b43ae7 Remove icon, no longer used 2008-09-12 22:12:26 +00:00
ee9a5a19c1 Added support for adding torrents by infohash
Fixes to magnet uri stuff
2008-09-12 08:47:33 +00:00
3afb542f06 Switch to torrent_handle::save_resume_data which makes resume data
writing async
2008-09-11 09:20:29 +00:00
6bd701e961 Add missing icon 2008-09-09 14:23:20 +00:00
ccb53e48a9 Start work of magnet uri and trackerless torrent support 2008-09-09 14:06:05 +00:00
c906b50d11 Fix add torrent dialog for torrents with only 1 file 2008-09-08 05:42:34 +00:00
ee071dcece Fix building when not using debug build 2008-09-08 05:24:49 +00:00
c78de8f0aa lt sync 2667 2008-09-07 10:44:46 +00:00
b210a81967 Prevent libtorrent from crashing when 'announce' is not in the tracker
url.
2008-09-07 08:46:41 +00:00
4bd88df4de Remove dependency on libtorrent for add torrent dialog 2008-09-07 05:26:03 +00:00
cc128029f9 Update the create torrent dialog a bit 2008-09-07 01:44:45 +00:00
e614c2dc3b Fix last by just always deleting the fastresume file before writing a
new one
2008-09-06 22:24:35 +00:00
deb00e332e fix problem with old fastresume files not being replaced causing loss of data and dont resave fastresume for seed files 2008-09-06 20:11:12 +00:00
2cd39233da update the TODO list 2008-09-04 02:07:43 +00:00
f9dadd215d add the extra fields to bandwidth and network
add the required changes to the css and javascript
2008-09-04 02:05:43 +00:00
5eaf9dd259 refresh to match the gtk client 2008-09-04 01:15:13 +00:00
818b626440 Ensure PreferencesManager is started before other components. 2008-09-01 02:22:08 +00:00
93e6ef144e lt sync 2650 2008-09-01 02:02:04 +00:00
b6d05c01e8 Make a copy of the default options to prevent torrents from sharing
references
2008-09-01 01:55:13 +00:00
89ed0d5d41 add gtk stock clearing script and update glade files 2008-08-31 23:37:02 +00:00
0222272c45 Update Changelog 2008-08-31 22:14:31 +00:00
797578d0cf Add dht icon svg file 2008-08-31 21:06:42 +00:00
0c203b0a96 Fix various issues when not using English 2008-08-31 20:20:16 +00:00
0792ad21cd Fix paused torrents not being paused upon restart 2008-08-31 01:17:43 +00:00
c2a24bce8a Fix tooltips from disappearing 2008-08-31 00:55:07 +00:00
ec368d6c70 Fix typo 2008-08-31 00:03:14 +00:00
ea16f2ca8f Fix a typo 2008-08-30 23:42:39 +00:00
c410f6d242 Fix some typos 2008-08-30 23:40:57 +00:00
3237abacc4 webui: use sclient.get_stats 2008-08-30 23:14:05 +00:00
d6a3c55efa get_stats in core 2008-08-30 22:58:19 +00:00
5d19e72ab4 fix label keyerror 2008-08-30 22:06:49 +00:00
1ef26beeea label-filtering to core-filtering for webui and json 2008-08-30 11:52:41 +00:00
4abaa514fe background-color 2008-08-29 19:11:26 +00:00
aaa5660fa8 docgen 2008-08-29 18:01:44 +00:00
459a64db6d Fix add torrent dialog closing preventing another dialog from being
shown
2008-08-28 20:42:19 +00:00
ed59331c90 Implement #352 set_torrent_options method in core 2008-08-28 04:40:49 +00:00
015350dc04 Fix typo in [3766] 2008-08-28 04:03:39 +00:00
aebd6e2f29 lt sync 2642 2008-08-28 03:56:28 +00:00
b3d5a8a808 Remove test plugin 2008-08-28 01:56:00 +00:00
570b2df000 Have setup use boost-mt libraries if boost libs are not found 2008-08-28 01:53:17 +00:00
8adff80271 lang sync 2008-08-27 01:17:39 +00:00
9e27cb5d15 up version in debs 2008-08-27 01:04:41 +00:00
b07fc8d009 Fix #453 allow showing of text in the toolbar buttons 2008-08-26 23:11:47 +00:00
cb50fb5eb3 Fix setting file priorities on folders 2008-08-26 23:00:12 +00:00
ab4435ee29 Tracker errors now change the tracker status 2008-08-26 22:38:22 +00:00
2d7944cbb7 Fix #455 force recheck on completed torrents causing crash 2008-08-26 21:34:51 +00:00
de5dd796d0 lt sync 2637 2008-08-26 01:03:39 +00:00
dc5e3d9bfa fix label-options 2008-08-25 22:06:34 +00:00
ad7e1cc4bc label-plugin:remove obsolete prefs 2008-08-25 21:49:38 +00:00
df3471085c sidebar_menu 2008-08-25 21:30:00 +00:00
39025191d7 label-plugin:re-enable sidebar popup 2008-08-25 21:28:21 +00:00
3c183906d1 fix multiple-resume, there is no torrent_resumed method in core 2008-08-25 20:02:02 +00:00
9c0f855736 default filter menu, (to be extended by plugins) 2008-08-25 19:48:09 +00:00
8899bec6c3 lt sync 2630 2008-08-25 16:42:22 +00:00
2b8e235e8a Fix sidebar view option to be persistent between sessions 2008-08-25 08:23:31 +00:00
aceab3cd11 translator updates 2008-08-24 10:37:15 +00:00
6a6bedbf67 lang sync 2008-08-24 10:04:28 +00:00
239fcfd533 Fix show/hiding of sidebar 2008-08-24 06:03:22 +00:00
1747bd9894 Prevent selecting filter view category labels 2008-08-24 05:53:56 +00:00
2d26005dcf Prevent notebook from being shrunk by vpane 2008-08-24 05:31:28 +00:00
36118b3d02 Add saving/loading of lt session state 2008-08-24 04:52:14 +00:00
8a39b7dcd5 Add 'PreferencesManager' component.
Clean up core.py a bit.
Fix DHT state saving/loading
2008-08-24 04:36:10 +00:00
550b101747 Fix bug in Blocklist that prevented downloading of new file every X days 2008-08-23 13:00:35 +00:00
0c79d1a10b lt sync 2626 2008-08-23 05:49:39 +00:00
c32af5ac95 Sort filenames alphabetically in add torrent dialog 2008-08-23 03:57:37 +00:00
07eaf8ed36 Sorting # column will place downloaders above seeds 2008-08-22 08:11:15 +00:00
90d310edd4 lang updates 2008-08-22 07:56:33 +00:00
231edf5931 Attempt to upgrade a 0.5.x state file to new format. 2008-08-21 20:43:01 +00:00
57733501d2 remove some filtering logging 2008-08-20 18:08:59 +00:00
90a4b3e1ed lt sync 2613 2008-08-19 07:22:20 +00:00
d8b0fb5885 filter_tree:add label-plugin and init_func 2008-08-18 20:23:27 +00:00
aa4ed4a6c6 core filtering in gtkui;breaks label plugin 2008-08-18 18:41:31 +00:00
eee10dab76 get_filter_tree 2008-08-18 18:05:48 +00:00
1b03c0eff4 Fix #407 possible negative ETA 2008-08-18 00:36:19 +00:00
46fe490ba0 Expand root folder in files tab by default 2008-08-17 23:31:54 +00:00
0918272480 Fix not displaying file list when state changes 2008-08-17 23:24:16 +00:00
0f1f5529ba fix open folder/file in windows 2008-08-17 22:40:59 +00:00
dbdc72913c Fix torrentview sorting to be persistent 2008-08-17 22:26:48 +00:00
d2e5f157fa Fix #415 crash when using 'config-set' with no parameters 2008-08-17 18:06:08 +00:00
8c6a7a86c1 Fix size units to be more accurate 2008-08-17 17:51:31 +00:00
5647f61bab Fix to prevent Deluge from segfaulting when trying to autoadd an
incomplete torrent file
2008-08-17 17:27:56 +00:00
e720994f5f Fix properly shutting Deluge down when system shuts down 2008-08-17 04:51:28 +00:00
477d5c0def Fix not showing new torrents if you don't use the All label first 2008-08-17 04:18:59 +00:00
b1947d508d lang updates 2008-08-17 02:58:45 +00:00
1edc4bfe73 Fix-up the main startup code a bit so that Windows is always logging to
a file and config folders are properly created for the daemon
2008-08-17 00:56:29 +00:00
d3b005f30d registered filters:keyword 2008-08-17 00:12:28 +00:00
143c1661fe lt sync 2607 - fixes upnp 2008-08-17 00:10:56 +00:00
14a6efef2b Fix loading torrents from state when fastresume file is missing 2008-08-16 23:55:45 +00:00
b48c487acb move filtering to filtermanager 2008-08-16 23:07:10 +00:00
862cec9e0a use core filtering for torrentview 2008-08-16 21:54:03 +00:00
5c1ec8dbb3 move client tests 2008-08-16 15:35:37 +00:00
a26beda19b reformat test 2008-08-16 15:29:00 +00:00
4ea2bf9447 disable label plugin for webui 2008-08-16 15:04:12 +00:00
14db4bc999 change get_torrents_status() api for filtering in core 2008-08-16 14:48:43 +00:00
f1427b7dd5 Fix hiding the bottom pane when disabling all the tabs 2008-08-16 05:28:12 +00:00
ad11029780 get_status -> get_dev_torrents_state 2008-08-15 22:00:22 +00:00
080ff5974d basic get_status() 2008-08-15 21:00:28 +00:00
0469d46717 add get_status_keys() 2008-08-15 20:39:32 +00:00
1170a1cf31 remove trailing space 2008-08-15 19:38:14 +00:00
4ab3577172 Add a test script for testing the signalreceiver 2008-08-15 18:36:04 +00:00
00ed73f453 Fix Notification stop icon blinking when window is exposed. 2008-08-15 18:35:29 +00:00
8bebfc918e Improve performance of initial torrent list load 2008-08-15 03:50:25 +00:00
f4302c95ef popup-options sensitivity 2008-08-14 20:08:10 +00:00
ef90516d0c label-popup enhancements, fixes #370 2008-08-14 19:48:22 +00:00
9333291019 Fix Vista slowness fix, by not actually changing the 'uri', but simply
replacing 'localhost' with '127.0.0.1' when creating the xmlrpc object.
2008-08-14 07:03:04 +00:00
19f9e26a4e Fix #362 use libtorrents session pause/resume instead of current
pause_all, resume_all
2008-08-14 06:48:20 +00:00
e21183f125 Add an additional check in the try statement to prevent loading invalid
torrents
2008-08-14 06:46:35 +00:00
a6700ba22c Fix the config value when changing from NoneType to something else 2008-08-14 06:37:20 +00:00
c4d620f0b9 Fix setting None for config value 2008-08-14 05:58:58 +00:00
bc64bed102 add 'edit' tracker to edit trackers dialog 2008-08-14 01:11:54 +00:00
1aa727db3d cleanup previous 2008-08-13 20:10:14 +00:00
173ad0226d move_completed_to 2008-08-13 20:01:18 +00:00
3883386fcc Fix Vista slowness issue 2008-08-13 19:40:41 +00:00
0b2a9a2025 fix 1st popup 2008-08-13 18:46:00 +00:00
fe2b8bf5d4 asio changeset 48031 - cpu spike fix (hopefully) 2008-08-13 02:37:14 +00:00
07f65d8a22 improve the theme changing so it now checks to see if the stylesheet is loaded before refreshing the ui 2008-08-12 12:02:30 +00:00
8d05d4f2c5 add type checking to config values (Closes: #353) 2008-08-12 11:13:41 +00:00
0ed48a6cd8 lt sync 2599 2008-08-12 10:16:00 +00:00
939c9f34a9 lt sync 2598 2008-08-12 08:44:12 +00:00
a997758eb2 lang sync 2008-08-12 08:26:24 +00:00
aa875103b5 lang updates 2008-08-12 08:17:35 +00:00
96d1629857 tidying up the mootools javascript files 2008-08-12 07:55:45 +00:00
c75e2e13a2 merge deluge and deluge.widgets again.
fix a bug where templates were adding to the select box each time the preferences page was opened
2008-08-12 02:12:02 +00:00
99dd60ca84 fixed css error, increased the delay before refreshing the ui to give the stylesheet more time to load 2008-08-11 23:38:38 +00:00
fd004a1d07 fix the changing of the theme on the fly 2008-08-11 23:31:03 +00:00
7f4b433e49 add a simple loading screen that hides the UI until the theme is loaded 2008-08-11 22:27:06 +00:00
5a3e1d06d2 fix preferences order 2008-08-11 20:56:55 +00:00
d89d4f7e38 fix the type setting 2008-08-10 22:32:07 +00:00
8e45e77c74 fix typo of a method name 2008-08-10 22:28:35 +00:00
5a6fda0afe add some checking to ensure the correct type is being sent back so the config isn't broken. 2008-08-10 22:25:38 +00:00
7ddee092e0 new mooui with a "beforeShow" event in the window class
make use of this new event in the preferences window to get the values before the window is shown
2008-08-10 21:32:27 +00:00
75936dd1ab add a hacky change to the config dictionary to allow the generic preferences class to be used. 2008-08-10 21:17:00 +00:00
af1f2205bb Add per-torrent move on completed settings 2008-08-10 02:53:56 +00:00
886939d64d gpl fix 2008-08-09 12:57:19 +00:00
3928180cc9 bash fix 2008-08-09 12:49:02 +00:00
6dbbb254e2 minor fixes 2008-08-09 08:12:22 +00:00
faeddbdf46 more gpl3 switches 2008-08-09 00:04:27 +00:00
60479e9fef create plugin script 2008-08-08 23:56:07 +00:00
6fa31d1dc0 change copyright notices to gpl3 2008-08-08 05:59:07 +00:00
a2605b4717 lang sync 2008-08-08 05:19:55 +00:00
8e80b4121b Fix homepage link in about dialog 2008-08-07 00:37:48 +00:00
b56e4bc74e initially hide sidebar categories 2008-08-06 19:08:02 +00:00
5ba3ab43ca visually improve download prefs2 2008-08-06 18:41:15 +00:00
e4d2df4327 visually improve download prefs 2008-08-06 17:55:59 +00:00
b4ee52cbdd auto label on add 2008-08-06 15:39:02 +00:00
cba7b00f70 Add ability to register handlers for signals emitted in the core. 2008-08-05 23:32:12 +00:00
7ade350a3a allow changing of global core options 2008-08-05 21:30:17 +00:00
c902bca4cd select-all button 2008-08-05 21:17:53 +00:00
e1a7adeae5 fix auto-add 2008-08-05 20:32:42 +00:00
b20add89e4 auto-add on tracker 2008-08-05 20:11:00 +00:00
4c2ecbd29d manage None sound path 2008-08-05 02:47:47 +00:00
a22f2117bc Fix move storage dialog when connected to a remote daemon 2008-08-05 01:17:56 +00:00
9fedc86172 lt sync 2588 2008-08-04 23:32:18 +00:00
25309fc007 glade tweaks 2008-08-04 18:50:34 +00:00
389e42b970 show/hide prefs for sidebar-categories 2008-08-04 18:05:15 +00:00
f94a264bb4 sidebar:add-menu on label node 2008-08-03 22:18:40 +00:00
6133903608 sidebar: show/hide root nodes 2008-08-03 22:02:06 +00:00
53f6909b6e Fix drag n' drop in windows 2008-08-03 20:12:35 +00:00
520dab70d0 remove ajax_demo from setup 2008-08-03 20:08:50 +00:00
8f5e46a4ea more label options 2008-08-03 20:05:57 +00:00
684b9f965e tweak alphabetical order 2008-08-03 07:17:28 +00:00
5d9ff4b28a remove ajax_demo template 2008-08-02 10:20:32 +00:00
2c2717b90e add translators to credits 2008-08-02 07:19:25 +00:00
228286a3c7 fix libtorrent portion of license 2008-08-02 06:18:10 +00:00
1e2ea13e4a fix typo 2008-08-02 06:07:43 +00:00
b2b3be3887 update control to gpl3 and copyright info 2008-08-02 06:04:53 +00:00
46fc6a6f77 revert last 2008-08-02 05:55:09 +00:00
c49855eec2 add json to dependency list 2008-08-02 05:51:26 +00:00
42e05a0cd8 lang sync 2008-08-02 05:44:28 +00:00
dafd336cf7 fix unload of lable plugin 2008-08-02 05:10:36 +00:00
5f03ea785c Fix queue order shuffling on restart 2008-08-02 04:31:30 +00:00
1bfe866638 Fix blocklist when no file is downloaded 2008-08-02 04:20:11 +00:00
189e01f424 Save resume data periodically 2008-08-02 03:12:15 +00:00
1c94623569 Minor ui tweaks regarding selectable labels 2008-08-01 08:21:51 +00:00
d76c6b991e label options ui 2008-07-31 21:02:53 +00:00
d6928f7520 Fix the need to call TorrentView.create_model_filter() after adding a
new column.
2008-07-31 10:09:02 +00:00
b5a31f67f2 lt sync 2584 2008-07-31 09:43:54 +00:00
3736fbf8eb update sound tooltip 2008-07-31 02:51:21 +00:00
d9b17ec2af small change to get the current theme and set it in the select box 2008-07-30 21:19:16 +00:00
7dc16ec20b move gtk-label config to sidebar 2008-07-30 19:35:43 +00:00
9a00d4db39 Add progress to the peers tab 2008-07-30 14:15:00 +00:00
221c0c31a4 lt sync 2583 2008-07-30 09:55:58 +00:00
e1cc2d9e62 Fix outgoing ports preferences 2008-07-30 09:55:27 +00:00
5706b80cb2 Implement #296 ability to change peer TOS byte 2008-07-30 06:52:20 +00:00
af98a45606 Add tooltip to Classic Mode preference 2008-07-30 05:45:34 +00:00
efb4462d37 Implement #79 ability to change outgoing port range 2008-07-30 05:37:17 +00:00
e93e1391a4 Add setting outgoing_ports in libtorrent 2008-07-30 05:29:57 +00:00
dd4fc26877 Improve Blocklist preferences page 2008-07-29 08:00:50 +00:00
48ab9d7522 Fix shutdown() to accept any number of arguments 2008-07-29 05:47:49 +00:00
971c7e6f1d Fix deluged running with ssh X forwarding by removing the Gnome lib
import
2008-07-29 04:22:03 +00:00
886f0f0495 rename to deluge.ico 2008-07-29 03:39:20 +00:00
8c57d2dc37 add ico file so we can make '.torrent' files use our icon instead of python's in windows 2008-07-29 03:35:54 +00:00
3ec61a1d3f Double-clicking on host in ConnectionManager now will connect to that
host
2008-07-28 23:38:24 +00:00
85e8a29ef3 sidebar:hide tab headers if there is only 1 tab 2008-07-28 18:58:00 +00:00
7cd83f8d05 remove default-sidebar, make plug-in-able 2008-07-28 18:22:44 +00:00
7128b129d4 Fix signalreceiver when switching between daemons 2008-07-28 12:02:01 +00:00
8597110e02 add rc4 to release 2008-07-28 07:33:18 +00:00
9f69cccd02 got pygame working on windows, so we no longer need this windows check 2008-07-27 03:52:07 +00:00
6195627caf oops, add missing file 2008-07-27 02:53:28 +00:00
cf42970943 finish up notification - now fully works including email 2008-07-27 02:23:41 +00:00
2ca1a61f32 more notification work - still not finished 2008-07-26 22:03:15 +00:00
9d13a82d0b Touch up the preferences a bit 2008-07-26 15:44:28 +00:00
05fc9a7d26 initial import of the ajax webui template 2008-07-26 15:26:00 +00:00
91ff2cb58f remove uneeded print from my patch which accidentally got left in 2008-07-26 12:08:04 +00:00
327de6f5cd Fix view options to be persistent between sessions 2008-07-26 08:12:34 +00:00
cac6b42449 adjust header spacing 2008-07-26 07:56:37 +00:00
998078b99c add missing hsep 2008-07-26 07:53:29 +00:00
0a3d1f64de fix last 2008-07-26 07:46:59 +00:00
8296e737ef start of torrent notification - doesnt yet work 2008-07-26 07:21:51 +00:00
5784b2adbb Fix do not create torrentfiles folder unless 'copy_torrent_file' is True
Fix some libtorrent asserts when using debug build
2008-07-26 03:50:10 +00:00
92f2b369ca save/load dht state - close #359 2008-07-26 03:36:15 +00:00
fb09106928 lang sync 2008-07-25 22:05:14 +00:00
93c3d47287 update template strings 2008-07-25 20:01:25 +00:00
a684994527 fix previous commit 2008-07-25 18:42:58 +00:00
5013ea842a add scheduler script from #382 2008-07-25 18:32:56 +00:00
e84e090c8e json:get_webui_templates 2008-07-25 17:29:10 +00:00
4cc5ccd0b8 coreclient, plugins can use the ui.client interface 2008-07-25 16:08:12 +00:00
4b3ffd0aca Revert back to 0.6c6 as 0.6c8 is not needed 2008-07-25 14:45:09 +00:00
45a7e2195a fix #381 2008-07-24 06:01:15 +00:00
53fa3ee3c3 Fix displaying of torrents when language is not English 2008-07-24 05:57:00 +00:00
a86046b770 revert tab i18n 2008-07-23 22:29:33 +00:00
1ee084f6fc make tab names i18n 2008-07-23 22:07:12 +00:00
c07dde715f lang sync 2008-07-23 21:55:37 +00:00
0fb159bd92 try to fix possible network/proxy problem 2008-07-23 19:55:02 +00:00
8d5d30205e sidebar style 2008-07-23 19:34:19 +00:00
4a3afad57f sidebar improvements 2008-07-23 18:30:39 +00:00
f79f5d9113 tracker-column:use connected or first 2008-07-23 17:08:33 +00:00
2f881fe734 Modify files tab right-click menu behaviour to that of torrentviews 2008-07-23 02:57:16 +00:00
0a362757a9 json get/set webui_config 2008-07-22 20:01:39 +00:00
adc9902252 mime-type guessing for /template/render/ 2008-07-22 19:24:57 +00:00
276cf262ed security fixes 2008-07-22 19:01:37 +00:00
498fbab03a improve /template/render/ 2008-07-22 18:24:42 +00:00
c5be051136 /template/render/ 2008-07-22 18:11:49 +00:00
f42f93d034 Display 'total_wanted' instead of 'total_size' in Size column 2008-07-22 06:44:28 +00:00
4440ecfdaa Fix building with gcc 4.3 2008-07-22 04:50:09 +00:00
313ed9dd62 Fix right-click selecting torrents. Behaviour is now similar to Nautilus. 2008-07-22 04:01:37 +00:00
b321535601 proxy support 2008-07-22 02:51:40 +00:00
4720104fe1 initial launchpad translation sync 2008-07-22 02:41:56 +00:00
62fdd4b03e Start of create torrent dialog. This does not work yet. 2008-07-22 00:38:55 +00:00
0e6dc927b3 Fix drag n drop adding of torrents with space in filename 2008-07-21 09:54:46 +00:00
6e35589ea9 Add missing file 2008-07-21 09:42:04 +00:00
9be504e2dd Fix logging typo 2008-07-21 09:40:39 +00:00
dbd476171c Update Changelog 2008-07-21 08:44:45 +00:00
f9fd9c3ba7 Set 'send_redundant_have' to True 2008-07-21 06:36:34 +00:00
98899d7ba5 Include LICENSE file
Change license type in setup.py to GPLv3
2008-07-21 00:58:10 +00:00
8866ff16c4 Remove TODO, most items converted to Trac tickets 2008-07-21 00:53:40 +00:00
a02e8f7603 Implement #342 drag n' drop on the main window 2008-07-21 00:01:04 +00:00
e73edcef8d Change version to '1.1.0_dev' 2008-07-20 22:41:04 +00:00
9930a311e7 Add 'tracker_host' torrent status key 2008-07-20 22:24:55 +00:00
a731da429b label:do nor register tracker_host as a status_field 2008-07-20 22:22:07 +00:00
b29f33c7e6 Add 'tracker' column to torrentview 2008-07-20 22:16:28 +00:00
79965ed5d5 label:update todo 2008-07-20 21:57:41 +00:00
699f93c4dc fix error on empty labels-list 2008-07-20 21:17:00 +00:00
99a5c07c8c label plugin (clean label/build dir) 2008-07-20 21:04:51 +00:00
2672 changed files with 672372 additions and 164389 deletions

6
.gitattributes vendored Normal file
View File

@ -0,0 +1,6 @@
.gitattributes export-ignore
.gitmodules export-ignore
.gitignore export-ignore
*.py diff=python
ext-all.js diff=minjs
*.state -merge -text

100
.github/workflows/cd.yml vendored Normal file
View File

@ -0,0 +1,100 @@
name: Package
on:
push:
tags:
- "deluge-*"
- "!deluge*-dev*"
branches:
- develop
pull_request:
types: [labeled, opened, synchronize, reopened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
ref:
description: "Enter a tag or commit to package"
default: ""
jobs:
windows_package:
runs-on: windows-2019
if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'package'))
strategy:
matrix:
arch: [x64, x86]
python: ["3.9"]
libtorrent: [2.0.6, 1.2.15]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0
# Checkout Deluge source to subdir to enable packaging any tag/commit
- name: Checkout Deluge source
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref }}
fetch-depth: 0
path: deluge_src
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python}}
architecture: ${{ matrix.arch }}
cache: pip
- name: Prepare pip
run: python -m pip install wheel
- name: Install GTK
run: |
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile("https://github.com/deluge-torrent/gvsbuild-release/releases/download/latest/gvsbuild-py${{ matrix.python }}-vs16-${{ matrix.arch }}.zip","C:\GTK.zip")
7z x C:\GTK.zip -oc:\GTK
echo "C:\GTK\release\lib" | Out-File -FilePath $env:GITHUB_PATH -Append
echo "C:\GTK\release\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
echo "C:\GTK\release" | Out-File -FilePath $env:GITHUB_PATH -Append
python -m pip install --no-index --find-links="C:\GTK\release\python" pycairo PyGObject
- name: Install Python dependencies
run: >
python -m pip install
twisted[tls]==22.4.0
libtorrent==${{ matrix.libtorrent }}
pyinstaller==4.10
pygame
-r requirements.txt
- name: Install Deluge
working-directory: deluge_src
run: |
python -m pip install .
python setup.py install_scripts
- name: Freeze Deluge
working-directory: packaging/win
run: |
pyinstaller --clean delugewin.spec --distpath freeze
- name: Fix OpenSSL for libtorrent x64
if: ${{ matrix.arch == 'x64' }}
working-directory: packaging/win/freeze/Deluge
run: |
cp libssl-1_1.dll libssl-1_1-x64.dll
cp libcrypto-1_1.dll libcrypto-1_1-x64.dll
- name: Make Deluge Installer
working-directory: ./packaging/win
run: |
python setup_nsis.py
makensis /Darch=${{ matrix.arch }} deluge-win-installer.nsi
- uses: actions/upload-artifact@v2
with:
name: deluge-py${{ matrix.python }}-lt${{ matrix.libtorrent }}-${{ matrix.arch }}
path: packaging/win/*.exe

98
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,98 @@
name: CI
on:
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
jobs:
test-linux:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.7", "3.10"]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements*.txt"
- name: Sets env var for security
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.body, 'security_test')) || (github.event_name == 'push' && contains(github.event.head_commit.message, 'security_test'))
run: echo "SECURITY_TESTS=True" >> $GITHUB_ENV
- name: Install dependencies
run: |
pip install --upgrade pip wheel
pip install -r requirements.txt -r requirements-tests.txt
pip install -e .
- name: Install security dependencies
if: contains(env.SECURITY_TESTS, 'True')
run: |
wget -O- $TESTSSL_URL$TESTSSL_VER | tar xz
mv -t deluge/tests/data testssl.sh-$TESTSSL_VER/testssl.sh testssl.sh-$TESTSSL_VER/etc/;
env:
TESTSSL_VER: 3.0.6
TESTSSL_URL: https://codeload.github.com/drwetter/testssl.sh/tar.gz/refs/tags/v
- name: Setup core dump directory
run: |
sudo mkdir /cores/ && sudo chmod 777 /cores/
echo "/cores/%E.%p" | sudo tee /proc/sys/kernel/core_pattern
- name: Test with pytest
run: |
ulimit -c unlimited # Enable core dumps to be captured
python -c 'from deluge._libtorrent import lt; print(lt.__version__)';
catchsegv python -X dev -m pytest -v -m "not (todo or gtkui)" deluge
- uses: actions/upload-artifact@v2
# capture all crashes as build artifacts
if: failure()
with:
name: crashes
path: /cores
test-windows:
runs-on: windows-2019
strategy:
matrix:
python-version: ["3.7", "3.10"]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements*.txt"
- name: Install dependencies
run: |
pip install --upgrade pip wheel
pip install -r requirements.txt -r requirements-tests.txt
pip install -e .
- name: Test with pytest
run: |
python -c 'import libtorrent as lt; print(lt.__version__)';
pytest -v -m "not (todo or gtkui or security)" deluge

45
.github/workflows/docs.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Docs
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
pip install --upgrade pip wheel
pip install tox
sudo apt-get install enchant-2
- name: Test with tox
env:
TOX_ENV: docs
run: |
tox -e $TOX_ENV

17
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: Linting
on:
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Run pre-commit linting
uses: pre-commit/action@v2.0.2

25
.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
*~
build
.cache
dist
docs/source/modules/deluge*.rst
*.egg-info/
*.dist-info/
*.egg
*.log
__pycache__/
*.py[cod]
*.tar.*
.tox/
deluge/i18n/*/
deluge.pot
deluge/ui/web/js/*.js
deluge/ui/web/js/extjs/ext-extensions*.js
*.desktop
*.appdata.xml
.build_data*
osx/app
RELEASE-VERSION
.venv*
# used by setuptools to cache downloaded eggs
/.eggs

51
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,51 @@
default_language_version:
python: python3
exclude: >
(?x)^(
deluge/ui/web/docs/template/.*|
deluge/tests/data/.*svg|
)$
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
name: Fmt Black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
hooks:
- id: prettier
name: Fmt Prettier
# Workaround to list modified files only.
args: [--list-different]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: Fmt isort
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
name: Chk Flake8
additional_dependencies:
- pep8-naming==0.12.1
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: double-quote-string-fixer
name: Fix Double-quotes
- id: end-of-file-fixer
name: Fix End-of-files
exclude_types: [javascript, css]
- id: mixed-line-ending
name: Fix Line endings
args: [--fix=auto]
- id: trailing-whitespace
name: Fix Trailing whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py36-plus]
stages: [manual]

6
.prettierignore Normal file
View File

@ -0,0 +1,6 @@
deluge/ui/web/css/ext-*.css
deluge/ui/web/js/extjs/ext-*.js
deluge/ui/web/docs/
deluge/ui/web/themes/images/
*.py*
*.html

13
.prettierrc.yaml Normal file
View File

@ -0,0 +1,13 @@
trailingComma: "es5"
tabWidth: 4
singleQuote: true
overrides:
- files:
- "*.yaml"
- ".*.yaml"
- "*.yml"
- ".*.yml"
- "*.md"
options:
tabWidth: 2
singleQuote: false

420
.pylintrc Normal file
View File

@ -0,0 +1,420 @@
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns=
# Pickle collected data for later comparisons.
persistent=yes
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=
# Use multiple processes to speed up Pylint.
jobs=2
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=
# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
# be used to obtain the result of joining multiple strings with the addition
# operator. Joining a lot of strings can lead to a maximum recursion error in
# Pylint and this flag can prevent that. It has one side effect, the resulting
# AST will be different than the one from reality. This option is deprecated
# and it will be removed in Pylint 2.0.
optimize-ast=no
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
confidence=
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
#enable=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
#
# Arranged by category and use symbolic names instead of ids.
disable=
# Convention
missing-docstring, invalid-name, bad-continuation,
# Error
no-member, no-name-in-module,
# Information
locally-disabled,
# Refactor
no-self-use, too-many-arguments, too-many-branches, too-many-instance-attributes,
too-many-locals, too-few-public-methods, too-many-public-methods, too-many-statements,
# Refactor msgs that should eventually be enabled:
redefined-variable-type, too-many-ancestors,
too-many-nested-blocks, too-many-return-statements,
# Warning
unused-argument, protected-access, import-error, unused-variable,
attribute-defined-outside-init,
# Warning msgs that should eventually be enabled:
arguments-differ, global-statement, fixme, broad-except
[REPORTS]
# Set the output format. Available formats are text, parseable, colorized, msvs
# (visual studio) and html. You can also give a reporter class, eg
# mypackage.mymodule.MyReporterClass.
output-format=parseable
# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]". This option is deprecated
# and it will be removed in Pylint 2.0.
files-output=no
# Tells whether to display a full report or only the messages
reports=no
# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details
#msg-template=
[SPELLING]
# Spelling dictionary name. Available dictionaries: none. To make it working
# install python-enchant package.
spelling-dict=
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to indicated private dictionary in
# --spelling-private-dict-file option instead of raising a message.
spelling-store-unknown-words=no
[BASIC]
# Good variable names which should always be accepted, separated by a comma
good-names=d,i,j,k,ex,Run,_,log
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Include a hint for the correct naming format with invalid-name
include-naming-hint=no
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
property-classes=abc.abstractproperty
# Regular expression matching correct function names
function-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for function names
function-name-hint=[a-z_][a-z0-9_]{2,30}$
# Regular expression matching correct variable names
variable-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for variable names
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
# Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# Naming hint for constant names
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# Regular expression matching correct attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for attribute names
attr-name-hint=[a-z_][a-z0-9_]{2,30}$
# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for argument names
argument-name-hint=[a-z_][a-z0-9_]{2,30}$
# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
# Naming hint for class attribute names
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
# Naming hint for inline iteration names
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
# Regular expression matching correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$
# Naming hint for class names
class-name-hint=[A-Z_][a-zA-Z0-9]+$
# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Naming hint for module names
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Regular expression matching correct method names
method-rgx=[a-z_][a-z0-9_]{2,40}$
# Naming hint for method names
method-name-hint=[a-z_][a-z0-9_]{2,30}$
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=__.*__
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
[ELIF]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
[LOGGING]
# Logging modules to check that the string format arguments are in logging
# function parameter format
logging-modules=logging
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=120
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,dict-separator
# Maximum number of lines in a module
max-module-lines=1550
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=LF
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO
[VARIABLES]
# Tells whether we should check for unused import in __init__ files.
init-import=no
# A regular expression matching the name of dummy variables (i.e. expectedly
# not used).
dummy-variables-rgx=_$|dummy
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=_,_n,__request__,WindowsError
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,_cb
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=
[TYPECHECK]
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=SQLObject,twisted.internet.reactor
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=REQUEST,acl_users,aq_parent
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
[SIMILARITIES]
# Minimum lines number of a similarity.
min-similarity-lines=4
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=no
[IMPORTS]
# Deprecated modules which should not be used, separated by a comma
deprecated-modules=regsub,TERMIOS,Bastion,rexec
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled)
import-graph=
# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled)
ext-import-graph=
# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled)
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
[DESIGN]
# Maximum number of arguments for function / method
max-args=7
# Argument names that match this expression will be ignored. Default to name
# with leading underscore
ignored-argument-names=_.*
# Maximum number of locals for function / method body
max-locals=15
# Maximum number of return / yield for function / method body
max-returns=6
# Maximum number of branch for function / method body
max-branches=12
# Maximum number of statements in function / method body
max-statements=50
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of boolean expressions in a if statement
max-bool-expr=5
[CLASSES]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,_fields,_replace,_source,_make
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception

22
.readthedocs.yml Normal file
View File

@ -0,0 +1,22 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Optionally build your docs in additional formats such as PDF and ePub
formats: all
# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: requirements.txt
- requirements: docs/requirements.txt
- method: setuptools
path: .

790
AUTHORS Normal file
View File

@ -0,0 +1,790 @@
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 Mobley ('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/ui/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
deluge/ui/web/images/deluge*.png
deluge/ui/web/icons/apple-pre-*.png, deluge*.png
copyright: Calum Lind
license: GPLv3
* files: deluge/plugins/blocklist/blocklist/data/*.png
deluge/ui/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/ui/data/pixmaps/magnet*.svg, *.png
copyright: Matias Wilkman
license:
* files: deluge/ui/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 Mobley
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
Γιάννης Κατσαμπίρης
Артём Попов
Миша
Шаймарданов Максим
蔡查理

259
CHANGELOG.md Normal file
View File

@ -0,0 +1,259 @@
# Changelog
## 2.1.1 (2022-07-10)
### Core
- Fix missing trackers added via magnet
- Fix handling magnets with tracker tiers
## 2.1.0 (2022-06-28)
### Breaking changes
- Python 2 support removed (Python >= 3.6)
- libtorrent minimum requirement increased (>= 1.2).
### Core
- Add support for SVG tracker icons.
- Fix tracker icon error handling.
- Fix cleaning-up tracker icon temp files.
- Fix Plugin manager to handle new metadata 2.1.
- Hide passwords in config logs.
- Fix cleaning-up temp files in add_torrent_url.
- Fix KeyError in sessionproxy after torrent delete.
- Remove libtorrent deprecated functions.
- Fix file_completed_alert handling.
- Add plugin keys to get_torrents_status.
- Add support for pygeoip dependency.
- Fix crash logging to Windows protected folder.
- Add is_interface and is_interface_name to validate network interfaces.
- Fix is_url and is_infohash error with None value.
- Fix load_libintl error.
- Add support for IPv6 in host lists.
- Add systemd user services.
- Fix refresh and expire the torrent status cache.
- Fix crash when logging errors initializing gettext.
### Web UI
- Fix ETA column sorting in correct order (#3413).
- Fix defining foreground and background colors.
- Accept charset in content-type for json messages.
- Fix 'Complete Seen' and 'Completed' sorting.
- Fix encoding HTML entities for torrent attributes to prevent XSS.
### Gtk UI
- Fix download location textbox width.
- Fix obscured port number in Connection Manager.
- Increase connection manager default height.
- Fix bug with setting move completed in Options tab.
- Fix adding daemon accounts.
- Add workaround for crash on Windows with ico or gif icons.
- Hide account password length in log.
- Added a torrent menu option for magnet copy.
- Fix unable to prefetch magnet in thinclient mode.
- Use GtkSpinner when testing open port.
- Update About Dialog year.
- Fix Edit Torrents dialogs close issues.
- Fix ETA being copied to neighboring empty cells.
- Disable GTK CSD by default on Windows.
### Console UI
- Fix curses.init_pair raise ValueError on Py3.10.
- Swap j and k key's behavior to fit vim mode.
- Fix torrent details status error.
- Fix incorrect test for when a host is online.
- Add the torrent label to info command.
### AutoAdd
- Fix handling torrent decode errors.
- Fix error dialog not being shown on error.
### Blocklist
- Add frequency unit to interval label.
### Notifications
- Fix UnicodeEncodeError upon non-ascii torrent name.
## 2.0.5 (2021-12-15)
### WebUI
- Fix js minifying error resulting in WebUI blank screen.
- Silence erronous missing translations warning.
## 2.0.4 (2021-12-12)
### Packaging
- Fix python optional setup.py requirements
### Gtk UI
- Add detection of torrent URL on GTK UI focus
- Fix piecesbar crashing when enabled
- Remove num_blocks_cache_hits in stats
- Fix unhandled error with empty clipboard
- Add torrentdetails tabs position menu (#3441)
- Hide pygame community banner in console
- Fix cmp function for None types (#3309)
- Fix loading config with double-quotes in string
- Fix Status tab download speed and uploaded
### Web UI
- Handle torrent add failures
- Add menu option to copy magnet URI
- Fix md5sums in torrent files breaking file listing (#3388)
- Add country flag alt/title for accessibility
### Console UI
- Fix allowing use of windows-curses on Windows
- Fix hostlist status lookup errors
- Fix AttributeError setting config values
- Fix setting 'Skip' priority
### Core
- Add workaround libtorrent 2.0 file_progress error
- Fix allow enabling any plugin Python version
- Export torrent get_magnet_uri method
- Fix loading magnet with resume_data and no metadata (#3478)
- Fix httpdownloader reencoding torrent file downloads (#3440)
- Fix lt listen_interfaces not comma-separated (#3337)
- Fix unable to remove magnet with delete_copies enabled (#3325)
- Fix Python 3.8 compatibility
- Fix loading config with double-quotes in string
- Fix pickle loading non-ascii state error (#3298)
- Fix creation of pidfile via command option
- Fix for peer.client UnicodeDecodeError
- Fix show_file unhandled dbus error
### Documentation
- Add How-to guides about services.
### Stats plugin
- Fix constant session status key warnings
- Fix cairo error
### Notifications plugin
- Fix email KeyError with status name
- Fix unhandled TypeErrors on Python 3
### Autoadd plugin
- Fix magnet missing applied labels
### Execute plugin
- Fix failing to run on Windows (#3439)
## 2.0.3 (2019-06-12)
### Gtk UI
- Fix errors running on Wayland (#3265).
- Fix Peers Tab tooltip and context menu errors (#3266).
### Web UI
- Fix TypeError in Peers Tab setting country flag.
- Fix reverse proxy header TypeError (#3260).
- Fix request.base 'idna' codec error (#3261).
- Fix unable to change password (#3262).
### Extractor plugin
- Fix potential error starting plugin.
### Documentation
- Fix macOS install typo.
- Fix Windows install instructions.
## 2.0.2 (2019-06-08)
### Packaging
- Add systemd deluged and deluge-web service files to package tarball (#2034)
### Core
- Fix Python 2 compatibility issue with SimpleNamespace.
## 2.0.1 (2019-06-07)
### Packaging
- Fix `setup.py` build error without git installed.
## 2.0.0 (2019-06-06)
### Codebase
- Ported to Python 3
### Core
- Improved Logging
- Removed the AutoAdd feature on the core. It's now handled with the AutoAdd
plugin, which is also shipped with Deluge, and it does a better job and
now, it even supports multiple users perfectly.
- Authentication/Permission exceptions are now sent to clients and recreated
there to allow acting upon them.
- Updated SSL/TLS Protocol parameters for better security.
- Make the distinction between adding to the session new unmanaged torrents
and torrents loaded from state. This will break backwards compatibility.
- Pass a copy of an event instead of passing the event arguments to the
event handlers. This will break backwards compatibility.
- Allow changing ownership of torrents.
- File modifications on the auth file are now detected and when they happen,
the file is reloaded. Upon finding an old auth file with an old format, an
upgrade to the new format is made, file saved, and reloaded.
- Authentication no longer requires a username/password. If one or both of
these is missing, an authentication error will be sent to the client
which should then ask the username/password to the user.
- Implemented sequential downloads.
- Provide information about a torrent's pieces states
- Add Option To Specify Outgoing Connection Interface.
- Fix potential for host_id collision when creating hostlist entries.
### Gtk UI
- Ported to GTK3 (3rd-party plugins will need updated).
- Allow changing ownership of torrents.
- Host entries in the Connection Manager UI are now editable.
- Implemented sequential downloads UI handling.
- Add optional pieces bar instead of a regular progress bar in torrent status tab.
- Make torrent opening compatible with all Unicode paths.
- Fix magnet association button on Windows.
- Add keyboard shortcuts for changing queue position:
- Up: `Ctrl+Alt+Up`
- Down: `Ctrl+Alt+Down`
- Top: `Ctrl+Alt+Shift+Up`
- Bottom: `Ctrl+Alt+Shift+Down`
### Web UI
- Server (deluge-web) now daemonizes by default, use '-d' or '--do-not-daemonize' to disable.
- Fixed the '--base' option to work for regular use, not just with reverse proxies.
### Blocklist Plugin
- Implemented whitelist support to both core and GTK UI.
- Implemented IP filter cleaning before each update. Restarting the deluge
daemon is no longer needed.
- If "check_after_days" is 0(zero), the timer is not started anymore. It
would keep updating one call after the other. If the value changed, the
timer is now stopped and restarted using the new value.

View File

@ -1,37 +0,0 @@
Deluge 0.9.03 - "1.0.0_RC3" (In-Development)
Core:
* File progress fixes from libtorrent
* Fix building on FreeBSD
* Fix #350 stop seeds when stop ratio is reached
* Fix #358 properly emit torrent_removed signal when remove_at_ratio happens
UI:
* Default to gtkui when running 'deluge' instead of defaulting to last used.
GtkUI:
* Fix open folder
* Fix #349 tab ordering when hiding/showing
Windows:
* Fix torrent file association and adding files from command line
Plugins:
* Blocklist plugin has been rewritten
Misc:
* Some changes for python 2.6 compatibility
Deluge 0.9.02 - "1.0.0_RC2" (15 July 2008)
Core:
* Fix displaying of file progress
* Fix files to have proper read/write permissions
WebUI:
* Include missing 'classic' template
* Update options tab to include queue settings
Windows:
* Fix displaying of tray icon
* Fix scrolling of tray menu
* Fix hiding of tray icon when shutting down
* Fix tray icon tool tip length to show properly

100
DEPENDS.md Normal file
View File

@ -0,0 +1,100 @@
# Deluge dependencies
The following are required to install and run Deluge. They are separated into
sections to distinguish the precise requirements for each module.
All modules will require the [common](#common) section dependencies.
## Prerequisite
- [Python] _>= 3.6_
## Build
- [setuptools]
- [intltool] - Optional: Desktop file translation for \*nix.
- [closure-compiler] - Minify javascript (alternative is [rjsmin])
## Common
- [Twisted] _>= 17.1_ - Use `TLS` extras for `service_identity` and `idna`.
- [OpenSSL] _>= 1.0.1_
- [pyOpenSSL]
- [rencode] _>= 1.0.2_ - Encoding library.
- [PyXDG] - Access freedesktop.org standards for \*nix.
- [xdg-utils] - Provides xdg-open for \*nix.
- [zope.interface]
- [chardet] - Optional: Encoding detection.
- [setproctitle] - Optional: Renaming processes.
- [Pillow] - Optional: Support for resizing tracker icons.
- [dbus-python] - Optional: Show item location in filemanager.
- [ifaddr] - Optional: Verify network interfaces.
### Linux and BSD
- [distro] - Optional: OS platform information.
### Windows OS
- [pywin32]
- [certifi]
## Core (deluged daemon)
- [libtorrent] _>= 1.2.0_
- [GeoIP] or [pygeoip] - Optional: IP address country lookup. (_Debian: `python-geoip`_)
## GTK UI
- [GTK+] >= 3.10
- [PyGObject]
- [Pycairo]
- [librsvg] _>= 2_
- [libappindicator3] w/GIR - Optional: Ubuntu system tray icon.
### MacOS
- [GtkOSXApplication]
## Web UI
- [mako]
## Plugins
### Notifications
- [pygame] - Optional: Play sounds
- [libnotify] w/GIR - Optional: Desktop popups.
[python]: https://www.python.org/
[setuptools]: https://setuptools.readthedocs.io/en/latest/
[intltool]: https://freedesktop.org/wiki/Software/intltool/
[closure-compiler]: https://developers.google.com/closure/compiler/
[rjsmin]: https://pypi.org/project/rjsmin/
[openssl]: https://www.openssl.org/
[pyopenssl]: https://pyopenssl.org
[twisted]: https://twistedmatrix.com
[pillow]: https://pypi.org/project/Pillow/
[libtorrent]: https://libtorrent.org/
[zope.interface]: https://pypi.org/project/zope.interface/
[distro]: https://github.com/nir0s/distro
[pywin32]: https://github.com/mhammond/pywin32
[certifi]: https://pypi.org/project/certifi/
[dbus-python]: https://pypi.org/project/dbus-python/
[setproctitle]: https://pypi.org/project/setproctitle/
[gtkosxapplication]: https://github.com/jralls/gtk-mac-integration
[chardet]: https://chardet.github.io/
[rencode]: https://github.com/aresch/rencode
[pyxdg]: https://www.freedesktop.org/wiki/Software/pyxdg/
[xdg-utils]: https://www.freedesktop.org/wiki/Software/xdg-utils/
[gtk+]: https://www.gtk.org/
[pycairo]: https://cairographics.org/pycairo/
[pygobject]: https://pygobject.readthedocs.io/en/latest/
[geoip]: https://pypi.org/project/GeoIP/
[mako]: https://www.makotemplates.org/
[pygame]: https://www.pygame.org/
[libnotify]: https://developer.gnome.org/libnotify/
[python-appindicator]: https://packages.ubuntu.com/xenial/python-appindicator
[librsvg]: https://wiki.gnome.org/action/show/Projects/LibRsvg
[ifaddr]: https://pypi.org/project/ifaddr/

634
LICENSE Normal file
View File

@ -0,0 +1,634 @@
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
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS

36
MANIFEST.in Normal file
View File

@ -0,0 +1,36 @@
include *.md
include AUTHORS
include LICENSE
include RELEASE-VERSION
include msgfmt.py
include minify_web_js.py
include version.py
include gen_web_gettext.py
graft docs/man
graft packaging/systemd
include deluge/i18n/*.po
recursive-exclude deluge/i18n *.mo
graft deluge/plugins
recursive-exclude deluge/plugins create_dev_link.sh *.pyc *.egg
prune deluge/plugins/*/build
prune deluge/plugins/*/*.egg-info
graft deluge/tests/
recursive-exclude deluge/tests *.pyc
graft deluge/ui/data
recursive-exclude deluge/ui/data *.desktop *.xml
graft deluge/ui/gtk3/glade
include deluge/ui/web/index.html
include deluge/ui/web/css/*.css
include deluge/ui/web/js/*.js
graft deluge/ui/web/js/deluge-all/
graft deluge/ui/web/js/extjs/
graft deluge/ui/web/themes
graft deluge/ui/web/render
graft deluge/ui/web/icons
graft deluge/ui/web/images

71
README.md Normal file
View File

@ -0,0 +1,71 @@
# Deluge BitTorrent Client
[![build-status]][github-ci] [![docs-status]][rtd-deluge]
Deluge is a BitTorrent client that utilizes a daemon/client model.
It has various user interfaces available such as the GTK-UI, Web-UI and
Console-UI. It uses [libtorrent][lt] at its core to handle the BitTorrent
protocol.
## Install
From [PyPi](https://pypi.org/project/deluge):
pip install deluge
with all optional dependencies:
pip install deluge[all]
From source code:
pip install .
with all optional dependencies:
pip install .[all]
See [DEPENDS](DEPENDS.md) and [Installing/Source] for dependency details.
## Usage
The various user-interfaces and Deluge daemon can be started with the following commands.
Use the `--help` option for further command options.
### Gtk UI
`deluge` or `deluge-gtk`
### Console UI
`deluge-console`
### Web UI
`deluge-web`
Open http://localhost:8112 with default password `deluge`.
### Daemon
`deluged`
See the [Thinclient guide] to connect to the daemon from another computer.
## Contact
- [Homepage](https://deluge-torrent.org)
- [User guide][user guide]
- [Forum](https://forum.deluge-torrent.org)
- [IRC Libera.Chat #deluge](irc://irc.libera.chat/deluge)
- [Discord](https://discord.gg/nwaHSE6tqn)
[user guide]: https://dev.deluge-torrent.org/wiki/UserGuide
[thinclient guide]: https://dev.deluge-torrent.org/wiki/UserGuide/ThinClient
[installing/source]: https://dev.deluge-torrent.org/wiki/Installing/Source
[build-status]: https://github.com/deluge-torrent/deluge/actions/workflows/ci.yml/badge.svg?branch=develop "CI"
[github-ci]: https://github.com/deluge-torrent/deluge/actions/workflows/ci.yml
[docs-status]: https://readthedocs.org/projects/deluge/badge/?version=latest
[rtd-deluge]: https://deluge.readthedocs.io/en/latest/?badge=latest "Documentation Status"
[lt]: https://libtorrent.org

23
TODO
View File

@ -1,23 +0,0 @@
For 0.6 release:
* Translations
* Add progress bars for downloading and importing lists instead of hanging (blocklist)
After 0.6 release:
* Address issue where torrents will redownload if the storage is moved outside
of deluge.
* Implement add by hash
* Figure out easy way for user-made plugins to add i18n support.
* Restart daemon function
* Docstrings!
* Add wizard
* Advanced (pieces) progress bar
* Add method for plugins to add labels
* Add context menus for labels.. ie. setting options for all torrents in label
* Implement caching in core
* Use the batch torrent status info as a cache for other torrent status requests
* Add number of torrents to labels
* Proxy stuff
* Webseed
* Enable/disable webui from within gtkui
* Notifications
* create a clamav plugin to scan files

View File

@ -1,6 +0,0 @@
#!/bin/bash
for size in 16 22 24 32 36 48 64 72 96 128 192 256; do mkdir -p deluge/data/\
icons/hicolor/${size}x${size}/apps; rsvg-convert -w ${size} -h ${size} \
-o deluge/data/icons/hicolor/${size}x${size}/apps/deluge.png deluge/data/pixmaps\
/deluge.svg; mkdir -p deluge/data/icons/scalable/apps/; cp deluge/data/pixmaps/\
deluge.svg deluge/data/icons/scalable/apps/deluge.svg; done

5
debian/changelog vendored
View File

@ -1,5 +0,0 @@
deluge-torrent (0.9.02-1) unstable; urgency=low
* RC2 release
-- Andrew Resch (andar) <andrewresch@gmail.com> Tue, 17 Jul 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, 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, 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), 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, 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: universe/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, 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: universe/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, 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/

103
debian/copyright vendored
View File

@ -1,103 +0,0 @@
This package was debianized by Adam Cécile (Le_Vert) <gandalf@le-vert.net> on
Wed, 15 Nov 2006 22:03:13 +0100.
It was downloaded from http://www.deluge-torrent.org/
Upstream Author: Zach Tibbitts <zach@collegegeek.org>
Alon Zakai <kripkensteiner@gmail.com>
Marcos Pinto
Copyright: (C) 2006, Zach Tibbitts <zach@collegegeek.org>
(C) 2006, Alon Zakai <kripkensteiner@gmail.com>
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 2 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/* are (C) 2006, A. Zakai ('Kripken') <kripkensteiner@gmail.com>
and distributed unders term of GNU General Public License.
This code is baded on libtorrent which is (C) 2003 Arvid Norberg and
distributed under terms of the 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-2006 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.
"po/*" 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-2007, Adam Cécile (Le_Vert)
<gandalf@le-vert.net> and is licensed under the GPL, see above.

1
debian/manpages vendored
View File

@ -1 +0,0 @@
debian/deluge.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

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,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.4
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,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.4
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,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,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()

35
deluge/_libtorrent.py Normal file
View File

@ -0,0 +1,35 @@
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
"""
This module is used to handle the importing of libtorrent and also controls
the minimum versions of libtorrent that this version of Deluge supports.
Example:
>>> from deluge._libtorrent import lt
"""
from deluge.common import VersionSplit, get_version
from deluge.error import LibtorrentImportError
try:
import deluge.libtorrent as lt
except ImportError:
try:
import libtorrent as lt
except ImportError as ex:
raise LibtorrentImportError('No libtorrent library found: %s' % (ex))
REQUIRED_VERSION = '1.2.0.0'
LT_VERSION = lt.__version__
if VersionSplit(LT_VERSION) < VersionSplit(REQUIRED_VERSION):
raise LibtorrentImportError(
f'Deluge {get_version()} requires libtorrent >= {REQUIRED_VERSION}'
)

384
deluge/argparserbase.py Normal file
View File

@ -0,0 +1,384 @@
#
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import argparse
import logging
import os
import platform
import sys
import textwrap
import deluge.log
from deluge import common
from deluge.configmanager import get_config_dir, set_config_dir
def find_subcommand(self, args=None, sys_argv=True):
"""Find if a subcommand has been supplied.
Args:
args (list, optional): The argument list to search through.
sys_argv (bool): Use sys.argv[1:] if args is None.
Returns:
int: Index of the subcommand or '-1' if none found.
"""
subcommand_found = -1
if args is None:
args = sys.argv[1:] if sys_argv is None else []
for x in self._subparsers._actions:
if not isinstance(x, argparse._SubParsersAction):
continue
for sp_name in x._name_parser_map:
if sp_name in args:
subcommand_found = args.index(sp_name)
return subcommand_found
def set_default_subparser(self, name, abort_opts=None):
"""Sets the default argparse subparser.
Args:
name (str): The name of the default subparser.
abort_opts (list): The arguments to test for in case no subcommand is found.
If any of the values are found, the default subparser will
not be inserted into sys.argv.
Returns:
list: The arguments found in sys.argv if no subcommand found, else None
"""
found_abort_opts = []
abort_opts = [] if abort_opts is None else abort_opts
test_args = sys.argv[1:]
subparser_found = self.find_subcommand(args=test_args)
for i, arg in enumerate(test_args):
if subparser_found == i:
break
if arg in abort_opts:
found_abort_opts.append(arg)
if subparser_found == -1:
if found_abort_opts:
# Found one or more of arguments in abort_opts
return found_abort_opts
# insert default in first position, this implies no
# global options without a sub_parsers specified
sys.argv.insert(1, name)
return None
argparse.ArgumentParser.find_subcommand = find_subcommand
argparse.ArgumentParser.set_default_subparser = set_default_subparser
def _get_version_detail():
version_str = '%s\n' % (common.get_version())
try:
from deluge._libtorrent import LT_VERSION
version_str += 'libtorrent: %s\n' % LT_VERSION
except ImportError:
pass
version_str += 'Python: %s\n' % platform.python_version()
version_str += f'OS: {platform.system()} {common.get_os_version()}\n'
return version_str
class DelugeTextHelpFormatter(argparse.RawDescriptionHelpFormatter):
"""Help message formatter which retains formatting of all help text."""
def _split_lines(self, text, width):
"""
Do not remove whitespaces in string but still wrap text to max width.
Instead of passing the entire text to textwrap.wrap, split and pass each
line instead. This way list formatting is not mangled by textwrap.wrap.
"""
wrapped_lines = []
for line in text.splitlines():
wrapped_lines.extend(textwrap.wrap(line, width, subsequent_indent=' '))
return wrapped_lines
def _format_action_invocation(self, action):
"""
Combines the options with comma and displays the argument
value only once instead of after both options.
Instead of: -s <arg>, --long-opt <arg>
Show : -s, --long-opt <arg>
"""
if not action.option_strings:
(metavar,) = self._metavar_formatter(action, action.dest)(1)
return metavar
else:
parts = []
# if the Optional doesn't take a value, format is:
# -s, --long
if action.nargs == 0:
parts.extend(action.option_strings)
# if the Optional takes a value, format is:
# -s, --long ARGS
else:
default = action.dest.upper()
args_string = self._format_args(action, default)
opt = ', '.join(action.option_strings)
parts.append(f'{opt} {args_string}')
return ', '.join(parts)
class HelpAction(argparse._HelpAction):
def __call__(self, parser, namespace, values, option_string=None):
if hasattr(parser, 'subparser'):
subparser = getattr(parser, 'subparser')
subparser.print_help()
else:
parser.print_help()
parser.exit()
class ArgParserBase(argparse.ArgumentParser):
def __init__(self, *args, **kwargs):
if 'formatter_class' not in kwargs:
kwargs['formatter_class'] = lambda prog: DelugeTextHelpFormatter(
prog, max_help_position=33, width=90
)
kwargs['add_help'] = kwargs.get('add_help', False)
common_help = kwargs.pop('common_help', True)
self.log_stream = sys.stdout
if 'log_stream' in kwargs:
self.log_stream = kwargs['log_stream']
del kwargs['log_stream']
super().__init__(*args, **kwargs)
self.common_setup = False
self.process_arg_group = False
self.group = self.add_argument_group(_('Common Options'))
if common_help:
self.group.add_argument(
'-h', '--help', action=HelpAction, help=_('Print this help message')
)
self.group.add_argument(
'-V',
'--version',
action='version',
version='%(prog)s ' + _get_version_detail(),
help=_('Print version information'),
)
self.group.add_argument(
'-v',
action='version',
version='%(prog)s ' + _get_version_detail(),
help=argparse.SUPPRESS,
) # Deprecated arg
self.group.add_argument(
'-c',
'--config',
metavar='<config>',
help=_('Set the config directory path'),
)
self.group.add_argument(
'-l',
'--logfile',
metavar='<logfile>',
help=_('Output to specified logfile instead of stdout'),
)
self.group.add_argument(
'-L',
'--loglevel',
choices=[level for k in deluge.log.levels for level in (k, k.upper())],
help=_('Set the log level (none, error, warning, info, debug)'),
metavar='<level>',
)
self.group.add_argument(
'--logrotate',
nargs='?',
const='2M',
metavar='<max-size>',
help=_(
'Enable logfile rotation, with optional maximum logfile size, '
'default: %(const)s (Logfile rotation count is 5)'
),
)
self.group.add_argument(
'-q',
'--quiet',
action='store_true',
help=_('Quieten logging output (Same as `--loglevel none`)'),
)
self.group.add_argument(
'--profile',
metavar='<profile-file>',
nargs='?',
default=False,
help=_(
'Profile %(prog)s with cProfile. Outputs to stdout '
'unless a filename is specified'
),
)
def parse_args(self, args=None):
"""Parse UI arguments and handle common and process group options.
Notes:
Unknown arguments results in usage text printed and system exit.
Args:
args (list, optional): The arguments to parse.
Returns:
argparse.Namespace: The parsed arguments.
"""
options = super().parse_args(args=args)
return self._handle_ui_options(options)
def parse_known_ui_args(self, args, withhold=None):
"""Parse UI arguments and handle common and process group options without error.
Args:
args (list): The arguments to parse.
withhold (list): Values to ignore in the args list.
Returns:
argparse.Namespace: The parsed arguments.
"""
if withhold:
args = [a for a in args if a not in withhold]
options, remaining = super().parse_known_args(args=args)
options.remaining = remaining
# Handle common and process group options
return self._handle_ui_options(options)
def _handle_ui_options(self, options):
"""Handle UI common and process group options.
Args:
options (argparse.Namespace): The parsed options.
Returns:
argparse.Namespace: The parsed options.
"""
if not self.common_setup:
self.common_setup = True
# Setup the logger
if options.quiet:
options.loglevel = 'none'
if options.loglevel:
options.loglevel = options.loglevel.lower()
logfile_mode = 'w'
logrotate = options.logrotate
if options.logrotate:
logfile_mode = 'a'
logrotate = common.parse_human_size(options.logrotate)
# Setup the logger
deluge.log.setup_logger(
level=options.loglevel,
filename=options.logfile,
filemode=logfile_mode,
logrotate=logrotate,
output_stream=self.log_stream,
)
if options.config:
if not set_config_dir(options.config):
log = logging.getLogger(__name__)
log.error('There was an error setting the config dir! Exiting..')
sys.exit(1)
else:
if not os.path.exists(common.get_default_config_dir()):
os.makedirs(common.get_default_config_dir())
if self.process_arg_group:
self.process_arg_group = False
# If donotdaemonize is set, skip process forking.
if not (common.windows_check() or options.donotdaemonize):
if os.fork():
os._exit(0)
os.setsid()
# Do second fork
if os.fork():
os._exit(0)
# Ensure process doesn't keep any directory in use that may prevent a filesystem unmount.
os.chdir(get_config_dir())
# Write pid file before chuid
if options.pidfile:
with open(options.pidfile, 'w') as _file:
_file.write('%d\n' % os.getpid())
if not common.windows_check():
if options.group:
if not options.group.isdigit():
import grp
options.group = grp.getgrnam(options.group)[2]
os.setgid(options.group)
if options.user:
if not options.user.isdigit():
import pwd
options.user = pwd.getpwnam(options.user)[2]
os.setuid(options.user)
return options
def add_process_arg_group(self):
"""Adds a grouping of common process args to control a daemon to the parser"""
self.process_arg_group = True
self.group = self.add_argument_group(_('Process Control Options'))
self.group.add_argument(
'-P',
'--pidfile',
metavar='<pidfile>',
action='store',
help=_('Pidfile to store the process id'),
)
if not common.windows_check():
self.group.add_argument(
'-d',
'--do-not-daemonize',
dest='donotdaemonize',
action='store_true',
help=_('Do not daemonize (fork) this process'),
)
self.group.add_argument(
'-f',
'--fork',
dest='donotdaemonize',
action='store_false',
help=argparse.SUPPRESS,
) # Deprecated arg
self.group.add_argument(
'-U',
'--user',
metavar='<user>',
action='store',
help=_('Change to this user on startup (Requires root)'),
)
self.group.add_argument(
'-g',
'--group',
metavar='<group>',
action='store',
help=_('Change to this group on startup (Requires root)'),
)

148
deluge/bencode.py Normal file
View File

@ -0,0 +1,148 @@
# 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
# for the specific language governing rights and limitations under the
# License.
# Written by Petru Paler
# Updated by Calum Lind to support Python 3.
class BTFailure(Exception):
pass
DICT_DELIM = b'd'
END_DELIM = b'e'
INT_DELIM = b'i'
LIST_DELIM = b'l'
BYTE_SEP = b':'
def decode_int(x, f):
f += 1
newf = x.index(END_DELIM, f)
n = int(x[f:newf])
if x[f : f + 1] == b'-' and x[f + 1 : f + 2] == b'0':
raise ValueError
elif x[f : f + 1] == b'0' and newf != f + 1:
raise ValueError
return (n, newf + 1)
def decode_string(x, f):
colon = x.index(BYTE_SEP, f)
n = int(x[f:colon])
if x[f : f + 1] == b'0' and colon != f + 1:
raise ValueError
colon += 1
return (x[colon : colon + n], colon + n)
def decode_list(x, f):
r, f = [], f + 1
while x[f : f + 1] != END_DELIM:
v, f = decode_func[x[f : f + 1]](x, f)
r.append(v)
return (r, f + 1)
def decode_dict(x, f):
r, f = {}, f + 1
while x[f : f + 1] != END_DELIM:
k, f = decode_string(x, f)
r[k], f = decode_func[x[f : f + 1]](x, f)
return (r, f + 1)
decode_func = {}
decode_func[LIST_DELIM] = decode_list
decode_func[DICT_DELIM] = decode_dict
decode_func[INT_DELIM] = decode_int
decode_func[b'0'] = decode_string
decode_func[b'1'] = decode_string
decode_func[b'2'] = decode_string
decode_func[b'3'] = decode_string
decode_func[b'4'] = decode_string
decode_func[b'5'] = decode_string
decode_func[b'6'] = decode_string
decode_func[b'7'] = decode_string
decode_func[b'8'] = decode_string
decode_func[b'9'] = decode_string
def bdecode(x):
try:
r, __ = decode_func[x[0:1]](x, 0)
except (LookupError, TypeError, ValueError):
raise BTFailure('Not a valid bencoded string')
else:
return r
class Bencached:
__slots__ = ['bencoded']
def __init__(self, s):
self.bencoded = s
def encode_bencached(x, r):
r.append(x.bencoded)
def encode_int(x, r):
r.extend((INT_DELIM, str(x).encode('utf8'), END_DELIM))
def encode_bool(x, r):
encode_int(1 if x else 0, r)
def encode_string(x, r):
encode_bytes(x.encode('utf8'), r)
def encode_bytes(x, r):
r.extend((str(len(x)).encode('utf8'), BYTE_SEP, x))
def encode_list(x, r):
r.append(LIST_DELIM)
for i in x:
encode_func[type(i)](i, r)
r.append(END_DELIM)
def encode_dict(x, r):
r.append(DICT_DELIM)
for k, v in sorted(x.items()):
try:
k = k.encode('utf8')
except AttributeError:
pass
r.extend((str(len(k)).encode('utf8'), BYTE_SEP, k))
encode_func[type(v)](v, r)
r.append(END_DELIM)
encode_func = {}
encode_func[Bencached] = encode_bencached
encode_func[int] = encode_int
encode_func[list] = encode_list
encode_func[tuple] = encode_list
encode_func[dict] = encode_dict
encode_func[bool] = encode_bool
encode_func[str] = encode_string
encode_func[bytes] = encode_bytes
def bencode(x):
r = []
encode_func[type(x)](x, r)
return b''.join(r)

File diff suppressed because it is too large Load Diff

View File

@ -1,229 +1,486 @@
#
# component.py
# Copyright (C) 2007-2010 Andrew Resch <andrewresch@gmail.com>
#
# Copyright (C) 2007, 2008 Andrew Resch ('andar') <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 2 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.
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
# 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 deluge.log import LOG as log
import logging
import traceback
from collections import defaultdict
from twisted.internet import reactor
from twisted.internet.defer import DeferredList, fail, maybeDeferred, succeed
from twisted.internet.task import LoopingCall, deferLater
log = logging.getLogger(__name__)
class ComponentAlreadyRegistered(Exception):
pass
class ComponentException(Exception):
def __init__(self, message, tb):
super().__init__(message)
self.message = message
self.tb = tb
def __str__(self):
s = super().__str__()
return '{}\n{}'.format(s, ''.join(self.tb))
def __eq__(self, other):
if isinstance(other, self.__class__):
return self.message == other.message
else:
return False
def __ne__(self, other):
return not self.__eq__(other)
COMPONENT_STATE = [
"Stopped",
"Started",
"Paused"
]
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")
"""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`.
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):
"""Initialize component.
Args:
name (str): Name of component.
interval (int, optional): The interval in seconds to call the update function.
depend (list, optional): The names of components this component depends on.
"""
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)
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 fail(result)
if self._component_state == 'Stopped':
if hasattr(self, 'start'):
self._component_state = 'Starting'
d = deferLater(reactor, 0, self.start)
d.addCallbacks(on_start, 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(
ComponentException(
'Trying to start component "%s" but it is '
'not in a stopped state. Current state: %s'
% (self._component_name, self._component_state),
traceback.format_stack(limit=4),
)
)
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(
ComponentException(
'Trying to pause component "%s" but it is '
'not in a started state. Current state: %s'
% (self._component_name, self._component_state),
traceback.format_stack(limit=4),
)
)
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(
ComponentException(
'Trying to resume component "%s" but it is '
'not in a paused state. Current state: %s'
% (self._component_name, self._component_state),
traceback.format_stack(limit=4),
)
)
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 get_state(self):
return self._state
return self._component_state
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)
pass
class ComponentRegistry:
"""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 = {}
# Stores all of the components that are dependent on a particular component
self.dependents = defaultdict(list)
def register(self, obj):
"""Register a component object with the registry.
Note:
This is done automatically when a Component object is instantiated.
Args:
obj (Component): A component object to register.
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
if obj._component_depend:
for depend in obj._component_depend:
self.dependents[depend].append(name)
def deregister(self, obj):
"""Deregister a component from the registry. A stop will be
issued to the component prior to deregistering it.
Args:
obj (Component): a component object to deregister
Returns:
Deferred: a deferred object that will fire once the Component has been
successfully deregistered
"""
if obj in self.components.values():
log.debug('Deregistering Component: %s', obj._component_name)
d = self.stop([obj._component_name])
def on_stop(result, name):
# Component may have been removed, so pop to ensure it doesn't fail
self.components.pop(name, None)
return d.addCallback(on_stop, obj._component_name)
else:
return succeed(None)
def start(self, names=None):
"""Start Components, and their dependencies, that are currently in a Stopped state.
Note:
If no names are specified then all registered components will be started.
Args:
names (list): A list of Components to start and their dependencies.
Returns:
Deferred: Fired once all Components have been successfully started.
"""
# Start all the components if names is empty
if not names:
names = list(self.components)
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=None):
"""Stop Components that are currently not in a Stopped state.
Note:
If no names are specified then all registered components will be stopped.
Args:
names (list): A list of Components to stop.
Returns:
Deferred: Fired once all Components have been successfully stopped.
"""
if not names:
names = list(self.components)
elif isinstance(names, str):
names = [names]
def on_dependents_stopped(result, name):
return self.components[name]._component_stop()
stopped_in_deferred = set()
deferreds = []
for name in names:
if name in stopped_in_deferred:
continue
if name in self.components:
if name in self.dependents:
# If other components depend on this component, stop them first
d = self.stop(self.dependents[name]).addCallback(
on_dependents_stopped, name
)
deferreds.append(d)
stopped_in_deferred.update(self.dependents[name])
else:
deferreds.append(self.components[name]._component_stop())
return DeferredList(deferreds)
def pause(self, names=None):
"""Pause Components that are currently in a Started state.
Note:
If no names are specified then all registered components will be paused.
Args:
names (list): A list of Components to pause.
Returns:
Deferred: Fired once all Components have been successfully paused.
"""
if not names:
names = list(self.components)
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=None):
"""Resume Components that are currently in a Paused state.
Note:
If no names are specified then all registered components will be resumed.
Args:
names (list): A list of Components to to resume.
Returns:
Deferred: Fired once all Components have been successfully resumed.
"""
if not names:
names = list(self.components)
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):
"""Shutdown all Components regardless of state.
This will call stop() on all 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:
Deferred: Fired once all Components have been successfully shut down.
"""
def on_stopped(result):
return DeferredList(
[comp._component_shutdown() for comp in list(self.components.values())]
)
return self.stop(list(self.components)).addCallback(on_stopped)
def update(self):
"""Update all Components that are in a Started state."""
for component in self.components.items():
try:
self.components[component].shutdown()
except Exception, e:
log.debug("Unable to call shutdown(): %s", e)
component.update()
except BaseException as ex:
log.exception(ex)
_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 stop(component=None):
"""Stops all or specified components"""
if component == None:
_ComponentRegistry.stop()
else:
_ComponentRegistry.stop_component(component)
def get(name):
"""Return a reference to a component.
def pause(component=None):
"""Pauses all or specificed components"""
if component == None:
_ComponentRegistry.pause()
else:
_ComponentRegistry.pause_component(component)
Args:
name (str): The Component name to get.
def resume(component=None):
"""Resumes all or specificed components"""
if component == None:
_ComponentRegistry.resume()
else:
_ComponentRegistry.resume_component(component)
def update():
"""Updates all components"""
_ComponentRegistry.update()
Returns:
Component: The Component object.
def shutdown():
"""Shutdowns all components"""
_ComponentRegistry.shutdown()
def get(component):
"""Return a reference to the component"""
return _ComponentRegistry.get(component)
Raises:
KeyError: If the Component does not exist.
"""
return _ComponentRegistry.components[name]

View File

@ -1,176 +1,568 @@
#
# config.py
# Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com>
#
# Copyright (C) 2007 Andrew Resch ('andar') <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 2 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.
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
# 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.
"""Configuration class used to access/create/modify configuration files."""
"""
Deluge Config Module
import cPickle
import os.path
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 json
import logging
import os
import pickle
import shutil
from codecs import getwriter
from tempfile import NamedTemporaryFile
from deluge.common import JSON_FORMAT, get_default_config_dir
log = logging.getLogger(__name__)
def find_json_objects(text, decoder=json.JSONDecoder()):
"""Find json objects in text.
Args:
text (str): The text to find json objects within.
Returns:
list: A list of tuples containing start and end locations of json
objects in the text. e.g. [(start, end), ...]
"""
objects = []
offset = 0
while True:
try:
start = text.index('{', offset)
except ValueError:
break
try:
__, index = decoder.raw_decode(text[start:])
except json.decoder.JSONDecodeError:
offset = start + 1
else:
offset = start + index
objects.append((start, offset))
return objects
def cast_to_existing_type(value, old_value):
"""Attempt to convert new value type to match old value type"""
types_match = isinstance(old_value, (type(None), type(value)))
if value is not None and not types_match:
old_type = type(old_value)
# Skip convert to bytes since requires knowledge of encoding and value should
# be unicode anyway.
if old_type is bytes:
return value
return old_type(value)
return value
import gobject
import deluge.common
from deluge.log import LOG as log
class Config:
"""This class is used to access configuration files."""
def __init__(self, filename, defaults=None, config_dir=None):
log.debug("Config created with filename: %s", filename)
log.debug("Config defaults: %s", defaults)
self.config = {}
self.previous_config = {}
self.set_functions = {}
self._change_callback = None
# If defaults is not None then we need to use "defaults".
if defaults != None:
self.config = defaults
"""This class is used to access/create/modify config files.
Args:
filename (str): The config filename.
defaults (dict): The default config values to insert before loading the config file.
config_dir (str): the path to the config directory.
file_version (int): The file format for the default config values when creating
a fresh config. This value should be increased whenever a new migration function is
setup to convert old config files. (default: 1)
log_mask_funcs (dict): A dict of key:function, used to mask sensitive
key values (e.g. passwords) when logging is enabled.
"""
def __init__(
self,
filename,
defaults=None,
config_dir=None,
file_version=1,
log_mask_funcs=None,
):
self.__config = {}
self.__set_functions = {}
self.__change_callbacks = []
self.__log_mask_funcs = log_mask_funcs if log_mask_funcs else {}
# These hold the version numbers and they will be set when loaded
self.__version = {'format': 1, 'file': file_version}
# This will get set with a reactor.callLater whenever a config option
# is set.
self._save_timer = None
if defaults:
for key, value in defaults.items():
self.set_item(key, value, default=True)
# Load the config from file in the config_dir
if config_dir == None:
self.config_file = deluge.common.get_default_config_dir(filename)
if config_dir:
self.__config_file = os.path.join(config_dir, filename)
else:
self.config_file = os.path.join(config_dir, filename)
self.load(self.config_file)
# Save
self.save()
def __del__(self):
self.save()
def load(self, filename=None):
"""Load a config file either by 'filename' or the filename set during
construction of this object."""
# Use self.config_file if filename is None
if filename is None:
filename = self.config_file
self.__config_file = get_default_config_dir(filename)
self.load()
def callLater(self, period, func, *args, **kwargs): # noqa: N802 ignore camelCase
"""Wrapper around reactor.callLater for test purpose."""
from twisted.internet import reactor
return reactor.callLater(period, func, *args, **kwargs)
def __contains__(self, item):
return item in self.__config
def __setitem__(self, key, value):
"""See set_item"""
return self.set_item(key, value)
def set_item(self, key, value, default=False):
"""Sets item 'key' to 'value' in the config dictionary.
Does not allow 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.
Args:
key (str): Item to change to change.
value (any): The value to change item to, must be same type as what is
currently in the config.
default (optional, bool): When setting a default value skip func or save
callbacks.
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.
Examples:
>>> config = Config('test.conf')
>>> config['test'] = 5
>>> config['test']
5
"""
if isinstance(value, bytes):
value = value.decode()
if key in self.__config:
try:
value = cast_to_existing_type(value, self.__config[key])
except ValueError:
log.warning('Value Type "%s" invalid for key: %s', type(value), key)
raise
else:
if self.__config[key] == value:
return
if log.isEnabledFor(logging.DEBUG):
if key in self.__log_mask_funcs:
value = self.__log_mask_funcs[key](value)
log.debug(
'Setting key "%s" to: %s (of type: %s)',
key,
value,
type(value),
)
self.__config[key] = value
# Skip save or func callbacks if setting default value for keys
if default:
return
# Run the set_function for this key if any
for func in self.__set_functions.get(key, []):
self.callLater(0, func, key, value)
try:
# Un-pickle the file and update the config dictionary
pkl_file = open(filename, "rb")
filedump = cPickle.load(pkl_file)
self.config.update(filedump)
pkl_file.close()
except IOError:
log.warning("IOError: Unable to load file '%s'", filename)
except EOFError:
pkl_file.close()
def do_change_callbacks(key, value):
for func in self.__change_callbacks:
func(key, value)
self.callLater(0, do_change_callbacks, key, value)
except Exception:
pass
# We set the save_timer for 5 seconds if not already set
if not self._save_timer or not self._save_timer.active():
self._save_timer = self.callLater(5, self.save)
def __getitem__(self, key):
"""See get_item"""
return self.get_item(key)
def get_item(self, key):
"""Gets the value of item 'key'.
Args:
key (str): The item for which you want it's value.
Returns:
any: The value of item 'key'.
Raises:
ValueError: If 'key' is not in the config dictionary.
Examples:
>>> config = Config('test.conf', defaults={'test': 5})
>>> config['test']
5
"""
return self.__config[key]
def get(self, key, default=None):
"""Gets the value of item 'key' if key is in the config, else default.
If default is not given, it defaults to None, so that this method
never raises a KeyError.
Args:
key (str): the item for which you want it's value
default (any): the default value if key is missing
Returns:
any: The value of item 'key' or default.
Examples:
>>> config = Config('test.conf', defaults={'test': 5})
>>> config.get('test', 10)
5
>>> config.get('bad_key', 10)
10
"""
try:
return self.get_item(key)
except KeyError:
return default
def __delitem__(self, key):
"""
See
:meth:`del_item`
"""
self.del_item(key)
def del_item(self, key):
"""Deletes item with a specific key from the configuration.
Args:
key (str): The item which you wish to delete.
Raises:
ValueError: If 'key' is not in the config dictionary.
Examples:
>>> config = Config('test.conf', defaults={'test': 5})
>>> del config['test']
"""
del self.__config[key]
# We set the save_timer for 5 seconds if not already set
if not self._save_timer or not self._save_timer.active():
self._save_timer = self.callLater(5, self.save)
def register_change_callback(self, callback):
"""Registers a callback function for any changed value.
Will be called when any value is changed in the config dictionary.
Args:
callback (func): The function to call with parameters: f(key, value).
Examples:
>>> config = Config('test.conf', defaults={'test': 5})
>>> def cb(key, value):
... print key, value
...
>>> config.register_change_callback(cb)
"""
self.__change_callbacks.append(callback)
def register_set_function(self, key, function, apply_now=True):
"""Register a function to be called when a config value changes.
Args:
key (str): The item to monitor for change.
function (func): The function to call when the value changes, f(key, value).
apply_now (bool): If True, the function will be called immediately after it's registered.
Examples:
>>> config = Config('test.conf', defaults={'test': 5})
>>> def cb(key, value):
... print key, value
...
>>> config.register_set_function('test', cb, apply_now=True)
test 5
"""
log.debug('Registering function for %s key..', key)
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:
function(key, self.__config[key])
def apply_all(self):
"""Calls all set functions.
Examples:
>>> config = Config('test.conf', defaults={'test': 5})
>>> def cb(key, value):
... print key, value
...
>>> config.register_set_function('test', cb, apply_now=False)
>>> config.apply_all()
test 5
"""
log.debug('Calling all set functions..')
for key, value in self.__set_functions.items():
for func in value:
func(key, self.__config[key])
def apply_set_functions(self, key):
"""Calls set functions for `:param:key`.
Args:
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):
"""Load a config file.
Args:
filename (str): If None, uses filename set in object initialization
"""
if not filename:
filename = self.__config_file
try:
with open(filename, encoding='utf8') as _file:
data = _file.read()
except OSError as ex:
log.warning('Unable to open config file %s: %s', filename, ex)
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 as ex:
log.exception(ex)
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 as ex:
log.exception(ex)
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 as ex:
log.exception(ex)
log.warning('Unable to load config file: %s', filename)
if not log.isEnabledFor(logging.DEBUG):
return
config = self.__config
if self.__log_mask_funcs:
config = {
key: self.__log_mask_funcs[key](config[key])
if key in self.__log_mask_funcs
else config[key]
for key in config
}
log.debug(
'Config %s version: %s.%s loaded: %s',
filename,
self.__version['format'],
self.__version['file'],
config,
)
def save(self, filename=None):
"""Save configuration to either 'filename' or the filename set during
construction of this object."""
# Saves the config dictionary
if filename is None:
filename = self.config_file
"""Save configuration to disk.
Args:
filename (str): If None, uses filename set in object initialization
Returns:
bool: Whether or not the save succeeded.
"""
if not filename:
filename = self.__config_file
# 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:
pkl_file = open(filename, "rb")
filedump = cPickle.load(pkl_file)
pkl_file.close()
if filedump == self.config:
with open(filename, encoding='utf8') as _file:
data = _file.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
return
except (EOFError, IOError):
log.warning("IOError: Unable to open file: '%s'", filename)
if self._save_timer and self._save_timer.active():
self._save_timer.cancel()
return True
except (OSError, IndexError) as ex:
log.warning('Unable to open config file: %s because: %s', filename, ex)
# Save the new config and make sure it's written to disk
try:
pkl_file = open(filename, "wb")
cPickle.dump(self.config, pkl_file)
pkl_file.close()
except IOError:
log.warning("IOError: Unable to save file '%s'", filename)
def set(self, key, value):
"""Set the 'key' with 'value'."""
# Sets the "key" with "value" in the config dict
if self.config[key] != value:
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 = self.config.copy()
self.config[key] = value
# Run the set_function for this key if any
try:
gobject.idle_add(self.set_functions[key], key, value)
except KeyError:
pass
try:
gobject.idle_add(self._change_callback, key, value)
except:
pass
with NamedTemporaryFile(
prefix=os.path.basename(filename) + '.', delete=False
) as _file:
filename_tmp = _file.name
log.debug('Saving new config file %s', filename_tmp)
json.dump(self.__version, getwriter('utf8')(_file), **JSON_FORMAT)
json.dump(self.__config, getwriter('utf8')(_file), **JSON_FORMAT)
_file.flush()
os.fsync(_file.fileno())
except OSError as ex:
log.error('Error writing new config file: %s', ex)
return False
def get(self, key):
"""Get the value of 'key'. If it is an invalid key then get() will
return None."""
# Attempts to get the "key" value and returns None if the key is
# invalid
# Resolve symlinked config files before backing up and saving.
filename = os.path.realpath(filename)
# Make a backup of the old config
try:
value = self.config[key]
log.debug("Getting '%s' as %s of %s", key, value, type(value))
return value
except KeyError:
log.warning("Key does not exist, returning None")
return None
log.debug('Backing up old config file to %s.bak', filename)
shutil.move(filename, filename + '.bak')
except OSError as ex:
log.warning('Unable to backup old config: %s', ex)
def get_config(self):
"""Returns the entire configuration as a dictionary."""
return self.config
def get_previous_config(self):
"""Returns the config prior to the last set()"""
return self.previous_config
def register_change_callback(self, callback):
"""Registers a callback that will be called when a value is changed"""
self._change_callback = callback
def register_set_function(self, key, function, apply_now=True):
"""Register a function to be run when a config value changes."""
log.debug("Registering function for %s key..", key)
self.set_functions[key] = function
# Run the function now if apply_now is set
if apply_now:
self.set_functions[key](key, self.config[key])
return
def apply_all(self):
"""Runs all set functions"""
log.debug("Running all set functions..")
for key in self.set_functions.keys():
self.set_functions[key](key, self.config[key])
def __getitem__(self, key):
return self.config[key]
# The new config file has been written successfully, so let's move it over
# the existing one.
try:
log.debug('Moving new config file %s to %s', filename_tmp, filename)
shutil.move(filename_tmp, filename)
except OSError as ex:
log.error('Error moving new config file: %s', ex)
return False
else:
return True
finally:
if self._save_timer and self._save_timer.active():
self._save_timer.cancel()
def __setitem__(self, key, value):
self.set(key, value)
def run_converter(self, input_range, output_version, func):
"""Runs a function that will convert file versions.
Args:
input_range (tuple): (int, int) The range of input versions this function will accept.
output_version (int): The version this function will convert to.
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 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 as ex:
log.exception(ex)
log.error(
'There was an exception try to convert config file %s %s to %s',
self.__config_file,
self.__version['file'],
output_version,
)
raise ex
else:
self.__version['file'] = output_version
self.save()
@property
def config_file(self):
return self.__config_file
@property
def config(self):
"""The config dictionary"""
return self.__config
@config.deleter
def config(self):
return self.save()

View File

@ -1,112 +1,127 @@
#
# configmanager.py
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
#
# Copyright (C) 2007 Andrew Resch ('andar') <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 2 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.
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
# 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 logging
import os
import os.path
import deluge.common
from deluge.log import LOG as log
import deluge.log
from deluge.config import Config
log = logging.getLogger(__name__)
class _ConfigManager:
def __init__(self):
log.debug("ConfigManager started..")
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
log.info("Setting config directory to: %s", directory)
"""
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
# Ensure absolute dirpath
directory = os.path.abspath(directory)
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)
self.config_directory = directory
except OSError as ex:
log.error('Unable to make config directory: %s', ex)
return False
elif not os.path.isdir(directory):
log.error('Config directory needs to be a directory!')
return False
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 = {}
deluge.log.tweak_logging_levels()
return True
def get_config_dir(self):
log.debug("get_config_dir: %s", self.config_directory)
return self.config_directory
def close(self, config):
"""Closes a config file."""
try:
del self.config_files[config]
except KeyError:
pass
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
def get_config(self, config_file, defaults=None):
def get_config(self, config_file, defaults=None, file_version=1):
"""Get a reference to the Config object for this filename"""
log.debug("Getting config '%s'", config_file)
log.debug('Getting config: %s', config_file)
# Create the config object if not already created
if config_file not in self.config_files.keys():
self.config_files[config_file] = Config(config_file, defaults, self.config_directory)
if config_file not in self.config_files:
self.config_files[config_file] = Config(
config_file,
defaults,
config_dir=self.config_directory,
file_version=file_version,
)
return self.config_files[config_file]
# Singleton functions
_configmanager = _ConfigManager()
def ConfigManager(config, defaults=None):
return _configmanager.get_config(config, defaults)
def ConfigManager(config, defaults=None, file_version=1): # NOQA: N802
return _configmanager.get_config(
config, defaults=defaults, file_version=file_version
)
def set_config_dir(directory):
"""Sets the config directory, else just uses default"""
return _configmanager.set_config_dir(directory)
return _configmanager.set_config_dir(deluge.common.decode_bytes(directory))
def get_config_dir(filename=None):
if filename != None:
if filename is not None:
return os.path.join(_configmanager.get_config_dir(), filename)
else:
return _configmanager.get_config_dir()
def close(config):
return _configmanager.close(config)

192
deluge/conftest.py Normal file
View File

@ -0,0 +1,192 @@
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import tempfile
import warnings
from unittest.mock import Mock, patch
import pytest
import pytest_twisted
from twisted.internet import reactor
from twisted.internet.defer import Deferred, maybeDeferred
from twisted.internet.error import CannotListenError
from twisted.python.failure import Failure
import deluge.component as _component
import deluge.configmanager
from deluge.common import get_localhost_auth
from deluge.tests import common
from deluge.ui.client import client as _client
DEFAULT_LISTEN_PORT = 58900
@pytest.fixture
def listen_port(request):
if request and 'daemon' in request.fixturenames:
try:
return request.getfixturevalue('daemon').listen_port
except Exception:
pass
return DEFAULT_LISTEN_PORT
@pytest.fixture
def mock_callback():
"""Returns a `Mock` object which can be registered as a callback to test against.
If callback was not called within `timeout` seconds, it will raise a TimeoutError.
The returned Mock instance will have a `deferred` attribute which will complete when the callback has been called.
"""
def reset():
if mock.called:
original_reset_mock()
deferred = Deferred()
deferred.addTimeout(0.5, reactor)
mock.side_effect = lambda *args, **kw: deferred.callback((args, kw))
mock.deferred = deferred
mock = Mock()
original_reset_mock = mock.reset_mock
mock.reset_mock = reset
mock.reset_mock()
return mock
@pytest.fixture
def config_dir(tmp_path):
deluge.configmanager.set_config_dir(tmp_path)
yield tmp_path
@pytest_twisted.async_yield_fixture()
async def client(request, config_dir, monkeypatch, listen_port):
# monkeypatch.setattr(
# _client, 'connect', functools.partial(_client.connect, port=listen_port)
# )
try:
username, password = get_localhost_auth()
except Exception:
username, password = '', ''
await _client.connect(
'localhost',
port=listen_port,
username=username,
password=password,
)
yield _client
if _client.connected():
await _client.disconnect()
@pytest_twisted.async_yield_fixture
async def daemon(request, config_dir):
listen_port = DEFAULT_LISTEN_PORT
logfile = f'daemon_{request.node.name}.log'
if hasattr(request.cls, 'daemon_custom_script'):
custom_script = request.cls.daemon_custom_script
else:
custom_script = ''
for dummy in range(10):
try:
d, daemon = common.start_core(
listen_port=listen_port,
logfile=logfile,
timeout=5,
timeout_msg='Timeout!',
custom_script=custom_script,
print_stdout=True,
print_stderr=True,
config_directory=config_dir,
)
await d
except CannotListenError as ex:
exception_error = ex
listen_port += 1
except (KeyboardInterrupt, SystemExit):
raise
else:
break
else:
raise exception_error
daemon.listen_port = listen_port
yield daemon
await daemon.kill()
@pytest.fixture(autouse=True)
def common_fixture(config_dir, request, monkeypatch, listen_port):
"""Adds some instance attributes to test classes for backwards compatibility with old testing."""
def fail(self, reason):
if isinstance(reason, Failure):
reason = reason.value
return pytest.fail(str(reason))
if request.instance:
request.instance.patch = monkeypatch.setattr
request.instance.config_dir = config_dir
request.instance.listen_port = listen_port
request.instance.id = lambda: request.node.name
request.cls.fail = fail
@pytest_twisted.async_yield_fixture(scope='function')
async def component(request):
"""Verify component registry is clean, and clean up after test."""
if len(_component._ComponentRegistry.components) != 0:
warnings.warn(
'The component._ComponentRegistry.components is not empty on test setup.\n'
'This is probably caused by another test that did not clean up after finishing!: %s'
% _component._ComponentRegistry.components
)
yield _component
await _component.shutdown()
_component._ComponentRegistry.components.clear()
_component._ComponentRegistry.dependents.clear()
@pytest_twisted.async_yield_fixture(scope='function')
async def base_fixture(common_fixture, component, request):
"""This fixture is autoused on all tests that subclass BaseTestCase"""
self = request.instance
if hasattr(self, 'set_up'):
try:
await maybeDeferred(self.set_up)
except Exception as exc:
warnings.warn('Error caught in test setup!\n%s' % exc)
pytest.fail('Error caught in test setup!\n%s' % exc)
yield
if hasattr(self, 'tear_down'):
try:
await maybeDeferred(self.tear_down)
except Exception as exc:
pytest.fail('Error caught in test teardown!\n%s' % exc)
@pytest.mark.usefixtures('base_fixture')
class BaseTestCase:
"""This is the base class that should be used for all test classes
that create classes that inherit from deluge.component.Component. It
ensures that the component registry has been cleaned up when tests
have finished.
"""
@pytest.fixture
def mock_mkstemp(tmp_path):
"""Return known tempfile location to verify file deleted"""
tmp_file = tempfile.mkstemp(dir=tmp_path)
with patch('tempfile.mkstemp', return_value=tmp_file):
yield tmp_file

View File

@ -1,109 +1,142 @@
#
# alertmanager.py
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
# Copyright (C) 2007 Andrew Resch ('andar') <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 2 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.
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
# 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."""
"""
import gobject
The AlertManager handles all the libtorrent alerts.
This should typically only be used by the Core. Plugins should utilize the
`:mod:EventManager` for similar functionality.
"""
import logging
from types import SimpleNamespace
from twisted.internet import reactor
import deluge.component as component
import deluge.libtorrent as lt
from deluge.log import LOG as log
from deluge._libtorrent import lt
from deluge.common import decode_bytes
log = logging.getLogger(__name__)
class AlertManager(component.Component):
def __init__(self, session):
log.debug("AlertManager initialized..")
component.Component.__init__(self, "AlertManager", interval=50)
self.session = 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)
"""AlertManager fetches and processes libtorrent alerts"""
def __init__(self):
log.debug('AlertManager init...')
component.Component.__init__(self, 'AlertManager', interval=0.3)
self.session = component.get('Core').session
# Increase the alert queue size so that alerts don't get lost.
self.alert_queue_size = 10000
self.set_alert_queue_size(self.alert_queue_size)
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.performance_warning
| lt.alert.category_t.file_progress_notification
)
self.session.apply_settings({'alert_mask': alert_mask})
# 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 delayed_call in self.delayed_calls:
if delayed_call.active():
delayed_call.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] = []
# Append the handler to the list in the handlers dictionary
self.handlers[alert_type].append(handler)
log.debug("Registered handler for alert %s", alert_type)
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 (dummy_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."""
alert = self.session.pop_alert()
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(".")[2]
# 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():
for handler in self.handlers[alert_type]:
if not wait:
gobject.idle_add(handler, alert)
else:
handler(alert)
alert = self.session.pop_alert()
# Return True so that the timer continues
return True
def handle_alerts(self):
"""
Pops all libtorrent alerts in the session queue and handles them appropriately.
"""
alerts = self.session.pop_alerts()
if not alerts:
return
num_alerts = len(alerts)
if log.isEnabledFor(logging.DEBUG):
log.debug('Alerts queued: %s', num_alerts)
if num_alerts > 0.9 * self.alert_queue_size:
log.warning(
'Warning total alerts queued, %s, passes 90%% of queue size.',
num_alerts,
)
# Loop through all alerts in the queue
for alert in alerts:
alert_type = type(alert).__name__
# Display the alert message
if log.isEnabledFor(logging.DEBUG):
log.debug('%s: %s', alert_type, decode_bytes(alert.message()))
# Call any handlers for this alert type
if alert_type in self.handlers:
for handler in self.handlers[alert_type]:
if log.isEnabledFor(logging.DEBUG):
log.debug('Handling alert: %s', alert_type)
# Copy alert attributes
alert_copy = SimpleNamespace(
**{
attr: getattr(alert, attr)
for attr in dir(alert)
if not attr.startswith('__')
}
)
self.delayed_calls.append(reactor.callLater(0, handler, alert_copy))
def set_alert_queue_size(self, queue_size):
"""Sets the maximum size of the libtorrent alert queue"""
log.info('Alert Queue Size set to %s', queue_size)
self.alert_queue_size = queue_size
component.get('Core').apply_session_setting(
'alert_queue_size', self.alert_queue_size
)

285
deluge/core/authmanager.py Normal file
View File

@ -0,0 +1,285 @@
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2011 Pedro Algarvio <pedro@algarvio.me>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import logging
import os
import shutil
import deluge.component as component
import deluge.configmanager as configmanager
from deluge.common import (
AUTH_LEVEL_ADMIN,
AUTH_LEVEL_DEFAULT,
AUTH_LEVEL_NONE,
AUTH_LEVEL_NORMAL,
AUTH_LEVEL_READONLY,
create_localclient_account,
)
from deluge.error import AuthenticationRequired, AuthManagerError, BadLoginError
log = logging.getLogger(__name__)
AUTH_LEVELS_MAPPING = {
'NONE': AUTH_LEVEL_NONE,
'READONLY': AUTH_LEVEL_READONLY,
'DEFAULT': AUTH_LEVEL_DEFAULT,
'NORMAL': AUTH_LEVEL_NORMAL,
'ADMIN': AUTH_LEVEL_ADMIN,
}
AUTH_LEVELS_MAPPING_REVERSE = {v: k for k, v in AUTH_LEVELS_MAPPING.items()}
class Account:
__slots__ = ('username', 'password', 'authlevel')
def __init__(self, username, password, authlevel):
self.username = username
self.password = password
self.authlevel = authlevel
def data(self):
return {
'username': self.username,
'password': self.password,
'authlevel': AUTH_LEVELS_MAPPING_REVERSE[self.authlevel],
'authlevel_int': self.authlevel,
}
def __repr__(self):
return '<Account username="{username}" authlevel={authlevel}>'.format(
username=self.username,
authlevel=self.authlevel,
)
class AuthManager(component.Component):
def __init__(self):
component.Component.__init__(self, 'AuthManager', interval=10)
self.__auth = {}
self.__auth_modification_time = None
def start(self):
self.__load_auth_file()
def stop(self):
self.__auth = {}
def shutdown(self):
pass
def update(self):
auth_file = configmanager.get_config_dir('auth')
# Check for auth file and create if necessary
if not os.path.isfile(auth_file):
log.info('Authfile not found, recreating it.')
self.__load_auth_file()
return
auth_file_modification_time = os.stat(auth_file).st_mtime
if self.__auth_modification_time != auth_file_modification_time:
log.info('Auth file changed, reloading it!')
self.__load_auth_file()
def authorize(self, username, password):
"""Authorizes users based on username and password.
Args:
username (str): Username
password (str): Password
Returns:
int: The auth level for this user.
Raises:
AuthenticationRequired: If additional details are required to authenticate.
BadLoginError: If the username does not exist or password does not match.
"""
if not username:
raise AuthenticationRequired(
'Username and Password are required.', username
)
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:
raise BadLoginError('Username does not exist', username)
if self.__auth[username].password == password:
# Return the users auth level
return self.__auth[username].authlevel
elif not password and self.__auth[username].password:
raise AuthenticationRequired('Password is required', username)
else:
raise BadLoginError('Password does not match', username)
def has_account(self, username):
return username in self.__auth
def get_known_accounts(self):
"""Returns a list of known deluge usernames."""
self.__load_auth_file()
return [account.data() for account in self.__auth.values()]
def create_account(self, username, password, authlevel):
if username in self.__auth:
raise AuthManagerError('Username in use.', username)
if authlevel not in AUTH_LEVELS_MAPPING:
raise AuthManagerError('Invalid auth level: %s' % authlevel)
try:
self.__auth[username] = Account(
username, password, AUTH_LEVELS_MAPPING[authlevel]
)
self.write_auth_file()
return True
except Exception as ex:
log.exception(ex)
raise ex
def update_account(self, username, password, authlevel):
if username not in self.__auth:
raise AuthManagerError('Username not known', username)
if authlevel not in AUTH_LEVELS_MAPPING:
raise AuthManagerError('Invalid auth level: %s' % authlevel)
try:
self.__auth[username].username = username
self.__auth[username].password = password
self.__auth[username].authlevel = AUTH_LEVELS_MAPPING[authlevel]
self.write_auth_file()
return True
except Exception as ex:
log.exception(ex)
raise ex
def remove_account(self, username):
if username not in self.__auth:
raise AuthManagerError('Username not known', username)
elif username == component.get('RPCServer').get_session_user():
raise AuthManagerError(
'You cannot delete your own account while logged in!', username
)
del self.__auth[username]
self.write_auth_file()
return True
def write_auth_file(self):
filename = 'auth'
filepath = os.path.join(configmanager.get_config_dir(), filename)
filepath_bak = filepath + '.bak'
filepath_tmp = filepath + '.tmp'
try:
if os.path.isfile(filepath):
log.debug('Creating backup of %s at: %s', filename, filepath_bak)
shutil.copy2(filepath, filepath_bak)
except OSError as ex:
log.error('Unable to backup %s to %s: %s', filepath, filepath_bak, ex)
else:
log.info('Saving the %s at: %s', filename, filepath)
try:
with open(filepath_tmp, 'w', encoding='utf8') as _file:
for account in self.__auth.values():
_file.write(
'%(username)s:%(password)s:%(authlevel_int)s\n'
% account.data()
)
_file.flush()
os.fsync(_file.fileno())
shutil.move(filepath_tmp, filepath)
except OSError as ex:
log.error('Unable to save %s: %s', filename, ex)
if os.path.isfile(filepath_bak):
log.info('Restoring backup of %s from: %s', filename, filepath_bak)
shutil.move(filepath_bak, filepath)
self.__load_auth_file()
def __load_auth_file(self):
save_and_reload = False
filename = 'auth'
auth_file = configmanager.get_config_dir(filename)
auth_file_bak = auth_file + '.bak'
# Check for auth file and create if necessary
if not os.path.isfile(auth_file):
create_localclient_account()
return self.__load_auth_file()
auth_file_modification_time = os.stat(auth_file).st_mtime
if self.__auth_modification_time is None:
self.__auth_modification_time = auth_file_modification_time
elif self.__auth_modification_time == auth_file_modification_time:
# File didn't change, no need for re-parsing's
return
for _filepath in (auth_file, auth_file_bak):
log.info('Opening %s for load: %s', filename, _filepath)
try:
with open(_filepath, encoding='utf8') as _file:
file_data = _file.readlines()
except OSError as ex:
log.warning('Unable to load %s: %s', _filepath, ex)
file_data = []
else:
log.info('Successfully loaded %s: %s', filename, _filepath)
break
# Load the auth file into a dictionary: {username: Account(...)}
for line in file_data:
line = line.strip()
if line.startswith('#') or not line:
# This line is a comment or empty
continue
lsplit = line.split(':')
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,
)
if username == 'localclient':
authlevel = AUTH_LEVEL_ADMIN
else:
authlevel = AUTH_LEVEL_DEFAULT
# This is probably an old auth file
save_and_reload = True
elif len(lsplit) == 3:
username, password, authlevel = lsplit
else:
log.error('Your auth file is malformed: Incorrect number of fields!')
continue
username = username.strip()
password = password.strip()
try:
authlevel = int(authlevel)
except ValueError:
try:
authlevel = AUTH_LEVELS_MAPPING[authlevel]
except KeyError:
log.error(
'Your auth file is malformed: %r is not a valid auth level',
authlevel,
)
continue
self.__auth[username] = Account(username, password, authlevel)
if 'localclient' not in self.__auth:
create_localclient_account(True)
return self.__load_auth_file()
if save_and_reload:
log.info('Re-writing auth file (upgrade)')
self.write_auth_file()
self.__auth_modification_time = auth_file_modification_time

View File

@ -1,125 +0,0 @@
#
# autoadd.py
#
# Copyright (C) 2008 Andrew Resch ('andar') <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 2 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 os
import deluge.libtorrent as lt
import deluge.component as component
from deluge.configmanager import ConfigManager
from deluge.log import LOG as log
MAX_NUM_ATTEMPTS = 10
class AutoAdd(component.Component):
def __init__(self):
component.Component.__init__(self, "AutoAdd", depend=["TorrentManager"], interval=3000)
# Get the core config
self.config = ConfigManager("core.conf")
# A list of filenames
self.invalid_torrents = []
# Filename:Attempts
self.attempts = {}
# Register set functions
self.config.register_set_function("autoadd_enable",
self._on_autoadd_enable, apply_now=True)
self.config.register_set_function("autoadd_location",
self._on_autoadd_location)
def update(self):
if not self.config["autoadd_enable"]:
# We shouldn't be updating because autoadd is not enabled
component.pause("AutoAdd")
return
# Check the auto add folder for new torrents to add
if not os.path.exists(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":
filepath = os.path.join(self.config["autoadd_location"], filename)
try:
filedump = self.load_torrent(filepath)
except Exception, e:
# If the torrent is invalid, we keep track of it so that we
# can try again on the next pass. This is because some
# torrents may not be fully saved during the pass.
log.debug("Torrent is invalid: %s", e)
if filename in self.invalid_torrents:
self.attempts[filename] += 1
if self.attempts[filename] >= MAX_NUM_ATTEMPTS:
os.rename(filepath, filepath + ".invalid")
del self.attempts[filename]
self.invalid_torrents.remove(filename)
else:
self.invalid_torrents.append(filename)
self.attempts[filename] = 1
continue
# The torrent looks good, so lets add it to the session
component.get("TorrentManager").add(filedump=filedump, filename=filename)
os.remove(filepath)
def load_torrent(self, filename):
try:
log.debug("Attempting to open %s for add.", filename)
_file = open(filename, "rb")
filedump = _file.read()
_file.close()
except IOError, e:
log.warning("Unable to open %s: %s", filename, e)
raise e
# Get the info to see if any exceptions are raised
info = lt.torrent_info(lt.bdecode(filedump))
return filedump
def _on_autoadd_enable(self, key, value):
log.debug("_on_autoadd_enable")
if value:
component.resume("AutoAdd")
else:
component.pause("AutoAdd")
def _on_autoadd_location(self, key, value):
log.debug("_on_autoadd_location")
# We need to resume the component just incase it was paused due to
# an invalid autoadd location.
if self.config["autoadd_enable"]:
component.resume("AutoAdd")

File diff suppressed because it is too large Load Diff

View File

@ -1,53 +1,203 @@
#
# daemon.py
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
# Copyright (C) 2007 Andrew Resch ('andar') <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 2 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.
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
# 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.configmanager
import deluge.common
from deluge.log import LOG as log
"""The Deluge daemon"""
import logging
import os
import socket
from twisted.internet import reactor
import deluge.component as component
from deluge.common import get_version, is_ip, is_process_running, windows_check
from deluge.configmanager import get_config_dir
from deluge.core.core import Core
from deluge.core.rpcserver import RPCServer, export
from deluge.error import DaemonRunningError
if windows_check():
from win32api import SetConsoleCtrlHandler
from win32con import CTRL_CLOSE_EVENT, CTRL_SHUTDOWN_EVENT
log = logging.getLogger(__name__)
def is_daemon_running(pid_file):
"""
Check for another running instance of the daemon using the same pid file.
Args:
pid_file: The location of the file with pid, port values.
Returns:
bool: True is daemon is running, False otherwise.
"""
try:
with open(pid_file) as _file:
pid, port = (int(x) for x in _file.readline().strip().split(';'))
except (OSError, ValueError):
return False
if is_process_running(pid):
# Ensure it's a deluged process by trying to open a socket to it's port.
_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
_socket.connect(('127.0.0.1', port))
except OSError:
# Can't connect, so pid is not a deluged process.
return False
else:
# This is a deluged process!
_socket.close()
return True
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)
"""The Deluge Daemon class"""
def __init__(
self,
listen_interface=None,
outgoing_interface=None,
interface=None,
port=None,
standalone=False,
read_only_config_keys=None,
):
"""
Args:
listen_interface (str, optional): The IP address to listen to
BitTorrent connections on.
outgoing_interface (str, optional): The network interface name or
IP address to open outgoing BitTorrent connections on.
interface (str, optional): The IP address the daemon will
listen for UI connections on.
port (int, optional): The port the daemon will listen for UI
connections on.
standalone (bool, optional): If True the client is in Standalone
mode otherwise, if False, start the daemon as separate process.
read_only_config_keys (list of str, optional): A list of config
keys that will not be altered by core.set_config() RPC method.
"""
self.standalone = standalone
self.pid_file = get_config_dir('deluged.pid')
log.info('Deluge daemon %s', get_version())
if is_daemon_running(self.pid_file):
raise DaemonRunningError(
'Deluge daemon already running with this config directory!'
)
# 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 windows_check():
def win_handler(ctrl_type):
"""Handle the Windows shutdown or close events."""
log.debug('windows handler ctrl_type: %s', ctrl_type)
if ctrl_type == CTRL_CLOSE_EVENT or ctrl_type == CTRL_SHUTDOWN_EVENT:
self._shutdown()
return 1
SetConsoleCtrlHandler(win_handler)
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,
outgoing_interface=outgoing_interface,
read_only_config_keys=read_only_config_keys,
)
if port is None:
port = self.core.config['daemon_port']
self.port = port
if interface and not is_ip(interface):
log.error('Invalid UI interface (must be IP Address): %s', interface)
interface = None
self.rpcserver = RPCServer(
port=port,
allow_remote=self.core.config['allow_remote'],
listen=not standalone,
interface=interface,
)
log.debug(
'Listening to UI on: %s:%s and bittorrent on: %s Making connections out on: %s',
interface,
port,
listen_interface,
outgoing_interface,
)
def start(self):
# 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 self.standalone:
log.info('Deluge daemon starting...')
# Create pid file to track if deluged is running, also includes the port number.
pid = os.getpid()
log.debug('Storing pid %s & port %s in: %s', pid, self.port, self.pid_file)
with open(self.pid_file, 'w') as _file:
_file.write(f'{pid};{self.port}\n')
component.start()
try:
reactor.run()
finally:
log.debug('Remove pid file: %s', self.pid_file)
os.remove(self.pid_file)
log.info('Deluge daemon shutdown successfully')
@export()
def shutdown(self, *args, **kwargs):
log.debug('Deluge daemon shutdown requested...')
reactor.callLater(0, reactor.stop)
def _shutdown(self, *args, **kwargs):
log.info('Deluge daemon shutting down, waiting for components to shutdown...')
if not self.standalone:
return component.shutdown()
@export()
def get_method_list(self):
"""Returns a list of the exported methods."""
return self.rpcserver.get_method_list()
@export()
def get_version(self):
"""Returns the daemon version"""
return get_version()
@export(1)
def authorized_call(self, rpc):
"""Determines if session auth_level is authorized to call RPC.
Args:
rpc (str): A RPC, e.g. core.get_torrents_status
Returns:
bool: True if authorized to call RPC, otherwise False.
"""
if rpc not in self.get_method_list():
return False
return (
self.rpcserver.get_session_auth_level()
>= self.rpcserver.get_rpc_auth_level(rpc)
)

140
deluge/core/daemon_entry.py Normal file
View File

@ -0,0 +1,140 @@
#
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2010 Pedro Algarvio <pedro@algarvio.me>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import os
import sys
from logging import DEBUG, FileHandler, getLogger
from twisted.internet.error import CannotListenError
from deluge.argparserbase import ArgParserBase
from deluge.common import run_profiled
from deluge.configmanager import get_config_dir
from deluge.i18n import setup_mock_translation
def add_daemon_options(parser):
group = parser.add_argument_group(_('Daemon Options'))
group.add_argument(
'-u',
'--ui-interface',
metavar='<ip-addr>',
action='store',
help=_('IP address to listen for UI connections'),
)
group.add_argument(
'-p',
'--port',
metavar='<port>',
action='store',
type=int,
help=_('Port to listen for UI connections on'),
)
group.add_argument(
'-i',
'--interface',
metavar='<ip-addr>',
dest='listen_interface',
action='store',
help=_('IP address to listen for BitTorrent connections'),
)
group.add_argument(
'-o',
'--outgoing-interface',
metavar='<interface>',
dest='outgoing_interface',
action='store',
help=_(
'The network interface name or IP address for outgoing BitTorrent connections.'
),
)
group.add_argument(
'--read-only-config-keys',
metavar='<comma-separated-keys>',
action='store',
help=_('Config keys to be unmodified by `set_config` RPC'),
type=str,
default='',
)
parser.add_process_arg_group()
def start_daemon(skip_start=False):
"""
Entry point for daemon script
Args:
skip_start (bool): If starting daemon should be skipped.
Returns:
deluge.core.daemon.Daemon: A new daemon object
"""
setup_mock_translation()
# Setup the argument parser
parser = ArgParserBase()
add_daemon_options(parser)
options = parser.parse_args()
# Check for any daemons running with this same config
from deluge.core.daemon import is_daemon_running
pid_file = get_config_dir('deluged.pid')
if is_daemon_running(pid_file):
print(
'Cannot run multiple daemons with same config directory.\n'
'If you believe this is an error, force starting by deleting: %s' % pid_file
)
sys.exit(1)
log = getLogger(__name__)
# If no logfile specified add logging to default location (as well as stdout)
if not options.logfile:
options.logfile = get_config_dir('deluged.log')
file_handler = FileHandler(options.logfile)
log.addHandler(file_handler)
def run_daemon(options):
try:
from deluge.core.daemon import Daemon
daemon = Daemon(
listen_interface=options.listen_interface,
outgoing_interface=options.outgoing_interface,
interface=options.ui_interface,
port=options.port,
read_only_config_keys=options.read_only_config_keys.split(','),
)
if skip_start:
return daemon
else:
daemon.start()
except CannotListenError as ex:
log.error(
'Cannot start deluged, listen port in use.\n'
' Check for other running daemons or services using this port: %s:%s',
ex.interface,
ex.port,
)
sys.exit(1)
except Exception as ex:
log.error('Unable to start deluged: %s', ex)
if log.isEnabledFor(DEBUG):
log.exception(ex)
sys.exit(1)
finally:
log.info('Exiting...')
if options.pidfile:
os.remove(options.pidfile)
return run_profiled(
run_daemon, options, output_file=options.profile, do_profile=options.profile
)

View File

@ -0,0 +1,66 @@
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import logging
import deluge.component as component
log = logging.getLogger(__name__)
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 as ex:
log.error(
'Event handler %s failed in %s with exception %s',
event.name,
handler,
ex,
)
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

@ -0,0 +1,274 @@
#
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import logging
import deluge.component as component
from deluge.common import TORRENT_STATE
log = logging.getLogger(__name__)
STATE_SORT = ['All', 'Active'] + TORRENT_STATE
# Special purpose filters:
def filter_keywords(torrent_ids, values):
# Cleanup
keywords = ','.join([v.lower() for v in values])
keywords = keywords.split(',')
for keyword in keywords:
torrent_ids = filter_one_keyword(torrent_ids, keyword)
return torrent_ids
def filter_one_keyword(torrent_ids, keyword):
"""
search torrent on keyword.
searches title,state,tracker-status,tracker,files
"""
all_torrents = component.get('TorrentManager').torrents
for torrent_id in torrent_ids:
torrent = all_torrents[torrent_id]
if keyword in torrent.filename.lower():
yield torrent_id
elif keyword in torrent.state.lower():
yield torrent_id
elif torrent.trackers and keyword in torrent.trackers[0]['url']:
yield torrent_id
elif keyword in torrent_id:
yield torrent_id
# Want to find broken torrents (search on "error", or "unregistered")
elif keyword in torrent.tracker_status.lower():
yield torrent_id
else:
for t_file in torrent.get_files():
if keyword in t_file['path'].lower():
yield torrent_id
break
def filter_by_name(torrent_ids, search_string):
all_torrents = component.get('TorrentManager').torrents
try:
search_string, match_case = search_string[0].split('::match')
except ValueError:
search_string = search_string[0]
match_case = False
if match_case is False:
search_string = search_string.lower()
for torrent_id in torrent_ids:
torrent_name = all_torrents[torrent_id].get_name()
if match_case is False:
torrent_name = all_torrents[torrent_id].get_name().lower()
else:
torrent_name = all_torrents[torrent_id].get_name()
if search_string in torrent_name:
yield torrent_id
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 torrent's tracker_status for 'Error:' and return those torrent_ids
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"""
def __init__(self, core):
component.Component.__init__(self, 'FilterManager')
log.debug('FilterManager init..')
self.core = core
self.torrents = core.torrentmanager
self.registered_filters = {}
self.register_filter('keyword', filter_keywords)
self.register_filter('name', filter_by_name)
self.tree_fields = {}
self.register_tree_field('state', self._init_state_tree)
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 _init_users_tree():
return {'': 0}
self.register_tree_field('owner', _init_users_tree)
def filter_torrent_ids(self, filter_dict):
"""
returns a list of torrent_id's matching filter_dict.
core filter method
"""
if not filter_dict:
return self.torrents.get_torrent_list()
# 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]
# Optimized filter for id
if 'id' in filter_dict:
torrent_ids = list(filter_dict['id'])
del filter_dict['id']
else:
torrent_ids = self.torrents.get_torrent_list()
# Return if there's nothing more to filter
if not filter_dict:
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']:
del filter_dict['state']
torrent_ids = self.filter_state_active(torrent_ids)
if not filter_dict:
return torrent_ids
# Registered filters
for field, values in list(filter_dict.items()):
if field in self.registered_filters:
# Filters out doubles
torrent_ids = list(
set(self.registered_filters[field](torrent_ids, values))
)
del filter_dict[field]
if not filter_dict:
return torrent_ids
torrent_keys, plugin_keys = self.torrents.separate_keys(
list(filter_dict), torrent_ids
)
# Leftover filter arguments, default filter on status fields.
for torrent_id in list(torrent_ids):
status = self.core.create_torrent_status(
torrent_id, torrent_keys, plugin_keys
)
for field, values in filter_dict.items():
if field in status and status[field] in values:
continue
elif torrent_id in torrent_ids:
torrent_ids.remove(torrent_id)
return torrent_ids
def get_filter_tree(self, show_zero_hits=True, hide_cat=None):
"""
returns {field: [(value,count)] }
for use in sidebar.
"""
torrent_ids = self.torrents.get_torrent_list()
tree_keys = list(self.tree_fields)
if hide_cat:
for cat in hide_cat:
tree_keys.remove(cat)
torrent_keys, plugin_keys = self.torrents.separate_keys(tree_keys, torrent_ids)
items = {field: self.tree_fields[field]() for field in tree_keys}
for torrent_id in list(torrent_ids):
status = self.core.create_torrent_status(
torrent_id, torrent_keys, plugin_keys
) # status={key:value}
for field in tree_keys:
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 not show_zero_hits:
for cat in ['state', 'owner', 'tracker_host']:
if cat in tree_keys:
self._hide_state_items(items[cat])
# Return a dict of tuples:
sorted_items = {field: sorted(items[field].items()) for field in tree_keys}
if 'state' in tree_keys:
sorted_items['state'].sort(key=self._sort_state_item)
return sorted_items
def _init_state_tree(self):
init_state = {}
init_state['All'] = len(self.torrents.get_torrent_list())
for state in TORRENT_STATE:
init_state[state] = 0
init_state['Active'] = len(
self.filter_state_active(self.torrents.get_torrent_list())
)
return init_state
def register_filter(self, filter_id, filter_func, filter_value=None):
self.registered_filters[filter_id] = filter_func
def deregister_filter(self, filter_id):
del self.registered_filters[filter_id]
def register_tree_field(self, field, init_func=lambda: {}):
self.tree_fields[field] = init_func
def deregister_tree_field(self, field):
if field in self.tree_fields:
del self.tree_fields[field]
def filter_state_active(self, torrent_ids):
for torrent_id in list(torrent_ids):
status = self.torrents[torrent_id].get_status(
['download_payload_rate', 'upload_payload_rate']
)
if status['download_payload_rate'] or status['upload_payload_rate']:
pass
else:
torrent_ids.remove(torrent_id)
return torrent_ids
def _hide_state_items(self, state_items):
"""For hide(show)-zero hits"""
for value, count in list(state_items.items()):
if value != 'All' and count == 0:
del state_items[value]
def _sort_state_item(self, item):
try:
return STATE_SORT.index(item[0])
except ValueError:
return 99

View File

@ -1,162 +1,105 @@
#
# pluginmanager.py
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
#
# Copyright (C) 2007 Andrew Resch ('andar') <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 2 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.
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
# 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 logging
import gobject
from twisted.internet import defer
import deluge.pluginmanagerbase
import deluge.component as component
from deluge.log import LOG as log
import deluge.pluginmanagerbase
from deluge.event import PluginDisabledEvent, PluginEnabledEvent
class PluginManager(deluge.pluginmanagerbase.PluginManagerBase,
component.Component):
log = logging.getLogger(__name__)
class PluginManager(deluge.pluginmanagerbase.PluginManagerBase, component.Component):
"""PluginManager handles the loading of plugins and provides plugins with
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 = {}
# Call the PluginManagerBase constructor
deluge.pluginmanagerbase.PluginManagerBase.__init__(
self, "core.conf", "deluge.plugin.core")
self, 'core.conf', 'deluge.plugin.core'
)
def start(self):
# 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)
self.disable_plugins()
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
def get_core(self):
"""Returns a reference to the core"""
return self.core
def register_status_field(self, field, function):
"""Register a new status field. This can be used in the same way the
client requests other status information from core."""
log.debug("Registering status field %s with PluginManager", field)
self.status_fields[field] = function
def deregister_status_field(self, field):
"""Deregisters a status field"""
log.debug("Deregistering status field %s with PluginManager", field)
try:
del self.status_fields[field]
except:
log.warning("Unable to deregister status field %s", field)
def update_plugins(self):
for plugin in self.plugins:
if hasattr(self.plugins[plugin], 'update'):
try:
self.plugins[plugin].update()
except Exception as ex:
log.exception(ex)
def enable_plugin(self, name):
d = defer.succeed(True)
if name not in self.plugins:
d = deluge.pluginmanagerbase.PluginManagerBase.enable_plugin(self, name)
def on_enable_plugin(result):
if result is True and name in self.plugins:
component.get('EventManager').emit(PluginEnabledEvent(name))
return result
d.addBoth(on_enable_plugin)
return d
def disable_plugin(self, name):
d = defer.succeed(True)
if name in self.plugins:
d = deluge.pluginmanagerbase.PluginManagerBase.disable_plugin(self, name)
def on_disable_plugin(result):
if name not in self.plugins:
component.get('EventManager').emit(PluginDisabledEvent(name))
return result
d.addBoth(on_disable_plugin)
return d
def get_status(self, torrent_id, fields):
"""Return the value of status fields for the selected torrent_id."""
status = {}
if len(fields) == 0:
fields = list(self.status_fields)
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)
pass
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()
def register_status_field(self, field, function):
"""Register a new status field. This can be used in the same way the
client requests other status information from core."""
log.debug('Registering status field %s with PluginManager', field)
self.status_fields[field] = function
def deregister_status_field(self, field):
"""Deregisters a status field"""
log.debug('Deregistering status field %s with PluginManager', field)
try:
del self.status_fields[field]
except Exception:
log.warning('Unable to deregister status field %s', field)

View File

@ -0,0 +1,476 @@
#
# Copyright (C) 2008-2010 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import logging
import os
import platform
import random
import threading
from urllib.parse import quote_plus
from urllib.request import urlopen
from twisted.internet.task import LoopingCall
import deluge.common
import deluge.component as component
import deluge.configmanager
from deluge._libtorrent import lt
from deluge.event import ConfigValueChangedEvent
GeoIP = None
try:
from GeoIP import GeoIP
except ImportError:
try:
from pygeoip import GeoIP
except ImportError:
pass
log = logging.getLogger(__name__)
DEFAULT_PREFS = {
'send_info': False,
'info_sent': 0.0,
'daemon_port': 58846,
'allow_remote': False,
'pre_allocate_storage': False,
'download_location': deluge.common.get_default_download_dir(),
'listen_ports': [6881, 6891],
'listen_interface': '',
'outgoing_interface': '',
'random_port': True,
'listen_random_port': None,
'listen_use_sys_port': False,
'listen_reuse_port': True,
'outgoing_ports': [0, 0],
'random_outgoing_ports': True,
'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'),
'prioritize_first_last_pieces': False,
'sequential_download': False,
'dht': True,
'upnp': True,
'natpmp': True,
'utpex': True,
'lsd': True,
'enc_in_policy': 1,
'enc_out_policy': 1,
'enc_level': 2,
'max_connections_global': 200,
'max_upload_speed': -1.0,
'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 50
)(),
'max_connections_per_second': 20,
'ignore_limits_on_local_network': True,
'max_connections_per_torrent': -1,
'max_upload_slots_per_torrent': -1,
'max_upload_speed_per_torrent': -1,
'max_download_speed_per_torrent': -1,
'enabled_plugins': [],
'add_paused': False,
'max_active_seeding': 5,
'max_active_downloading': 3,
'max_active_limit': 8,
'dont_count_slow_torrents': False,
'queue_new_to_top': False,
'stop_seed_at_ratio': False,
'remove_seed_at_ratio': False,
'stop_seed_ratio': 2.00,
'share_ratio_limit': 2.00,
'seed_time_ratio_limit': 7.00,
'seed_time_limit': 180,
'auto_managed': True,
'move_completed': False,
'move_completed_path': deluge.common.get_default_download_dir(),
'move_completed_paths_list': [],
'download_location_paths_list': [],
'path_chooser_show_chooser_button_on_localhost': True,
'path_chooser_auto_complete_enabled': True,
'path_chooser_accelerator_string': 'Tab',
'path_chooser_max_popup_rows': 20,
'path_chooser_show_hidden_files': False,
'new_release_check': True,
'proxy': {
'type': 0,
'hostname': '',
'username': '',
'password': '',
'port': 8080,
'proxy_hostnames': True,
'proxy_peer_connections': True,
'proxy_tracker_connections': True,
'force_proxy': False,
'anonymous_mode': False,
},
'peer_tos': '0x00',
'rate_limit_ip_overhead': True,
'geoip_db_location': '/usr/share/GeoIP/GeoIP.dat',
'cache_size': 512,
'cache_expiry': 60,
'auto_manage_prefer_seeds': False,
'shared': False,
'super_seeding': False,
}
class PreferencesManager(component.Component):
def __init__(self):
component.Component.__init__(self, 'PreferencesManager')
self.config = deluge.configmanager.ConfigManager('core.conf', DEFAULT_PREFS)
if 'proxies' in self.config:
log.warning(
'Updating config file for proxy, using "peer" values to fill new "proxy" setting'
)
self.config['proxy'].update(self.config['proxies']['peer'])
log.warning('New proxy config is: %s', self.config['proxy'])
del self.config['proxies']
if 'i2p_proxy' in self.config and self.config['i2p_proxy']['hostname']:
self.config['proxy'].update(self.config['i2p_proxy'])
self.config['proxy']['type'] = 6
del self.config['i2p_proxy']
if 'anonymous_mode' in self.config:
self.config['proxy']['anonymous_mode'] = self.config['anonymous_mode']
del self.config['anonymous_mode']
if 'proxy' in self.config:
for key in DEFAULT_PREFS['proxy']:
if key not in self.config['proxy']:
self.config['proxy'][key] = DEFAULT_PREFS['proxy'][key]
self.core = component.get('Core')
self.new_release_timer = None
def start(self):
# Set the initial preferences on start-up
for key in DEFAULT_PREFS:
self.do_config_set_func(key, self.config[key])
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 do_config_set_func(self, key, value):
on_set_func = getattr(self, '_on_set_' + key, None)
if on_set_func:
if log.isEnabledFor(logging.DEBUG):
log.debug('Config key: %s set to %s..', key, value)
on_set_func(key, value)
def _on_config_value_change(self, key, value):
if self.get_state() == 'Started':
self.do_config_set_func(key, value)
component.get('EventManager').emit(ConfigValueChangedEvent(key, value))
def _on_set_torrentfiles_location(self, key, value):
if self.config['copy_torrent_file']:
try:
os.makedirs(value)
except OSError as ex:
log.debug('Unable to make directory: %s', ex)
def _on_set_listen_ports(self, key, value):
self.__set_listen_on()
def _on_set_listen_interface(self, key, value):
self.__set_listen_on()
def _on_set_outgoing_interface(self, key, value):
"""Set interface name or IP address for outgoing BitTorrent connections."""
value = value.strip() if value else ''
self.core.apply_session_settings({'outgoing_interfaces': value})
def _on_set_random_port(self, key, value):
self.__set_listen_on()
def __set_listen_on(self):
"""Set the ports and interface address to listen for incoming connections on."""
if self.config['random_port']:
if not self.config['listen_random_port']:
self.config['listen_random_port'] = random.randrange(49152, 65525)
listen_ports = [
self.config['listen_random_port']
] * 2 # use single port range
else:
self.config['listen_random_port'] = None
listen_ports = self.config['listen_ports']
if self.config['listen_interface']:
interface = self.config['listen_interface'].strip()
else:
interface = '0.0.0.0'
log.debug(
'Listen Interface: %s, Ports: %s with use_sys_port: %s',
interface,
listen_ports,
self.config['listen_use_sys_port'],
)
interfaces = [
f'{interface}:{port}'
for port in range(listen_ports[0], listen_ports[1] + 1)
]
self.core.apply_session_settings(
{
'listen_system_port_fallback': self.config['listen_use_sys_port'],
'listen_interfaces': ','.join(interfaces),
}
)
def _on_set_outgoing_ports(self, key, value):
self.__set_outgoing_ports()
def _on_set_random_outgoing_ports(self, key, value):
self.__set_outgoing_ports()
def __set_outgoing_ports(self):
port = (
0
if self.config['random_outgoing_ports']
else self.config['outgoing_ports'][0]
)
if port:
num_ports = (
self.config['outgoing_ports'][1] - self.config['outgoing_ports'][0]
)
num_ports = num_ports if num_ports > 1 else 5
else:
num_ports = 0
log.debug('Outgoing port set to %s with range: %s', port, num_ports)
self.core.apply_session_settings(
{'outgoing_port': port, 'num_outgoing_ports': num_ports}
)
def _on_set_peer_tos(self, key, value):
try:
self.core.apply_session_setting('peer_tos', int(value, 16))
except ValueError as ex:
log.error('Invalid tos byte: %s', ex)
def _on_set_dht(self, key, value):
lt_bootstraps = self.core.session.get_settings()['dht_bootstrap_nodes']
# Update list of lt bootstraps, using set to remove duplicates.
dht_bootstraps = set(
lt_bootstraps.split(',')
+ [
'router.bittorrent.com:6881',
'router.utorrent.com:6881',
'router.bitcomet.com:6881',
'dht.transmissionbt.com:6881',
'dht.aelitis.com:6881',
]
)
self.core.apply_session_settings(
{'dht_bootstrap_nodes': ','.join(dht_bootstraps), 'enable_dht': value}
)
def _on_set_upnp(self, key, value):
self.core.apply_session_setting('enable_upnp', value)
def _on_set_natpmp(self, key, value):
self.core.apply_session_setting('enable_natpmp', value)
def _on_set_lsd(self, key, value):
self.core.apply_session_setting('enable_lsd', value)
def _on_set_utpex(self, key, value):
if value:
self.core.session.add_extension('ut_pex')
def _on_set_enc_in_policy(self, key, value):
self._on_set_encryption(key, value)
def _on_set_enc_out_policy(self, key, value):
self._on_set_encryption(key, value)
def _on_set_enc_level(self, key, value):
self._on_set_encryption(key, value)
def _on_set_encryption(self, key, value):
# Convert Deluge enc_level values to libtorrent enc_level values.
pe_enc_level = {
0: lt.enc_level.plaintext,
1: lt.enc_level.rc4,
2: lt.enc_level.both,
}
self.core.apply_session_settings(
{
'out_enc_policy': lt.enc_policy(self.config['enc_out_policy']),
'in_enc_policy': lt.enc_policy(self.config['enc_in_policy']),
'allowed_enc_level': lt.enc_level(
pe_enc_level[self.config['enc_level']]
),
'prefer_rc4': True,
}
)
def _on_set_max_connections_global(self, key, value):
self.core.apply_session_setting('connections_limit', value)
def _on_set_max_upload_speed(self, key, value):
# We need to convert Kb/s to B/s
value = -1 if value < 0 else int(value * 1024)
self.core.apply_session_setting('upload_rate_limit', value)
def _on_set_max_download_speed(self, key, value):
# We need to convert Kb/s to B/s
value = -1 if value < 0 else int(value * 1024)
self.core.apply_session_setting('download_rate_limit', value)
def _on_set_max_upload_slots_global(self, key, value):
self.core.apply_session_setting('unchoke_slots_limit', value)
def _on_set_max_half_open_connections(self, key, value):
self.core.apply_session_setting('half_open_limit', value)
def _on_set_max_connections_per_second(self, key, value):
self.core.apply_session_setting('connection_speed', value)
def _on_set_ignore_limits_on_local_network(self, key, value):
self.core.apply_session_setting('ignore_limits_on_local_network', value)
def _on_set_share_ratio_limit(self, key, value):
# This value is a float percentage in deluge, but libtorrent needs int percentage.
self.core.apply_session_setting('share_ratio_limit', int(value * 100))
def _on_set_seed_time_ratio_limit(self, key, value):
# This value is a float percentage in deluge, but libtorrent needs int percentage.
self.core.apply_session_setting('seed_time_ratio_limit', int(value * 100))
def _on_set_seed_time_limit(self, key, value):
# This value is stored in minutes in deluge, but libtorrent wants seconds
self.core.apply_session_setting('seed_time_limit', int(value * 60))
def _on_set_max_active_downloading(self, key, value):
self.core.apply_session_setting('active_downloads', value)
def _on_set_max_active_seeding(self, key, value):
self.core.apply_session_setting('active_seeds', value)
def _on_set_max_active_limit(self, key, value):
self.core.apply_session_setting('active_limit', value)
def _on_set_dont_count_slow_torrents(self, key, value):
self.core.apply_session_setting('dont_count_slow_torrents', value)
def _on_set_send_info(self, key, value):
"""sends anonymous stats home"""
log.debug('Sending anonymous stats..')
class SendInfoThread(threading.Thread):
def __init__(self, config):
self.config = config
threading.Thread.__init__(self)
def run(self):
import time
now = time.time()
# check if we've done this within the last week or never
if (now - self.config['info_sent']) >= (60 * 60 * 24 * 7):
try:
url = (
'http://deluge-torrent.org/stats_get.php?processor='
+ platform.machine()
+ '&python='
+ platform.python_version()
+ '&deluge='
+ deluge.common.get_version()
+ '&os='
+ platform.system()
+ '&plugins='
+ quote_plus(':'.join(self.config['enabled_plugins']))
)
urlopen(url)
except OSError as ex:
log.debug('Network error while trying to send info: %s', ex)
else:
self.config['info_sent'] = now
if value:
SendInfoThread(self.config).start()
def _on_set_new_release_check(self, key, value):
if value:
log.debug('Checking for new release..')
threading.Thread(target=self.core.get_new_release).start()
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 = LoopingCall(
self._on_set_new_release_check, 'new_release_check', True
)
self.new_release_timer.start(72 * 60 * 60, False)
else:
if self.new_release_timer and self.new_release_timer.running:
self.new_release_timer.stop()
def _on_set_proxy(self, key, value):
# Initialise with type none and blank hostnames.
proxy_settings = {
'proxy_type': lt.proxy_type_t.none,
'i2p_hostname': '',
'proxy_hostname': '',
'proxy_hostnames': value['proxy_hostnames'],
'proxy_peer_connections': value['proxy_peer_connections'],
'proxy_tracker_connections': value['proxy_tracker_connections'],
'force_proxy': value['force_proxy'],
'anonymous_mode': value['anonymous_mode'],
}
if value['type'] == lt.proxy_type_t.i2p_proxy:
proxy_settings.update(
{
'proxy_type': lt.proxy_type_t.i2p_proxy,
'i2p_hostname': value['hostname'],
'i2p_port': value['port'],
}
)
elif value['type'] != lt.proxy_type_t.none:
proxy_settings.update(
{
'proxy_type': value['type'],
'proxy_hostname': value['hostname'],
'proxy_port': value['port'],
'proxy_username': value['username'],
'proxy_password': value['password'],
}
)
self.core.apply_session_settings(proxy_settings)
def _on_set_rate_limit_ip_overhead(self, key, value):
self.core.apply_session_setting('rate_limit_ip_overhead', value)
def _on_set_geoip_db_location(self, key, geoipdb_path):
# Load the GeoIP DB for country look-ups if available
if os.path.exists(geoipdb_path):
try:
self.core.geoip_instance = GeoIP(geoipdb_path, 0)
except Exception as ex:
log.warning('GeoIP Unavailable: %s', ex)
else:
log.warning('Unable to find GeoIP database file: %s', geoipdb_path)
def _on_set_cache_size(self, key, value):
self.core.apply_session_setting('cache_size', value)
def _on_set_cache_expiry(self, key, value):
self.core.apply_session_setting('cache_expiry', value)
def _on_auto_manage_prefer_seeds(self, key, value):
self.core.apply_session_setting('auto_manage_prefer_seeds', value)

598
deluge/core/rpcserver.py Normal file
View File

@ -0,0 +1,598 @@
#
# Copyright (C) 2008,2009 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
"""RPCServer Module"""
import logging
import os
import sys
import traceback
from collections import namedtuple
from types import FunctionType
from typing import Callable, TypeVar, overload
from twisted.internet import defer, reactor
from twisted.internet.protocol import Factory, connectionDone
import deluge.component as component
import deluge.configmanager
from deluge.core.authmanager import (
AUTH_LEVEL_ADMIN,
AUTH_LEVEL_DEFAULT,
AUTH_LEVEL_NONE,
)
from deluge.crypto_utils import check_ssl_keys, get_context_factory
from deluge.error import (
DelugeError,
IncompatibleClient,
NotAuthorizedError,
WrappedException,
_ClientSideRecreateError,
)
from deluge.event import ClientDisconnectedEvent
from deluge.transfer import DelugeTransferProtocol
RPC_RESPONSE = 1
RPC_ERROR = 2
RPC_EVENT = 3
log = logging.getLogger(__name__)
TCallable = TypeVar('TCallable', bound=Callable)
@overload
def export(func: TCallable) -> TCallable:
...
@overload
def export(auth_level: int) -> Callable[[TCallable], TCallable]:
...
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
rpc_text = '**RPC exported method** (*Auth level: %s*)' % auth_level
# Append the RPC text while ensuring correct docstring formatting.
if func.__doc__:
if func.__doc__.endswith(' '):
indent = func.__doc__.split('\n')[-1]
func.__doc__ += f'\n{indent}'
else:
func.__doc__ += '\n\n'
func.__doc__ += rpc_text
else:
func.__doc__ = rpc_text
return func
if isinstance(auth_level, 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 DelugeRPCProtocol(DelugeTransferProtocol):
def __init__(self):
super().__init__()
# namedtuple subclass with auth_level, username for the connected session.
self.AuthLevel = namedtuple('SessionAuthlevel', 'auth_level, username')
def message_received(self, request):
"""
This method is called whenever a message 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 request: the request from the client.
:type data: tuple
"""
if not isinstance(request, 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): # NOQA: N802
"""
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
"""
try:
self.transfer_message(data)
except Exception as ex:
log.warning('Error occurred when sending message: %s.', ex)
log.exception(ex)
raise
def connectionMade(self): # NOQA: N802
"""
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] = self.AuthLevel(
AUTH_LEVEL_NONE, ''
)
def connectionLost(self, reason=connectionDone): # NOQA: N802
"""
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]
if self.factory.state == 'running':
component.get('EventManager').emit(
ClientDisconnectedEvent(self.factory.session_id)
)
log.info('Deluge client disconnected: %s', reason.value)
def valid_session(self):
return self.transport.sessionno in self.factory.authorized_sessions
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 send_error():
"""
Sends an error response with the contents of the exception that was raised.
"""
exc_type, exc_value, dummy_exc_trace = sys.exc_info()
formated_tb = traceback.format_exc()
try:
self.sendData(
(
RPC_ERROR,
request_id,
exc_type.__name__,
exc_value._args,
exc_value._kwargs,
formated_tb,
)
)
except AttributeError:
# This is not a deluge exception (object has no attribute '_args), let's wrap it
log.warning(
'An exception occurred while sending RPC_ERROR to '
'client. Wrapping it and resending. Error to '
'send(causing exception goes next):\n%s',
formated_tb,
)
try:
raise WrappedException(
str(exc_value), exc_type.__name__, formated_tb
)
except WrappedException:
send_error()
except Exception as ex:
log.error(
'An exception occurred while sending RPC_ERROR to client: %s', ex
)
if method == 'daemon.info':
# This is a special case and used in the initial connection process
self.sendData((RPC_RESPONSE, request_id, deluge.common.get_version()))
return
elif method == 'daemon.login':
# This is a special case and used in the initial connection process
# We need to authenticate the user here
log.debug('RPC dispatch daemon.login')
try:
client_version = kwargs.pop('client_version', None)
if client_version is None:
raise IncompatibleClient(deluge.common.get_version())
ret = component.get('AuthManager').authorize(*args, **kwargs)
if ret:
self.factory.authorized_sessions[
self.transport.sessionno
] = self.AuthLevel(ret, args[0])
self.factory.session_protocols[self.transport.sessionno] = self
except Exception as ex:
send_error()
if not isinstance(ex, _ClientSideRecreateError):
log.exception(ex)
else:
self.sendData((RPC_RESPONSE, request_id, (ret)))
if not ret:
self.transport.loseConnection()
return
# Anything below requires a valid session
if not self.valid_session():
return
if method == 'daemon.set_event_interest':
log.debug('RPC dispatch daemon.set_event_interest')
# 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:
send_error()
else:
self.sendData((RPC_RESPONSE, request_id, (True)))
return
if method not in self.factory.methods:
try:
# Raise exception to be sent back to client
raise AttributeError('RPC call on invalid function: %s' % method)
except AttributeError:
send_error()
return
log.debug('RPC dispatch %s', method)
try:
method_auth_requirement = self.factory.methods[method]._rpcserver_auth_level
auth_level = self.factory.authorized_sessions[
self.transport.sessionno
].auth_level
if auth_level < method_auth_requirement:
# This session is not allowed to call this method
log.debug(
'Session %s is attempting an unauthorized method call!',
self.transport.sessionno,
)
raise NotAuthorizedError(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 as ex:
send_error()
# Don't bother printing out DelugeErrors, because they are just
# for the client
if not isinstance(ex, DelugeError):
log.exception('Exception calling RPC request: %s', ex)
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):
try:
self.sendData((RPC_RESPONSE, request_id, result))
except Exception:
send_error()
return result
def on_fail(failure):
try:
failure.raiseException()
except Exception:
send_error()
return failure
ret.addCallbacks(on_success, on_fail)
else:
self.sendData((RPC_RESPONSE, request_id, ret))
class RPCServer(component.Component):
"""
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')
self.factory = Factory()
self.factory.protocol = DelugeRPCProtocol
self.factory.session_id = -1
self.factory.state = 'running'
# 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 = {}
self.listen = listen
if not listen:
return
if allow_remote:
hostname = ''
else:
hostname = 'localhost'
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()
cert = os.path.join(deluge.configmanager.get_config_dir('ssl'), 'daemon.cert')
pkey = os.path.join(deluge.configmanager.get_config_dir('ssl'), 'daemon.pkey')
try:
reactor.listenSSL(
port, self.factory, get_context_factory(cert, pkey), interface=hostname
)
except Exception as ex:
log.debug('Daemon already running or port not available.: %s', ex)
raise
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__.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.factory.methods[name + '.' + d] = getattr(obj, d)
def deregister_object(self, obj):
"""
Deregisters an objects exported rpc methods.
:param obj: the object that was previously registered
"""
for key, value in self.factory.methods.items():
if value.__self__ == obj:
del self.factory.methods[key]
def get_object_method(self, name):
"""
Returns a registered method.
: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 list(self.factory.methods)
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
"""
if not self.listen:
return 'localclient'
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].username
else:
# No connections made yet
return ''
def get_session_auth_level(self):
"""
Returns the auth level of the user calling the current RPC.
:returns: the auth level
:rtype: int
"""
if not self.listen or not self.is_session_valid(self.get_session_id()):
return AUTH_LEVEL_ADMIN
return self.factory.authorized_sessions[self.get_session_id()].auth_level
def get_rpc_auth_level(self, rpc):
"""
Returns the auth level requirement for an exported rpc.
:returns: the auth level
:rtype: int
"""
return self.factory.methods[rpc]._rpcserver_auth_level
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 emit_event_for_session_id(self, session_id, event):
"""
Emits the event to specified session_id.
:param session_id: the event to emit
:type session_id: int
:param event: the event to emit
:type event: :class:`deluge.event.DelugeEvent`
"""
if not self.is_session_valid(session_id):
log.debug(
'Session ID %s is not valid. Not sending event "%s".',
session_id,
event.name,
)
return
if session_id not in self.factory.interested_events:
log.debug(
'Session ID %s is not interested in any events. Not sending event "%s".',
session_id,
event.name,
)
return
if event.name not in self.factory.interested_events[session_id]:
log.debug(
'Session ID %s is not interested in event "%s". Not sending it.',
session_id,
event.name,
)
return
log.debug(
'Sending event "%s" with args "%s" to session id "%s".',
event.name,
event.args,
session_id,
)
self.factory.session_protocols[session_id].sendData(
(RPC_EVENT, event.name, event.args)
)
def stop(self):
self.factory.state = 'stopping'

View File

@ -1,81 +0,0 @@
#
# signalmanager.py
#
# Copyright (C) 2007, 2008 Andrew Resch ('andar') <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 2 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.xmlrpclib as xmlrpclib
import socket
import gobject
import deluge.component as component
from deluge.log import LOG as log
class SignalManager(component.Component):
def __init__(self):
component.Component.__init__(self, "SignalManager")
self.clients = {}
def shutdown(self):
self.clients = {}
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)
def emit(self, signal, *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]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

136
deluge/crypto_utils.py Normal file
View File

@ -0,0 +1,136 @@
#
# Copyright (C) 2007,2008 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import os
import stat
from OpenSSL import crypto
from OpenSSL.crypto import FILETYPE_PEM
from twisted.internet.ssl import (
AcceptableCiphers,
Certificate,
CertificateOptions,
KeyPair,
TLSVersion,
)
import deluge.configmanager
# A TLS ciphers list.
# Sources for more information on TLS ciphers:
# - https://wiki.mozilla.org/Security/Server_Side_TLS
# - https://www.ssllabs.com/projects/best-practices/index.html
# - https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
#
# This list was inspired by the `urllib3` library
# - https://github.com/urllib3/urllib3/blob/master/urllib3/util/ssl_.py#L79
#
# The general intent is:
# - prefer cipher suites that offer perfect forward secrecy (ECDHE),
# - prefer AES-GCM over ChaCha20 because hardware-accelerated AES is common,
# - disable NULL authentication, MD5 MACs and DSS for security reasons.
TLS_CIPHERS = ':'.join(
[
'ECDH+AESGCM',
'ECDH+CHACHA20',
'AES256-GCM-SHA384',
'AES128-GCM-SHA256',
'!DSS' '!aNULL',
'!eNULL',
'!MD5',
]
)
# This value tells OpenSSL to disable all SSL/TLS renegotiation.
SSL_OP_NO_RENEGOTIATION = 0x40000000
def get_context_factory(cert_path, pkey_path):
"""OpenSSL context factory.
Generates an OpenSSL context factory using Twisted's CertificateOptions class.
This will keep a server cipher order.
Args:
cert_path (string): The path to the certificate file
pkey_path (string): The path to the private key file
Returns:
twisted.internet.ssl.CertificateOptions: An OpenSSL context factory
"""
with open(cert_path) as cert:
certificate = Certificate.loadPEM(cert.read()).original
with open(pkey_path) as pkey:
private_key = KeyPair.load(pkey.read(), FILETYPE_PEM).original
ciphers = AcceptableCiphers.fromOpenSSLCipherString(TLS_CIPHERS)
cert_options = CertificateOptions(
privateKey=private_key,
certificate=certificate,
raiseMinimumTo=TLSVersion.TLSv1_2,
acceptableCiphers=ciphers,
)
ctx = cert_options.getContext()
ctx.use_certificate_chain_file(cert_path)
ctx.set_options(SSL_OP_NO_RENEGOTIATION)
return cert_options
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 = 'sha256'
# Generate key pair
pkey = crypto.PKey()
pkey.generate_key(crypto.TYPE_RSA, 2048)
# 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 * 3) # Three 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')
with open(os.path.join(ssl_dir, 'daemon.pkey'), 'wb') as _file:
_file.write(crypto.dump_privatekey(crypto.FILETYPE_PEM, pkey))
with open(os.path.join(ssl_dir, 'daemon.cert'), 'wb') as _file:
_file.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)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -1,402 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48px"
height="48px"
id="svg3440"
sodipodi:version="0.32"
inkscape:version="0.45"
sodipodi:docbase="/home/zach/deluge/trunk"
sodipodi:docname="deluge.svg"
inkscape:export-filename="/home/zach/deluge.png"
inkscape:export-xdpi="480"
inkscape:export-ydpi="480"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
sodipodi:modified="TRUE">
<defs
id="defs3">
<linearGradient
inkscape:collect="always"
id="linearGradient2973">
<stop
style="stop-color:#eeeeec;stop-opacity:1;"
offset="0"
id="stop2975" />
<stop
style="stop-color:#eeeeec;stop-opacity:0;"
offset="1"
id="stop2977" />
</linearGradient>
<linearGradient
id="linearGradient4126">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop4128" />
<stop
style="stop-color:#ffffff;stop-opacity:0.16494845;"
offset="1.0000000"
id="stop4130" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4114">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4116" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop4118" />
</linearGradient>
<linearGradient
id="linearGradient3962">
<stop
style="stop-color:#d3e9ff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop3964" />
<stop
style="stop-color:#d3e9ff;stop-opacity:1.0000000;"
offset="0.15517241"
id="stop4134" />
<stop
style="stop-color:#4074ae;stop-opacity:1.0000000;"
offset="0.75000000"
id="stop4346" />
<stop
style="stop-color:#36486c;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop3966" />
</linearGradient>
<radialGradient
r="13.994944"
fy="33.506763"
fx="-10.089286"
cy="33.506763"
cx="-10.089286"
gradientTransform="matrix(1,0,0,0.791446,-14.01786,-11.28667)"
gradientUnits="userSpaceOnUse"
id="radialGradient4019"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
r="14.057444"
fy="31.329016"
fx="-10.323107"
cy="31.329016"
cx="-10.323107"
gradientTransform="matrix(1,0,0,0.792374,-19.58761,2.818569)"
gradientUnits="userSpaceOnUse"
id="radialGradient4004"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.792374,0,6.785475)"
r="14.057444"
fy="31.329016"
fx="-10.323107"
cy="31.329016"
cx="-10.323107"
id="radialGradient3999"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.341185,-0.153831,1.08001,2.395374,-15.42222,-25.62103)"
r="13.994946"
fy="24.241488"
fx="61.662098"
cy="24.241488"
cx="61.662098"
id="radialGradient3943"
xlink:href="#linearGradient1312"
inkscape:collect="always" />
<linearGradient
id="linearGradient1312">
<stop
id="stop1314"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop1316"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3993">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3995" />
<stop
style="stop-color:#000000;stop-opacity:0"
offset="1"
id="stop3997" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient3866"
cx="-22.375"
cy="18.499998"
fx="-22.375"
fy="18.499998"
r="14.33462"
gradientTransform="matrix(1,0,0,1.140022,40.17678,1.347091)"
gradientUnits="userSpaceOnUse" />
<radialGradient
gradientUnits="userSpaceOnUse"
r="12.289036"
fy="63.965388"
fx="15.115514"
cy="63.965388"
cx="15.115514"
gradientTransform="scale(1.643990,0.608276)"
id="radialGradient5000"
xlink:href="#linearGradient4114"
inkscape:collect="always" />
<linearGradient
id="linearGradient4989">
<stop
id="stop4991"
offset="0.0000000"
style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
<stop
id="stop4993"
offset="0.15517241"
style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
<stop
id="stop4995"
offset="0.75000000"
style="stop-color:#4074ae;stop-opacity:1.0000000;" />
<stop
id="stop4997"
offset="1.0000000"
style="stop-color:#36486c;stop-opacity:1.0000000;" />
</linearGradient>
<linearGradient
id="linearGradient4977">
<stop
id="stop4979"
offset="0.0000000"
style="stop-color:#ffffff;stop-opacity:1.0000000;" />
<stop
id="stop4981"
offset="1.0000000"
style="stop-color:#ffffff;stop-opacity:0.16494845;" />
</linearGradient>
<linearGradient
id="linearGradient4825"
inkscape:collect="always">
<stop
id="stop4827"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop4829"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4114"
id="radialGradient6090"
gradientUnits="userSpaceOnUse"
gradientTransform="scale(1.64399,0.608276)"
cx="15.115514"
cy="63.965388"
fx="15.115514"
fy="63.965388"
r="12.289036" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4825"
id="radialGradient6098"
gradientUnits="userSpaceOnUse"
cx="12.071323"
cy="12.493138"
fx="12.071323"
fy="12.493138"
r="6.7175145" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient6103"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.25463,-0.898371,0.979785,0.277703,-18.00903,32.03312)"
cx="17.903898"
cy="40.159222"
fx="17.903898"
fy="40.159222"
r="14.33681" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient6106"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.583269,-0.431533,0.577146,0.78008,-5.80022,4.004109)"
cx="12.525543"
cy="38.09042"
fx="12.525543"
fy="38.09042"
r="14.33681" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient1312"
id="radialGradient6109"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.768231,1.13675,-0.820972,0.554824,-3.72248,-85.07126)"
cx="65.800331"
cy="27.16758"
fx="65.800331"
fy="27.16758"
r="12.972491" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4989"
id="radialGradient6115"
cx="16.651781"
cy="32.187485"
fx="16.651781"
fy="32.187485"
r="17.089519"
gradientTransform="matrix(1.486175,-1.536108,0.932321,0.902016,-38.10476,31.42646)"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.17254902"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="8"
inkscape:cx="36.250498"
inkscape:cy="38.275489"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1266"
inkscape:window-height="944"
inkscape:window-x="124"
inkscape:window-y="52"
inkscape:showpageshadow="false" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Internet Category</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:contributor>
<cc:Agent>
<dc:title>Tuomas Kuosmanen</dc:title>
</cc:Agent>
</dc:contributor>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
<dc:source>http://jimmac.musichall.cz</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>internet</rdf:li>
<rdf:li>tools</rdf:li>
<rdf:li>applications</rdf:li>
<rdf:li>category</rdf:li>
</rdf:Bag>
</dc:subject>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Attribution" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
sodipodi:type="arc"
style="fill:url(#radialGradient6090);fill-opacity:1;stroke:none;stroke-opacity:1"
id="path4112"
sodipodi:cx="24.849752"
sodipodi:cy="38.908627"
sodipodi:rx="20.203051"
sodipodi:ry="7.4751287"
d="M 45.052803 38.908627 A 20.203051 7.4751287 0 1 1 4.6467018,38.908627 A 20.203051 7.4751287 0 1 1 45.052803 38.908627 z"
transform="matrix(0.947409,0,0,1.17786,1.244375,-6.853427)"
inkscape:export-xdpi="480"
inkscape:export-ydpi="480" />
<path
style="fill:url(#radialGradient6115);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 23.942923,0.9561338 L 37.330543,18.266721 C 46.998995,29.84687 41.49692,43.923891 26.7742,45.000491 C 6.0597413,45.582655 6.5086231,27.37483 11.255313,18.609381 L 23.942923,0.9561338 z "
id="path2069"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#1b4075;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 35.111358,26.143133 C 28.972772,13.030586 17.560684,17.697957 17.274449,26.949974 C 16.894738,39.223415 34.748874,37.615429 36.715244,41.468778 C 28.821643,47.675479 14.973233,45.226508 10.962289,39.715204 C 6.9574776,34.212326 7.2383598,25.630263 10.784249,19.587632 C 24.158625,0.978654 39.749127,24.383766 35.111358,26.143133 z "
id="path2969"
sodipodi:nodetypes="cscscc" />
<path
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:1.1000706;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.36612022"
d="M 23.996861,3.5433428 L 36.057351,19.151045 C 44.769741,29.58253 39.419346,42.414092 26.125181,43.508521 C 7.3917365,44.015286 7.4275065,28.119221 12.17284,20.333442 L 23.996861,3.5433428 z "
id="path2071"
sodipodi:nodetypes="ccccc" />
<path
style="opacity:0.46;fill:url(#radialGradient6109);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 23.940758,0.96491709 L 34.727367,14.909752 C 42.647208,24.392311 40.447304,20.283975 28.362481,21.278846 C 25.083165,11.203805 18.13871,11.859899 13.523802,15.675236 L 23.940758,0.96491709 z "
id="path3945"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#radialGradient6106);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 35.159701,26.173667 C 29.021115,13.06112 18.734027,17.978491 18.447792,27.230508 C 18.068081,39.503949 34.797217,37.645963 36.763587,41.499312 C 28.869986,47.706013 15.021576,45.257042 11.010632,39.745738 C 7.0058197,34.24286 7.2867027,25.660797 10.832592,19.618166 C 24.206968,1.0091879 39.79747,24.4143 35.159701,26.173667 z "
id="path3868"
sodipodi:nodetypes="cscscc" />
<path
style="fill:url(#radialGradient6103);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 35.120795,26.14195 C 28.553327,12.814962 15.685968,17.224233 15.399733,26.47625 C 15.020022,38.749691 32.874158,37.141705 34.840528,40.995054 C 26.946927,47.201755 13.098517,44.752784 9.0875727,39.24148 C 5.0827617,33.738602 5.3636437,25.156539 8.9095327,19.113908 C 22.315509,0.47615954 40.03233,23.660113 35.120795,26.14195 z "
id="path4874"
sodipodi:nodetypes="cscscc" />
<path
transform="matrix(-0.829136,1.052307,1.239307,7.58326e-2,26.32898,25.58605)"
inkscape:r_cy="true"
inkscape:r_cx="true"
d="M 18.788838 12.493138 A 6.7175145 6.7175145 0 1 1 5.3538089,12.493138 A 6.7175145 6.7175145 0 1 1 18.788838 12.493138 z"
sodipodi:ry="6.7175145"
sodipodi:rx="6.7175145"
sodipodi:cy="12.493138"
sodipodi:cx="12.071323"
id="path4941"
style="opacity:0.21999996;color:black;fill:url(#radialGradient6098);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
sodipodi:type="arc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,360 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48px"
height="48px"
id="svg3440"
sodipodi:version="0.32"
inkscape:version="0.45"
sodipodi:docbase="/home/andrew"
sodipodi:docname="alert.svg"
inkscape:export-filename="/home/andrew/alert16.png"
inkscape:export-xdpi="32.603073"
inkscape:export-ydpi="32.603073"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
sodipodi:modified="TRUE">
<defs
id="defs3">
<linearGradient
inkscape:collect="always"
id="linearGradient2973">
<stop
style="stop-color:#eeeeec;stop-opacity:1;"
offset="0"
id="stop2975" />
<stop
style="stop-color:#eeeeec;stop-opacity:0;"
offset="1"
id="stop2977" />
</linearGradient>
<linearGradient
id="linearGradient4126">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop4128" />
<stop
style="stop-color:#ffffff;stop-opacity:0.16494845;"
offset="1.0000000"
id="stop4130" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4114">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4116" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop4118" />
</linearGradient>
<linearGradient
id="linearGradient3962">
<stop
style="stop-color:#d3e9ff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop3964" />
<stop
style="stop-color:#d3e9ff;stop-opacity:1.0000000;"
offset="0.15517241"
id="stop4134" />
<stop
style="stop-color:#4074ae;stop-opacity:1.0000000;"
offset="0.75000000"
id="stop4346" />
<stop
style="stop-color:#36486c;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop3966" />
</linearGradient>
<radialGradient
r="13.994944"
fy="33.506763"
fx="-10.089286"
cy="33.506763"
cx="-10.089286"
gradientTransform="matrix(1,0,0,0.791446,-14.01786,-11.28667)"
gradientUnits="userSpaceOnUse"
id="radialGradient4019"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
r="14.057444"
fy="31.329016"
fx="-10.323107"
cy="31.329016"
cx="-10.323107"
gradientTransform="matrix(1,0,0,0.792374,-19.58761,2.818569)"
gradientUnits="userSpaceOnUse"
id="radialGradient4004"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.792374,0,6.785475)"
r="14.057444"
fy="31.329016"
fx="-10.323107"
cy="31.329016"
cx="-10.323107"
id="radialGradient3999"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.341185,-0.153831,1.08001,2.395374,-15.42222,-25.62103)"
r="13.994946"
fy="24.241488"
fx="61.662098"
cy="24.241488"
cx="61.662098"
id="radialGradient3943"
xlink:href="#linearGradient1312"
inkscape:collect="always" />
<linearGradient
id="linearGradient1312">
<stop
id="stop1314"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop1316"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3993">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3995" />
<stop
style="stop-color:#000000;stop-opacity:0"
offset="1"
id="stop3997" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient3866"
cx="-22.375"
cy="18.499998"
fx="-22.375"
fy="18.499998"
r="14.33462"
gradientTransform="matrix(1,0,0,1.140022,40.17678,1.347091)"
gradientUnits="userSpaceOnUse" />
<radialGradient
gradientUnits="userSpaceOnUse"
r="12.289036"
fy="63.965388"
fx="15.115514"
cy="63.965388"
cx="15.115514"
gradientTransform="scale(1.643990,0.608276)"
id="radialGradient5000"
xlink:href="#linearGradient4114"
inkscape:collect="always" />
<linearGradient
id="linearGradient4989">
<stop
id="stop4991"
offset="0.0000000"
style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
<stop
id="stop4993"
offset="0.15517241"
style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
<stop
id="stop4995"
offset="0.75000000"
style="stop-color:#4074ae;stop-opacity:1.0000000;" />
<stop
id="stop4997"
offset="1.0000000"
style="stop-color:#36486c;stop-opacity:1.0000000;" />
</linearGradient>
<linearGradient
id="linearGradient4977">
<stop
id="stop4979"
offset="0.0000000"
style="stop-color:#ffffff;stop-opacity:1.0000000;" />
<stop
id="stop4981"
offset="1.0000000"
style="stop-color:#ffffff;stop-opacity:0.16494845;" />
</linearGradient>
<linearGradient
id="linearGradient4825"
inkscape:collect="always">
<stop
id="stop4827"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop4829"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4114"
id="radialGradient6090"
gradientUnits="userSpaceOnUse"
gradientTransform="scale(1.64399,0.608276)"
cx="15.115514"
cy="63.965388"
fx="15.115514"
fy="63.965388"
r="12.289036" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4825"
id="radialGradient6098"
gradientUnits="userSpaceOnUse"
cx="12.071323"
cy="12.493138"
fx="12.071323"
fy="12.493138"
r="6.7175145" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient6103"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.25463,-0.898371,0.979785,0.277703,-18.00903,32.03312)"
cx="17.903898"
cy="40.159222"
fx="17.903898"
fy="40.159222"
r="14.33681" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient6106"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.583269,-0.431533,0.577146,0.78008,-5.80022,4.004109)"
cx="12.525543"
cy="38.09042"
fx="12.525543"
fy="38.09042"
r="14.33681" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient1312"
id="radialGradient6109"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.768231,1.13675,-0.820972,0.554824,-3.72248,-85.07126)"
cx="65.800331"
cy="27.16758"
fx="65.800331"
fy="27.16758"
r="12.972491" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.17254902"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="7.4062501"
inkscape:cx="11.667315"
inkscape:cy="19.059135"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1024"
inkscape:window-height="693"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:showpageshadow="false" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Internet Category</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:contributor>
<cc:Agent>
<dc:title>Tuomas Kuosmanen</dc:title>
</cc:Agent>
</dc:contributor>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
<dc:source>http://jimmac.musichall.cz</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>internet</rdf:li>
<rdf:li>tools</rdf:li>
<rdf:li>applications</rdf:li>
<rdf:li>category</rdf:li>
</rdf:Bag>
</dc:subject>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Attribution" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 23.942923,0.9561338 L 37.330543,18.266721 C 46.998995,29.84687 41.49692,43.923891 26.7742,45.000491 C 6.0597413,45.582655 6.5086231,27.37483 11.255313,18.609381 L 23.942923,0.9561338 z "
id="path2069"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:1.1000706;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.36612022"
d="M 23.996861,3.5433428 L 36.057351,19.151045 C 44.769741,29.58253 39.419346,42.414092 26.125181,43.508521 C 7.3917365,44.015286 7.4275065,28.119221 12.17284,20.333442 L 23.996861,3.5433428 z "
id="path2071"
sodipodi:nodetypes="ccccc" />
<text
xml:space="preserve"
style="font-size:55.97062302px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:#ff7878;fill-opacity:1;stroke:#000000;stroke-width:0.70000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="5.0072942"
y="59.560848"
id="text2767"
transform="scale(1.4928735,0.6698491)"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan2769"
x="5.0072942"
y="59.560848"
style="font-size:55.97062302px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;stroke-width:0.70000001;font-family:Bitstream Vera Sans;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-linecap:round">!</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

View File

@ -1,297 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48px"
height="48px"
id="svg3440"
sodipodi:version="0.32"
inkscape:version="0.46"
sodipodi:docbase="/home/andrew/Projects/deluge-icons"
sodipodi:docname="checking.svg"
inkscape:export-filename="/home/andrew/checking16.png"
inkscape:export-xdpi="32.603073"
inkscape:export-ydpi="32.603073"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.17254902"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="8"
inkscape:cx="37.674028"
inkscape:cy="16.114442"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="768"
inkscape:window-height="722"
inkscape:window-x="4"
inkscape:window-y="25"
inkscape:showpageshadow="false" />
<defs
id="defs3">
<inkscape:perspective
id="perspective2513"
inkscape:persp3d-origin="24 : 16 : 1"
inkscape:vp_z="48 : 24 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 24 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient2973"
inkscape:collect="always">
<stop
id="stop2975"
offset="0"
style="stop-color:#eeeeec;stop-opacity:1;" />
<stop
id="stop2977"
offset="1"
style="stop-color:#eeeeec;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient4126">
<stop
id="stop4128"
offset="0.0000000"
style="stop-color:#ffffff;stop-opacity:1.0000000;" />
<stop
id="stop4130"
offset="1.0000000"
style="stop-color:#ffffff;stop-opacity:0.16494845;" />
</linearGradient>
<linearGradient
id="linearGradient4114"
inkscape:collect="always">
<stop
id="stop4116"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
id="stop4118"
offset="1"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3962">
<stop
id="stop3964"
offset="0.0000000"
style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
<stop
id="stop4134"
offset="0.15517241"
style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
<stop
id="stop4346"
offset="0.75000000"
style="stop-color:#4074ae;stop-opacity:1.0000000;" />
<stop
id="stop3966"
offset="1.0000000"
style="stop-color:#36486c;stop-opacity:1.0000000;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3993"
id="radialGradient4019"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.791446,-14.01786,-11.28667)"
cx="-10.089286"
cy="33.506763"
fx="-10.089286"
fy="33.506763"
r="13.994944" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3993"
id="radialGradient4004"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.792374,-19.58761,2.818569)"
cx="-10.323107"
cy="31.329016"
fx="-10.323107"
fy="31.329016"
r="14.057444" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3993"
id="radialGradient3999"
cx="-10.323107"
cy="31.329016"
fx="-10.323107"
fy="31.329016"
r="14.057444"
gradientTransform="matrix(1,0,0,0.792374,0,6.785475)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient1312"
id="radialGradient3943"
cx="61.662098"
cy="24.241488"
fx="61.662098"
fy="24.241488"
r="13.994946"
gradientTransform="matrix(0.341185,-0.153831,1.08001,2.395374,-15.42222,-25.62103)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient1312">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop1314" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop1316" />
</linearGradient>
<linearGradient
id="linearGradient3993">
<stop
id="stop3995"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop3997"
offset="1"
style="stop-color:#000000;stop-opacity:0" />
</linearGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,1.140022,40.17678,1.347091)"
r="14.33462"
fy="18.499998"
fx="-22.375"
cy="18.499998"
cx="-22.375"
id="radialGradient3866"
xlink:href="#linearGradient2973"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4114"
id="radialGradient5000"
gradientTransform="scale(1.643990,0.608276)"
cx="15.115514"
cy="63.965388"
fx="15.115514"
fy="63.965388"
r="12.289036"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4989">
<stop
style="stop-color:#d3e9ff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop4991" />
<stop
style="stop-color:#d3e9ff;stop-opacity:1.0000000;"
offset="0.15517241"
id="stop4993" />
<stop
style="stop-color:#4074ae;stop-opacity:1.0000000;"
offset="0.75000000"
id="stop4995" />
<stop
style="stop-color:#36486c;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop4997" />
</linearGradient>
<linearGradient
id="linearGradient4977">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop4979" />
<stop
style="stop-color:#ffffff;stop-opacity:0.16494845;"
offset="1.0000000"
id="stop4981" />
</linearGradient>
</defs>
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Internet Category</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:contributor>
<cc:Agent>
<dc:title>Tuomas Kuosmanen</dc:title>
</cc:Agent>
</dc:contributor>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
<dc:source>http://jimmac.musichall.cz</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>internet</rdf:li>
<rdf:li>tools</rdf:li>
<rdf:li>applications</rdf:li>
<rdf:li>category</rdf:li>
</rdf:Bag>
</dc:subject>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Attribution" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
inkscape:label="Layer 1"
id="layer1">
<path
sodipodi:nodetypes="ccccc"
id="path2069"
d="M 23.854535,1.0445221 L 37.242155,18.355109 C 46.910607,29.935258 41.408532,44.012279 26.685812,45.088879 C 5.971353,45.671043 6.4202348,27.463218 11.166925,18.697769 L 23.854535,1.0445221 z "
style="fill:#b3b3b3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccccc"
id="path2071"
d="M 23.996861,3.5433428 L 36.057351,19.151045 C 44.769741,29.58253 39.419346,42.414092 26.125181,43.508521 C 7.3917365,44.015286 7.4275065,28.119221 12.17284,20.333442 L 23.996861,3.5433428 z "
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:1.1000706;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.36612022" />
<path
sodipodi:nodetypes="ccccccccc"
style="fill:#cfcfcf;fill-opacity:1;stroke:#000000;stroke-width:0.65121293;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 11.907735,28.259103 C 15.765379,27.553911 20.775812,26.031856 24.400866,26.377315 C 22.598873,25.111024 22.522108,24.694978 21.821837,23.470303 C 26.445155,22.178774 28.937476,23.679964 34.217776,26.922312 C 35.006715,25.3802 35.778476,24.67098 36.817957,22.869809 C 31.198009,18.792719 25.868522,17.760268 20.454911,19.207042 C 19.842813,18.404348 19.795799,17.541278 19.728831,15.812086 C 17.778356,18.179212 14.825215,22.457523 11.907735,28.259103 C 11.907735,28.259103 11.907735,28.259103 11.907735,28.259103"
id="path3463" />
<path
id="path3485"
d="M 36.668898,28.597896 C 32.811254,29.303088 27.800821,30.825143 24.175767,30.479684 C 25.97776,31.745975 26.054525,32.162021 26.754796,33.386696 C 22.131478,34.678225 19.639157,33.177035 14.358857,29.934687 C 13.569918,31.476799 12.798157,32.186019 11.758676,33.98719 C 17.378624,38.06428 22.708111,39.096731 28.121722,37.649957 C 28.73382,38.452651 28.780834,39.315721 28.847802,41.044913 C 30.798277,38.677787 33.751418,34.399476 36.668898,28.597896 C 36.668898,28.597896 36.668898,28.597896 36.668898,28.597896"
style="fill:#cfcfcf;fill-opacity:1;stroke:#000000;stroke-width:0.65121293;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="ccccccccc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1,402 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48px"
height="48px"
id="svg3440"
sodipodi:version="0.32"
inkscape:version="0.45"
sodipodi:docbase="/home/zach/deluge/trunk"
sodipodi:docname="deluge.svg"
inkscape:export-filename="/home/zach/deluge.png"
inkscape:export-xdpi="480"
inkscape:export-ydpi="480"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
sodipodi:modified="TRUE">
<defs
id="defs3">
<linearGradient
inkscape:collect="always"
id="linearGradient2973">
<stop
style="stop-color:#eeeeec;stop-opacity:1;"
offset="0"
id="stop2975" />
<stop
style="stop-color:#eeeeec;stop-opacity:0;"
offset="1"
id="stop2977" />
</linearGradient>
<linearGradient
id="linearGradient4126">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop4128" />
<stop
style="stop-color:#ffffff;stop-opacity:0.16494845;"
offset="1.0000000"
id="stop4130" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4114">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4116" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop4118" />
</linearGradient>
<linearGradient
id="linearGradient3962">
<stop
style="stop-color:#d3e9ff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop3964" />
<stop
style="stop-color:#d3e9ff;stop-opacity:1.0000000;"
offset="0.15517241"
id="stop4134" />
<stop
style="stop-color:#4074ae;stop-opacity:1.0000000;"
offset="0.75000000"
id="stop4346" />
<stop
style="stop-color:#36486c;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop3966" />
</linearGradient>
<radialGradient
r="13.994944"
fy="33.506763"
fx="-10.089286"
cy="33.506763"
cx="-10.089286"
gradientTransform="matrix(1,0,0,0.791446,-14.01786,-11.28667)"
gradientUnits="userSpaceOnUse"
id="radialGradient4019"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
r="14.057444"
fy="31.329016"
fx="-10.323107"
cy="31.329016"
cx="-10.323107"
gradientTransform="matrix(1,0,0,0.792374,-19.58761,2.818569)"
gradientUnits="userSpaceOnUse"
id="radialGradient4004"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.792374,0,6.785475)"
r="14.057444"
fy="31.329016"
fx="-10.323107"
cy="31.329016"
cx="-10.323107"
id="radialGradient3999"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.341185,-0.153831,1.08001,2.395374,-15.42222,-25.62103)"
r="13.994946"
fy="24.241488"
fx="61.662098"
cy="24.241488"
cx="61.662098"
id="radialGradient3943"
xlink:href="#linearGradient1312"
inkscape:collect="always" />
<linearGradient
id="linearGradient1312">
<stop
id="stop1314"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop1316"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3993">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3995" />
<stop
style="stop-color:#000000;stop-opacity:0"
offset="1"
id="stop3997" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient3866"
cx="-22.375"
cy="18.499998"
fx="-22.375"
fy="18.499998"
r="14.33462"
gradientTransform="matrix(1,0,0,1.140022,40.17678,1.347091)"
gradientUnits="userSpaceOnUse" />
<radialGradient
gradientUnits="userSpaceOnUse"
r="12.289036"
fy="63.965388"
fx="15.115514"
cy="63.965388"
cx="15.115514"
gradientTransform="scale(1.643990,0.608276)"
id="radialGradient5000"
xlink:href="#linearGradient4114"
inkscape:collect="always" />
<linearGradient
id="linearGradient4989">
<stop
id="stop4991"
offset="0.0000000"
style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
<stop
id="stop4993"
offset="0.15517241"
style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
<stop
id="stop4995"
offset="0.75000000"
style="stop-color:#4074ae;stop-opacity:1.0000000;" />
<stop
id="stop4997"
offset="1.0000000"
style="stop-color:#36486c;stop-opacity:1.0000000;" />
</linearGradient>
<linearGradient
id="linearGradient4977">
<stop
id="stop4979"
offset="0.0000000"
style="stop-color:#ffffff;stop-opacity:1.0000000;" />
<stop
id="stop4981"
offset="1.0000000"
style="stop-color:#ffffff;stop-opacity:0.16494845;" />
</linearGradient>
<linearGradient
id="linearGradient4825"
inkscape:collect="always">
<stop
id="stop4827"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop4829"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4114"
id="radialGradient6090"
gradientUnits="userSpaceOnUse"
gradientTransform="scale(1.64399,0.608276)"
cx="15.115514"
cy="63.965388"
fx="15.115514"
fy="63.965388"
r="12.289036" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4825"
id="radialGradient6098"
gradientUnits="userSpaceOnUse"
cx="12.071323"
cy="12.493138"
fx="12.071323"
fy="12.493138"
r="6.7175145" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient6103"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.25463,-0.898371,0.979785,0.277703,-18.00903,32.03312)"
cx="17.903898"
cy="40.159222"
fx="17.903898"
fy="40.159222"
r="14.33681" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient6106"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.583269,-0.431533,0.577146,0.78008,-5.80022,4.004109)"
cx="12.525543"
cy="38.09042"
fx="12.525543"
fy="38.09042"
r="14.33681" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient1312"
id="radialGradient6109"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.768231,1.13675,-0.820972,0.554824,-3.72248,-85.07126)"
cx="65.800331"
cy="27.16758"
fx="65.800331"
fy="27.16758"
r="12.972491" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4989"
id="radialGradient6115"
cx="16.651781"
cy="32.187485"
fx="16.651781"
fy="32.187485"
r="17.089519"
gradientTransform="matrix(1.486175,-1.536108,0.932321,0.902016,-38.10476,31.42646)"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.17254902"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="8"
inkscape:cx="36.250498"
inkscape:cy="38.275489"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1266"
inkscape:window-height="944"
inkscape:window-x="124"
inkscape:window-y="52"
inkscape:showpageshadow="false" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Internet Category</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:contributor>
<cc:Agent>
<dc:title>Tuomas Kuosmanen</dc:title>
</cc:Agent>
</dc:contributor>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
<dc:source>http://jimmac.musichall.cz</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>internet</rdf:li>
<rdf:li>tools</rdf:li>
<rdf:li>applications</rdf:li>
<rdf:li>category</rdf:li>
</rdf:Bag>
</dc:subject>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Attribution" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
sodipodi:type="arc"
style="fill:url(#radialGradient6090);fill-opacity:1;stroke:none;stroke-opacity:1"
id="path4112"
sodipodi:cx="24.849752"
sodipodi:cy="38.908627"
sodipodi:rx="20.203051"
sodipodi:ry="7.4751287"
d="M 45.052803 38.908627 A 20.203051 7.4751287 0 1 1 4.6467018,38.908627 A 20.203051 7.4751287 0 1 1 45.052803 38.908627 z"
transform="matrix(0.947409,0,0,1.17786,1.244375,-6.853427)"
inkscape:export-xdpi="480"
inkscape:export-ydpi="480" />
<path
style="fill:url(#radialGradient6115);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 23.942923,0.9561338 L 37.330543,18.266721 C 46.998995,29.84687 41.49692,43.923891 26.7742,45.000491 C 6.0597413,45.582655 6.5086231,27.37483 11.255313,18.609381 L 23.942923,0.9561338 z "
id="path2069"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#1b4075;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 35.111358,26.143133 C 28.972772,13.030586 17.560684,17.697957 17.274449,26.949974 C 16.894738,39.223415 34.748874,37.615429 36.715244,41.468778 C 28.821643,47.675479 14.973233,45.226508 10.962289,39.715204 C 6.9574776,34.212326 7.2383598,25.630263 10.784249,19.587632 C 24.158625,0.978654 39.749127,24.383766 35.111358,26.143133 z "
id="path2969"
sodipodi:nodetypes="cscscc" />
<path
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:1.1000706;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.36612022"
d="M 23.996861,3.5433428 L 36.057351,19.151045 C 44.769741,29.58253 39.419346,42.414092 26.125181,43.508521 C 7.3917365,44.015286 7.4275065,28.119221 12.17284,20.333442 L 23.996861,3.5433428 z "
id="path2071"
sodipodi:nodetypes="ccccc" />
<path
style="opacity:0.46;fill:url(#radialGradient6109);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 23.940758,0.96491709 L 34.727367,14.909752 C 42.647208,24.392311 40.447304,20.283975 28.362481,21.278846 C 25.083165,11.203805 18.13871,11.859899 13.523802,15.675236 L 23.940758,0.96491709 z "
id="path3945"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#radialGradient6106);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 35.159701,26.173667 C 29.021115,13.06112 18.734027,17.978491 18.447792,27.230508 C 18.068081,39.503949 34.797217,37.645963 36.763587,41.499312 C 28.869986,47.706013 15.021576,45.257042 11.010632,39.745738 C 7.0058197,34.24286 7.2867027,25.660797 10.832592,19.618166 C 24.206968,1.0091879 39.79747,24.4143 35.159701,26.173667 z "
id="path3868"
sodipodi:nodetypes="cscscc" />
<path
style="fill:url(#radialGradient6103);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 35.120795,26.14195 C 28.553327,12.814962 15.685968,17.224233 15.399733,26.47625 C 15.020022,38.749691 32.874158,37.141705 34.840528,40.995054 C 26.946927,47.201755 13.098517,44.752784 9.0875727,39.24148 C 5.0827617,33.738602 5.3636437,25.156539 8.9095327,19.113908 C 22.315509,0.47615954 40.03233,23.660113 35.120795,26.14195 z "
id="path4874"
sodipodi:nodetypes="cscscc" />
<path
transform="matrix(-0.829136,1.052307,1.239307,7.58326e-2,26.32898,25.58605)"
inkscape:r_cy="true"
inkscape:r_cx="true"
d="M 18.788838 12.493138 A 6.7175145 6.7175145 0 1 1 5.3538089,12.493138 A 6.7175145 6.7175145 0 1 1 18.788838 12.493138 z"
sodipodi:ry="6.7175145"
sodipodi:rx="6.7175145"
sodipodi:cy="12.493138"
sodipodi:cx="12.071323"
id="path4941"
style="opacity:0.21999996;color:black;fill:url(#radialGradient6098);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
sodipodi:type="arc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 607 B

View File

@ -1,350 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48px"
height="48px"
id="svg3440"
sodipodi:version="0.32"
inkscape:version="0.45.1"
sodipodi:docbase="/home/andrew/Projects/deluge-icons"
sodipodi:docname="downloading-border.svg"
inkscape:export-filename="/home/andrew/Projects/deluge-icons/downloading16.png"
inkscape:export-xdpi="32.603073"
inkscape:export-ydpi="32.603073"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs3">
<linearGradient
inkscape:collect="always"
id="linearGradient2973">
<stop
style="stop-color:#eeeeec;stop-opacity:1;"
offset="0"
id="stop2975" />
<stop
style="stop-color:#eeeeec;stop-opacity:0;"
offset="1"
id="stop2977" />
</linearGradient>
<linearGradient
id="linearGradient4126">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop4128" />
<stop
style="stop-color:#ffffff;stop-opacity:0.16494845;"
offset="1.0000000"
id="stop4130" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4114">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4116" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop4118" />
</linearGradient>
<linearGradient
id="linearGradient3962">
<stop
style="stop-color:#d3e9ff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop3964" />
<stop
style="stop-color:#d3e9ff;stop-opacity:1.0000000;"
offset="0.15517241"
id="stop4134" />
<stop
style="stop-color:#4074ae;stop-opacity:1.0000000;"
offset="0.75000000"
id="stop4346" />
<stop
style="stop-color:#36486c;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop3966" />
</linearGradient>
<radialGradient
r="13.994944"
fy="33.506763"
fx="-10.089286"
cy="33.506763"
cx="-10.089286"
gradientTransform="matrix(1,0,0,0.791446,-14.01786,-11.28667)"
gradientUnits="userSpaceOnUse"
id="radialGradient4019"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
r="14.057444"
fy="31.329016"
fx="-10.323107"
cy="31.329016"
cx="-10.323107"
gradientTransform="matrix(1,0,0,0.792374,-19.58761,2.818569)"
gradientUnits="userSpaceOnUse"
id="radialGradient4004"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.792374,0,6.785475)"
r="14.057444"
fy="31.329016"
fx="-10.323107"
cy="31.329016"
cx="-10.323107"
id="radialGradient3999"
xlink:href="#linearGradient3993"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.341185,-0.153831,1.08001,2.395374,-15.42222,-25.62103)"
r="13.994946"
fy="24.241488"
fx="61.662098"
cy="24.241488"
cx="61.662098"
id="radialGradient3943"
xlink:href="#linearGradient1312"
inkscape:collect="always" />
<linearGradient
id="linearGradient1312">
<stop
id="stop1314"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop1316"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3993">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3995" />
<stop
style="stop-color:#000000;stop-opacity:0"
offset="1"
id="stop3997" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient3866"
cx="-22.375"
cy="18.499998"
fx="-22.375"
fy="18.499998"
r="14.33462"
gradientTransform="matrix(1,0,0,1.140022,40.17678,1.347091)"
gradientUnits="userSpaceOnUse" />
<radialGradient
gradientUnits="userSpaceOnUse"
r="12.289036"
fy="63.965388"
fx="15.115514"
cy="63.965388"
cx="15.115514"
gradientTransform="scale(1.643990,0.608276)"
id="radialGradient5000"
xlink:href="#linearGradient4114"
inkscape:collect="always" />
<linearGradient
id="linearGradient4989">
<stop
id="stop4991"
offset="0.0000000"
style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
<stop
id="stop4993"
offset="0.15517241"
style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
<stop
id="stop4995"
offset="0.75000000"
style="stop-color:#4074ae;stop-opacity:1.0000000;" />
<stop
id="stop4997"
offset="1.0000000"
style="stop-color:#36486c;stop-opacity:1.0000000;" />
</linearGradient>
<linearGradient
id="linearGradient4977">
<stop
id="stop4979"
offset="0.0000000"
style="stop-color:#ffffff;stop-opacity:1.0000000;" />
<stop
id="stop4981"
offset="1.0000000"
style="stop-color:#ffffff;stop-opacity:0.16494845;" />
</linearGradient>
<linearGradient
id="linearGradient4825"
inkscape:collect="always">
<stop
id="stop4827"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop4829"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4114"
id="radialGradient6090"
gradientUnits="userSpaceOnUse"
gradientTransform="scale(1.64399,0.608276)"
cx="15.115514"
cy="63.965388"
fx="15.115514"
fy="63.965388"
r="12.289036" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4825"
id="radialGradient6098"
gradientUnits="userSpaceOnUse"
cx="12.071323"
cy="12.493138"
fx="12.071323"
fy="12.493138"
r="6.7175145" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient6103"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.25463,-0.898371,0.979785,0.277703,-18.00903,32.03312)"
cx="17.903898"
cy="40.159222"
fx="17.903898"
fy="40.159222"
r="14.33681" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2973"
id="radialGradient6106"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.583269,-0.431533,0.577146,0.78008,-5.80022,4.004109)"
cx="12.525543"
cy="38.09042"
fx="12.525543"
fy="38.09042"
r="14.33681" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient1312"
id="radialGradient6109"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.768231,1.13675,-0.820972,0.554824,-3.72248,-85.07126)"
cx="65.800331"
cy="27.16758"
fx="65.800331"
fy="27.16758"
r="12.972491" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.17254902"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="8"
inkscape:cx="34.258571"
inkscape:cy="32.884169"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1266"
inkscape:window-height="944"
inkscape:window-x="12"
inkscape:window-y="34"
inkscape:showpageshadow="false" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Internet Category</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:contributor>
<cc:Agent>
<dc:title>Tuomas Kuosmanen</dc:title>
</cc:Agent>
</dc:contributor>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
<dc:source>http://jimmac.musichall.cz</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>internet</rdf:li>
<rdf:li>tools</rdf:li>
<rdf:li>applications</rdf:li>
<rdf:li>category</rdf:li>
</rdf:Bag>
</dc:subject>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Attribution" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="fill:#8dd35f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.07523891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 23.942923,0.9561338 L 37.330543,18.266721 C 46.998995,29.84687 41.49692,43.923891 26.7742,45.000491 C 6.0597413,45.582655 6.5086231,27.37483 11.255313,18.609381 L 23.942923,0.9561338 z "
id="path2069"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:1.1000706;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.36612022"
d="M 23.996861,3.5433428 L 36.057351,19.151045 C 44.769741,29.58253 39.419346,42.414092 26.125181,43.508521 C 7.3917365,44.015286 7.4275065,28.119221 12.17284,20.333442 L 23.996861,3.5433428 z "
id="path2071"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#b7e399;fill-opacity:1;stroke:#000000;stroke-opacity:1;marker-end:none;stroke-width:0.7;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-linecap:round;stroke-linejoin:round"
d="M 19.34375 17.5625 C 19.34375 21.552083 19.34375 25.541668 19.34375 29.53125 C 17.636839 29.528128 15.925661 29.534372 14.21875 29.53125 C 17.623975 32.921687 21.032275 36.297063 24.4375 39.6875 C 27.880752 36.309591 31.337996 32.94041 34.78125 29.5625 C 32.928627 29.559111 31.071373 29.565889 29.21875 29.5625 C 29.21875 25.5625 29.21875 21.562501 29.21875 17.5625 C 25.927083 17.5625 22.635418 17.562501 19.34375 17.5625 z "
id="rect2634" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

View File

@ -1,2 +0,0 @@
Flag images found at http://www.hahn-hotel.com/flags/
"All sets provided by us are free to use to anyone, for commercial or non-commercial websites."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

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