CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Website.lnk" "$INSTDIR\homepage.url"
gets made in the installer but the uninstaller was looking for
Delete "$SMPROGRAMS\$StartMenuFolder\Deluge Website.lnk"
therefore this file was being left behind and since the folder was not empty
$StartMenuFolder\Deluge
was being left behinde as well.
Closes: https://github.com/deluge-torrent/deluge/pull/426
In some cases, when emiting events with EventManager.emit_event(), the underlying
dictionary of interested sessions can change during iteration, causing:
RuntimeError: dictionary changed size during iteration
Fix by iterating over a copy of the dictionary.
Closes: https://dev.deluge-torrent.org/ticket/3351
Closes: https://github.com/deluge-torrent/deluge/pull/425
When adding a torrent in the add torrents dialog, containing only
a single directory with a single file inside, the directory is not
included as a prefix to the filename.
The prefix is added only if there are multiple files inside the directory.
Fix by adding the prefix also when there is only one file inside a dir.
Closes: https://dev.deluge-torrent.org/ticket/3602
Closes: https://github.com/deluge-torrent/deluge/pull/424
With an existing Deluge package installed on the system errors were
occuring trying to start a development instance in virtualenv.
Fixed by replacing usage of deprecated pkg_resource for finding
non-python data files. Includes fallback for Python 3.7/3.8 but drops
Python 3.6 support.
The plugins are still using pkg_resources since they are distributed as
eggs and importlib extracts those data files differently to
pkg_resources so requires a different solution, either as a file stream
or manually cached when plugins are installed.
Closes: https://github.com/deluge-torrent/deluge/pull/403
Co-authored-by: DjLegolas <djlegolas@protonmail.com>
On GNOME, I don't believe any tray icon or indicator support is enabled
by default, but one can easily install an extension for indicators
whereas I'm not sure about tray icons, but the 'top icons' extension I
believe has had a flaky history. I'm not entirely sure how KDE handles
things, but out of the box it too has indicator support and I believe
that is preferred with the move to Wayland. In Xfce, the tray icon area
is called "Status tray" and has support for both tray icons and
indicators.
Closes: https://github.com/deluge-torrent/deluge/pull/318
Issue with legacy tray icon being used despite AyatanaAppIndicator3
installed. The problem is due to option to use AppIndicator not being
shown in Preferences.
Fixes: https://dev.deluge-torrent.org/ticket/3598
When server is busy or the request is slow for big file list, WebUI still
requests for new update blindly. "Connection lost" is often triggerd.
Change to only ask for update 2s after reponse (either success or error)
Signed-off-by: Xuefer H <xuefer@gmail.com>
Closes: https://github.com/deluge-torrent/deluge/pull/416
Encountered a problem with dht_error alert not returning the correct
alert name using Python type.
This should likely be fixed in libtorrent but we should be using
the alert.what method to determine alert type/name.
Since the alert name does not include the `_alert` suffix, strip this
when registering alerts.
Since all of our async tests should be run with twisted, it's
annoying to have to decorate them with pytest_twisted.ensureDeferred.
Forgetting to do this will cause the test to pass without actually
running. This changes the behavior to detect all coroutine function
tests and mark them to be run by pytest_twisted the same way the
decorator does.
Closes: https://github.com/deluge-torrent/deluge/pull/414
Modified test functions to be async.
Used pytest_twisted_ensuredeferred_for_class decorator to avoid needed
ensureDeferred for each test within the class. There might be a way to
do this with fixtures so likely to be improvements for use in all test
classes.
Used Mock in component subclass for simpler tracking of event method calls
Daemon logfile were being stored in dir where tests were started from
which cluttered up local dev env.
Entry point logfiles are stored in config dir since getting tmp_path in
set_up was a bit too tricky.
With key shortcuts set in the glade files it is not easy to change
the shortcuts on macOS.
Add AccelPaths to each MenuItem to allow adding or modifying accelerator
in codes. Uses the recommended format `<Deluge-MainWindow>/MenuName`
Update menubar code to use new functionality, taking advantage of
accelerator_parse to specify accelerators as strings instead of Gdk
flags.
A future idea would be to use `Gtk.AccelMap.load` to have shortcuts
loaded from user config.
Co-authored-by: Gregorio Litenstein <g.litenstein@gmail.com>
Simplify the code for setting the base path, both via headers and
config. Replaced putchild since it is not recommended for dynamic
paths and overriding getChildWithDefault provides a proper solution.
This also fixes recursive base path problem with previous code where
appending base paths to URL would still return Deluge web e.g.
http://localhost:8112/deluge/deluge/deluge
Removed getChild override by consolidating empty path conditional to
getChildWithDefault. This simplifies and combines the returning of
TopLevel resource for root path or base path.
Added workaround for test logfile error with forwardslash in filename
Error in test_rename_unicode:
TypeError: object MagicMock can't be used in 'await' expression
Fixed by using AsyncMock that can be awaited.
Added backport asyncmock for Python 3.7
The component fixture was warning about existing registered components since
the standalone client was setup before the componentregistry test was performed.
The problem is due to fixture ordering with the setup fixture running
first since it was marked with autouse followed by component fixture.
* Fixed warning by moving component fixture as a dependency of the set_up fixture
* Cleaned up unneeded code
* Added try..except to catch CorePluginBase KeyError deregistering
RPCServer since component fixture already removed it.
* Ignore test-specific Twisted readBody warnings
The input is being passed as `str` instead of `int`, so added a
conversion only if the string is indeed a decimal number.
In addition, closing the add host popup after adding it.
Closes: https://dev.deluge-torrent.org/ticket/3538
When in console, and adding a new host with an invalid port number, the
console starts printing many exceptions regarding the value.
Therefor, we will make sure that the port value is between 0 and 65535.
Improve readability
Move imports available on Windows out of try..except.
For future reference in Python 3.11 termios now has window size methods
but the added complexity of handling older Python versions is not worth
it.
https://docs.python.org/3/library/termios.html#termios.tcgetwinsize
When adding a new torrent, there is a problem changing the path on
Windows machines, due to the difference between the way the files are
being read from the torrent and how we handle them in addtorrentdialog.
This effects both changing and showing the files in the UI.
Now, all path seperator is being considered and converted to slash '/'.
Closes: https://dev.deluge-torrent.org/ticket/3541
Closes: https://github.com/deluge-torrent/deluge/pull/395
Update to latest version of isort to fix install error:
RuntimeError: The Poetry configuration is invalid:
- [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'
Also update the Linting CI to latest version