summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
* [WebUI] Sidebar: fix error for lazy initXuefer H2023-04-23
| | | | | | | When sidebar is hidden at WebUI startup, header isn't created yet. Signed-off-by: Xuefer H <xuefer@gmail.com> Closes: https://github.com/deluge-torrent/deluge/pull/419
* [WebUI] FilesTab: undefined setColumnValueXuefer H2023-04-23
| | | | | | | setColumnValue was removed Signed-off-by: Xuefer H <xuefer@gmail.com> Closes: https://github.com/deluge-torrent/deluge/pull/417
* [WebUI] use setTimeout instead of setIntervalXuefer H2023-04-23
| | | | | | | | | | 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
* [Core] Fix getting libtorrent alert typeCalum Lind2023-03-07
| | | | | | | | | | | 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.
* [Core] Refactor alert handler for readabilityCalum Lind2023-03-07
|
* [Tests] Autorun async tests with pytest_twisted.Chase Sterling2023-03-07
| | | | | | | | | | | 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
* [Component] Add pause and resume events methodsDjLegolas2023-03-06
| | | | | | For future use add ability to handle pause and resume events Co-authored-by: Calum Lind <calumlind+deluge@gmail.com>
* [Tests] Refactor component tests for readabilityCalum Lind2023-03-06
| | | | | | | | | | | 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
* [Component] Refactor to remove hasattr usageDjLegolas2023-03-06
| | | | | | Functions are defined in the class now https://github.com/deluge-torrent/deluge/pull/221#discussion_r228275050
* [Tests] Use tmp_path for test logfileCalum Lind2023-03-03
| | | | | | | | 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.
* [Tests] Fix error in TestJSONRequestFailed testCalum Lind2023-03-03
| | | | | | Fix test generating following error 'TestJSONRequestFailed' object has no attribute 'core'
* Add metainfo.xml to gitignoreCalum Lind2023-03-03
|
* [GtkUI] Enable remapping of keyboard shortcutsCalum Lind2023-03-03
| | | | | | | | | | | | | | | | | 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>
* [WebUI] Fix setting base pathCalum Lind2023-03-03
| | | | | | | | | | | | | | | | | 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
* [WebUI] Minor refactoringCalum Lind2023-03-03
| | | | | | Simplify getting port for WebUI tests Extract adding slashes to base to function Use super function to simplify parent class calls
* [Tests] Fix save_resume_data errors in test_torrentCalum Lind2023-02-28
| | | | | | | | | 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
* [Tests] Fix component warning in Plugin testsCalum Lind2023-02-28
| | | | | | | | | | | | | 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
* [Tests] Remove unneeded component teardownCalum Lind2023-02-28
| | | | The component fixture calls shutdown so teardown not needed here
* [Tests] Ignore 3rd-party deprecation warnings in pytestCalum Lind2023-02-27
| | | | | | | Move pytest config from tox to pyproject and ignore deprecation warning generated in 3rd-party libraries. Fixed GObject deprecation warning
* [console] Fix host deletionDjLegolas2023-02-27
| | | | | | | The host id didn't receive correctly and the indexing was not being updated correctly. Closes: https://github.com/deluge-torrent/deluge/pull/393
* [console] Fix add host in connection managerDjLegolas2023-02-27
| | | | | | | | 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
* [hostlist] Add port value validationDjLegolas2023-02-27
| | | | | | 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.
* [Console] Refactor Eventlog for readabilityCalum Lind2023-02-27
|
* [Console] Move migration func out of mainCalum Lind2023-02-27
|
* [Console] Move eventlog class to separate fileCalum Lind2023-02-27
|
* [Console] Refactor callbacks and cleanup mainCalum Lind2023-02-27
|
* [Console] Cleanup terminal resize handlerCalum Lind2023-02-27
| | | | | | | | | | | | 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
* [Console] Refactor main to use async instead of callbacksCalum Lind2023-02-27
| | | | | Use the new maybe_coroutine decorator to replace callbacks with inline async/await for cleaner code.
* [GTK] Fix Add-torrent-dialog not respecting dirsDjLegolas2023-02-24
| | | | | | | | | | | | 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
* [Lint] Update pre-commit apps to latest versionsCalum Lind2023-02-24
| | | | Also update github CI action versions
* [Lint] Fix pre-commit isort install errorCalum Lind2023-02-24
| | | | | | | | | 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
* Update metainfo install pathTorbjörn Lönnemark2023-02-24
| | | | | | | | | | The metainfo file was being installed into /usr/share/appdata, but that path has been deprecated. Metainfo files should instead be installed into /usr/share/metainfo. Closes: https://dev.deluge-torrent.org/ticket/3394 Ref: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#sect-Metadata-GenericComponent Closes: https://github.com/deluge-torrent/deluge/pull/389
* [Packaging][Windows] Add DisplayVersion registry keyDjLegolas2023-02-24
| | | | | | | | This addition will help tools (e.g. `winget`) to identify the version of deluge Closes: https://dev.deluge-torrent.org/ticket/3560 Closes: https://github.com/deluge-torrent/deluge/pull/402
* [Label] fix torrent deletion not removes from configDjLegolas2023-02-24
| | | | | | | | | when deleting a torrent, the on deletion hook deletes the torrent from the local config but does not save the new config to disk. note that when setting a new label to a torrent, the config does save. Closes: https://dev.deluge-torrent.org/ticket/3545 Closes: https://github.com/deluge-torrent/deluge/pull/397
* [Lable] Fix label display name in submenuJohnTheCoolingFan2023-02-24
| | | | | | Previously every '_' in label's name was incorrectly replaced by '__' Closes: https://github.com/deluge-torrent/deluge/pull/410
* [GTK3UI] Fix too low upper limit of upload/download in add torrent dialogTydus2023-02-24
| | | | Closes: https://github.com/deluge-torrent/deluge/pull/398
* [Core] Stop using libtorrent.add_torrent_params_flags_tDjLegolas2023-02-24
| | | | | | | | | | The `libtorrent.add_torrent_params_flags_t` is deprecated and when `libtorrent` is being compiled without deprecated functionality, we will fail on `AttributeError`. Refs: https://github.com/arvidn/libtorrent/commit/4947602a2fa634a84a2ac2c05f544726edf40d1c Closes: https://dev.deluge-torrent.org/ticket/3581 Closes: https://github.com/deluge-torrent/deluge/pull/407
* [ConsoleUI] remove `deferred` being returned after commandDjLegolas2023-02-24
| | | | | | | | | | | A `return` statement was added in ece31cf for unit testing to work but this resulted in Deferred printed in console output. Added a test_start entry point to return the required deferreds while removing the return from original start entrypoint. Closes: https://dev.deluge-torrent.org/ticket/3582 Closes: https://github.com/deluge-torrent/deluge/pull/408
* [tox] update tox.ini for support for `tox` 4DjLegolas2023-02-23
| | | | | | | `tox` 4 now demands that `passenv` parameter will be comma-separated and not space-seperated. Closes: https://github.com/deluge-torrent/deluge/pull/409
* [AutoAdd] Fixes #3515 - check for more torrent decode errorsRyan Ernst2023-02-23
| | | | | | | | | | | | | | | https://github.com/deluge-torrent/deluge/pull/381 improved the situation with possible errors during torrent decoding. However, the log message in https://dev.deluge-torrent.org/ticket/3515 indicates a RuntimeError: ``` Traceback: <class 'RuntimeError'>: unexpected end of file in bencoded string ``` This commit adds RuntimeError to those caught while loading the torrent to add. Closes: https://github.com/deluge-torrent/deluge/pull/411
* [CI] Fix tests stalling/timing outCalum Lind2022-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [CI] Fix installing enchant for github docs workflowCalum Lind2022-12-01
| | | | | | | | 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.
* [WebUI] Fix `TypeError` in DelugeWeb constructorDjLegolas2022-12-01
| | | | | | | | | | 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
* Update changelog from 2.1.1 releaseCalum Lind2022-07-10
|
* [Docs] Update changelog and install detailsCalum Lind2022-07-08
|
* Fix parsing magnet with tracker tiersCalum Lind2022-07-08
| | | | | | | | | 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
* Fix missing trackers adding magnetsCalum Lind2022-07-05
| | | | | | | | | | | 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
* [CI] Bump ifaddr to 0.2.0Calum Lind2022-06-30
| | | | | With release of ifaddr 0.2.0 no longer need to pin to github commit to resolve Windows decoding issues.
* [CI] Fix failing Windows Python 3.10 testsCalum Lind2022-06-29
| | | | | | | | | | | | | | | | | | 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
* back to developmentdeluge-2.1.1.dev0Calum Lind2022-06-28
|