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
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
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.
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
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
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.
- 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.
- 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.
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.
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.
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.
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.
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.