Console.get_torrent_name() expects string, but was given list from console.match_torrent(), so NoneType breaking join() in move message.
Console.get_torrent_name() expects string, but was given list from console.match_torrent(), so NoneType breaking join() in move message. Simplified and fixed now.
Co-authored-by: Calum Lind <calumlind+deluge@gmail.com>
Closes: https://github.com/deluge-torrent/deluge/pull/447
In commit 9d802b2 I pushed a change to tests which included a revert of
Windows pinned dependencies which was an accident. The actual change
should only have reverted setup.py pinned dependency since we down want
a release to not be able to use a later fixed version of Twisted.
As PEP 594 says, cgi module is marked as deprecated
in python 3.11, and will be removed in 3.13
(actually removed at least in 3.13 rc1).
As suggested on PEP 594, replace cgi.parse_header
with email.message.EmailMessage introduced in python 3.6.
Updated test modify test_download_with_rename_sanitised
- With RFC2045 specification, Content-Disposition filenames
parameter containing slash (directory separator) must be
quoted, so changing as such.
Ref: https://peps.python.org/pep-0594/#deprecated-modules
Ref: https://peps.python.org/pep-0594/#cgi
Closes: https://github.com/deluge-torrent/deluge/pull/462
test_pop_alerts raised the following error:
File "/home/runner/work/deluge/deluge/deluge/core/alertmanager.py", line 177, in handle_alerts
handler=handler.__qualname__,
File "lib/python3.10/unittest/mock.py", line 645, in __getattr__
raise AttributeError(name)
AttributeError: __qualname__
Mocks don't generate dunder methods like `__qualname__` attribute so
we need to manually specify it.
The bottom options for cancel/apply/ok where confusing for end-users as being checkboxes needing spacebar prepended to activate firstly, before return/enter to activate said previous selection, but changed now to omit. Also fixed not showing canceled options as sticking.
Co-authored-by: Calum Lind <calumlind+deluge@gmail.com>
Closes: https://github.com/deluge-torrent/deluge/pull/445
Change name to gir1.2-appindicator3-0.1. Tested on Ubuntu 22.04.4 LTS
and Ubuntu 20.04.6 LTS.
Replace appindicator3 refs with newer ayatanaappindicator3
Replace broken python-appindicator link with working jammy link.
Closes: https://github.com/deluge-torrent/deluge/pull/459
When setting a language, we set 2 environment variables at run time.
Setting the language back to `System Default`, we don't clean those env
variables.
In the WebUI, the page only reloads, and we still use the env variables
to set the language back to the previous one.
This does not affect GTK.
Closes: https://dev.deluge-torrent.org/ticket/3635
Closes: https://github.com/deluge-torrent/deluge/pull/450
The test_pause_not_pop_alert test passes on Linux but is consistently failing
in CI pipeline for Windows:
AssertionError: Expected 'mock' to not have been called. Called 1 times.
Calls: [call.deferred.cancel(),
call(LtAlertMock(type=1, name='mock_alert1', message='Alert 1'))].
Disabling the test until it can be resolved.
The GTK option for dark theme only provides a preference to use the dark
theme, there is not a similar option for light theme so the settings
should only refer to 'prefer dark theme' and whether it's on or off.
Simplify searching for themes and ensure theme is ordered last.
Ideally themes would be set client-side but seems to be quite tricky to
accomplish with ExtJS.
For me at least, Safari on Mac OS X, the tracker icon significantly
overflows in the Tracker column of the torrent list. (It does show the
correct size in the Trackers filter, though. Different CSS.)
This change causes it to constrain down to the height of the column and
display correctly.
Closes: https://github.com/deluge-torrent/deluge/pull/440
If a dir exists with no contents then the following error occurred:
```
Traceback (most recent call last):
...
File "/usr/lib/python3.10/site-packages/deluge/ui/web/json_api.py", line 608, in _on_got_files
dirinfo['progress'] = sum(progresses) / dirinfo['size'] * 100
builtins.ZeroDivisionError: float division by zero
```
Closes: https://github.com/deluge-torrent/deluge/pull/439
We cannot handle an alert after calling lt.pop_alerts for a subsequent
time since the alert objects are invalidated and with cause a segfault.
To resolve this issue add a timeout to the handler calls and wait in the
alert thread for either the handlers to be called or eventually be
cancelled before getting more alerts.
This is still not an ideal solution and might leave to backlog of alerts
but this is better than crashing the application. Perhaps the timeout
could be tweaked to be shorter for certain alert types such as stats.
Related: https://github.com/arvidn/libtorrent/issues/6437
The change ownership menu item was broken due to Gtk deprecation
changes in commit #bcaaeac.
Fixed by correctly setting the RadioMenuItem group
Refactored to simplify the code
Removed dead or unneeded code
Fixes: https://dev.deluge-torrent.org/ticket/3610