summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* [Lint] Fix spelling mistakesHEADdevelopCalum Lind4 days
| | | | | | | 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.
* [UI] Add magnet icons for copy and add actionsCalum Lind4 days
| | | | | | | Added new magnet icons with a consistent naming scheme Run script to update all icons Co-authored-by: Matias Wilkman <matias.wilkman@gmail.com>
* [WebUI] Add menu option to copy magnet URIGargaj4 days
|
* [Core] Export torrent get_magnet_uri methodCalum Lind4 days
| | | | Returns a generated magnet uri from torrent info
* [i18n] Update translation PO files from LaunchpadCalum Lind11 days
|
* [GTKUI] Fix unhandled error with empty clipboardCalum Lind11 days
| | | | | | | 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
* [CI] Add core dump capture to GH jobCalum Lind2021-09-10
| | | | Add further debugging to trace segfaults with lt 1.2
* [#3310|Core] Change logging invalid session status key to debugCalum Lind2021-08-29
| | | | | | | | 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.
* [#3310|Stats] Fix constant session status key warningsiczero2021-08-29
| | | | | | | 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
* [#3478|Core] Fix loading magnet with resume_data and no metadataCalum Lind2021-08-29
| | | | | | | | | | | | | | | | | 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
* [Console] Fix using windows-curses on WindowsCalum Lind2021-08-01
| | | | | | 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.
* [Notifications] Fix email KeyError with status nameCalum Lind2021-08-01
| | | | | | | | | | | | 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
* [Tests] Fix skipping torrent test for libtorrent >= 1.2Calum Lind2021-08-01
| | | | Test is still failing with libtorrent 2 so also skip.
* [Tests] Fix incorrent twisted defer importCalum Lind2021-07-31
| | | | | 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.
* [CI] Add catchsegv to get a backtrace for segfaultsCalum Lind2021-07-31
| | | | | Encountering random libtorrent segfault with GitHub action so add catchsegv when running tests to get more information.
* [Install] Update and fix python optional requirementsCalum Lind2021-07-31
| | | | | | | | | | | | | | | * 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
* [GTKUI] Remove deprecated GTK attributesCalum Lind2021-07-25
|
* [i18n] Refactor loading libintl libraryCalum Lind2021-07-25
| | | | | Handle different names for libintl library on MacOS and Windows with fallback.
* Ignore TypeError with custom Twisted loggingCalum Lind2021-07-25
| | | | | | | | | | | | 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 - https://github.com/twisted/twisted/commit/6b894744e4d2439c1a4436d1e0e0b2a6cdff68e4
* [CI/CD] Add github actions to replace TravisCalum Lind2021-07-25
| | | | | | | | | | | | | | | | 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.
* [AutoAdd|3295] Correctly fix auto-adding magnetsCalum Lind2021-07-24
| | | | | | | | Properly fix adding magnets, first attempted in previous commit 2e466101fc20a add_torrent_magnet does not return a deferred so wrap in maybeDeferred. Fixed broken test due to new deluge website icon
* [AutoAdd] Fix magnet missing applied labelsRFBomb2021-04-17
| | | | | | | | | | | | | | | | | | | 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.
* [Core] Improve on_alert_tracker_error for lt >= 1.2DjLegolas2021-04-17
| | | | | | | | | | | 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
* [#3388|WebUI] Fix md5sums in torrent files breaking file listingCalum Lind2021-03-24
| | | | | | | | | | | | | | | | | | | 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
* [WebUI] Add test for torrent files containing md5sumsHans Ole Hatzel2021-03-24
| | | | | | | | 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.
* [CI/CD] Fix Tox SSL error in Windows Travis jobCalum Lind2021-03-24
| | | | | The tox sdist-make step failed with SSL: CERTIFICATE_VERIFY_FAILED so fix by install certifi to ensure updated SSL certificates are available.
* [CI/CD] Add Travis windows buildCalum Lind2021-02-23
| | | | | | | | | * 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
* [#3440] Fix httpdownloader reencoding torrent file downloadsCalum Lind2021-02-20
| | | | | | | | | | | | | | 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.
* [GTKUI] Fix torrentdetails tab bar position not savingCalum Lind2021-02-20
| | | | | | | | | 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.
* [#3441|GTKUI] Add a torrentdetails tabs position menuCalum Lind2021-02-20
| | | | | | | 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.
* Hide pygame community banner in consoleCalum Lind2021-02-20
| | | | | | | | 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
* [#3337|Core] Fix lt listen_interfaces not comma-separatedCalum Lind2021-02-06
| | | | | | | 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
* [#3325|Core] Fix unable to remove magnet with delete_copies enabledCalum Lind2021-02-05
| | | | | | | | | | | | | | | | 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.
* [WebUI] Add country flag alt/title for accessibilityVasilij Schneidermann2021-01-29
| | | | | This allows viewing the country in textual form by hovering the flag image and displays it if the image couldn't be loaded.
* [Tests] Fix console tests sometimes failing due to hard coded portbendikro2021-01-29
| | | | | | | | | 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
* [WebUI] Fix tracker icon download errorEFS2021-01-29
| | | | | | | | | | 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.
* [Console] Fix setting 'Skip' priority on consoleneeshy2021-01-29
| | | | | | | Selecting priorities 'Low' and 'Skip' on console will both set the actual priority to 'Low'. Fixed typo in previous commit 6655fe67c372
* [#3439] Execute plugin fails to run on Windowsscudre2021-01-29
| | | | Fixed TypeError: a bytes-like object is required, not 'str'
* [Lint] Update pre-commit hook and isort versionsCalum Lind2021-01-24
| | | | | | | | | | | | | * 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.
* [#3309|GTK] Fix cmp function for None typesCalum Lind2020-04-30
| | | | | | | | | | 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.
* [Console] Fix hostlist status lookup errorsCalum Lind2020-04-27
| | | | | | | | | | | | 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.
* [#3348] Fix TypeError adding peers to torrentsCalum Lind2020-04-25
| | | | | | | | | | | 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
* Ctl+Q to quit Deluge GTK without killing daemonNitzan Raz2020-04-25
|
* [Config] Fix loading config with double-quotes in stringCalum Lind2020-04-25
| | | | | | | | | | | | | 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 33e9545cd44 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.
* [Tests] Add pytest markers to tox.inibendikro2020-04-23
| | | | Remove pytest warnings due to unknown markers
* [Tests] Fix tests failing when deluged fails to listenbendikro2020-04-23
| | | | | | | | 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
* [Tests] Fix PytestDeprecationWarning from pytestbendikro2020-04-23
| | | | | | | | 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
* [GTK] Remove PyGIWarning in gtk3/files_tab.pybendikro2020-04-23
| | | | Remove warning: PyGIWarning: Gtk was imported without specifying a version first
* [GTK] Add more width to outgoing ports spinbuttons in network preferencesbendikro2020-04-23
| | | | | The spinbuttons would sometimes be truncated. Fix by increasing the width
* [GTK] Destroy the dialog before running the callbackbendikro2020-04-23
| | | | | | | | 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.