Commit Graph

8370 Commits

Author SHA1 Message Date
Calum Lind 50c476c41d Update man pages to reflect ui arg changes
- Also fixup help output details
2017-03-14 14:58:59 +00:00
Calum Lind 8232505961 [#2996] [Console] Fix duplicate commands in help output
- The duplicate entries were actually the aliases for commands
   but the command name not the alias was being returned.
2017-03-14 14:57:53 +00:00
Calum Lind 966678196e [WebUI] Use error logging and add exception message detail 2017-03-01 14:47:42 +00:00
Calum Lind 11e8957dea [WebUI] Only accept application/json content-type requests
- Protects against CSRF (Cross-site request forgery)
2017-03-01 14:47:42 +00:00
Calum Lind ec5c8bafb6 [#2815] [Console] Fix 'add' cmd path inconsistency on windows
When adding a torrent with a download location from command prompt
2017-02-23 19:30:42 +00:00
Calum Lind fb8dc42acf [Core] Catch None type country in get_peers 2017-02-23 19:16:04 +00:00
Calum Lind 4df88c0df3 [UI] Refactor appdata.xml code and markup translatable text 2017-02-23 19:02:32 +00:00
Matthias Mailänder 3529036f55 [UI] Add an appdata.xml file
For Linux software gallery integration.
2017-02-23 19:01:44 +00:00
Calum Lind f2b77c8635 [WebUI] Linting trailing comma 2017-02-23 16:52:06 +00:00
Calum Lind 49e5611f65 Remove unicode_literal from plugins setup.py
There is a bug in Py2 setuptools where the build fails if unicode dict keys
 are passed to package_data:

    `package_data must be a dictionary mapping package names to lists of wildcard patterns`

 The easiest workaround is to remove unicode_literals use in setup.py as it is not that important.
2017-02-23 16:48:05 +00:00
Matias Wilkman d75afc007d [GTKUI] Parse u:p@host:port pasted into proxy or connection manager 2017-02-23 09:46:39 +00:00
Calum Lind b32c5d8247 [Daemon] Improve logging when another process is using listen port 2017-02-23 09:31:58 +00:00
Calum Lind b2db96e4df [Py2to3] Refactor out usage of unicode and basestring
- Python 3 renames `unicode` type to `str` and introduces `bytes` type.
 - Python 2.7 has `bytes` but is only an alias for `str` so restricted
   to comparisons but helps keep compatibility.
 - To test for unicode string on Py2 and Py3 uses the "''.__class__" type.
 - Remove usage of utf8encode and just encode, problems with bytes being passed
   in code will be picked up faster.
 - Where possible refactor out isinstance for try..except duck-typing.
2017-02-23 00:35:43 +00:00
Calum Lind 52a85cb91c [Console] Fix showing file priorites 2017-02-23 00:30:56 +00:00
Calum Lind beb4f8c8f9 [Common] Rename decode_string to decode_bytes
- Switch to using Python 3 naming convention where str now refers to unicode
   and bytes are encoded strings.
 - Cleanup docs and code
 - Also rename convert_to_utf8 to utf8_encode_structure to clarify functionality.
2017-02-23 00:30:10 +00:00
Calum Lind 3b1eeb0818 Use Ubuntu Trusty on Travis 2017-02-23 00:21:33 +00:00
Calum Lind 9ad2f50fa4 [Common] Decode byte strings for TorrentInfo 2017-02-23 00:21:33 +00:00
Calum Lind bbd2661acb [WebUI] Fix missing low.png for file priority 2017-02-23 00:21:33 +00:00
Calum Lind b2a2995c0d [GTKUI] Use int not string number for select_path 2017-02-23 00:21:32 +00:00
Calum Lind 5a9784ff4d Fix msgfmt for Python 3 and unicode_literal 2017-02-23 00:21:32 +00:00
Calum Lind ba41110c27 [WebUI] Markup byte strings for twisted request 2017-02-22 12:45:12 +00:00
Calum Lind 608ecae5fd [Console] Use raw string for regex compile 2017-02-22 12:45:12 +00:00
Calum Lind 04b8b14828 [Console] Use io.open to en/decode utf8 files 2017-02-22 12:45:11 +00:00
Calum Lind 4619b31aa3 [Console] Ensure opening torrent files in binary mode 2017-02-22 12:45:11 +00:00
Calum Lind e3b8aaf276 [Tests] Markup byte strings to fix tests 2017-02-22 12:45:11 +00:00
Calum Lind 1d9733014a [Core] Fixup maketorrent for unicode_literals
* Added a new convert_to_utf8 function to common that is handy for
   any nested dictionaries etc.
 * Small refactor to get rid of duplicate code and comment will be
   encoded by convert_to_utf8 function.
 * Passes test_maketorrent.
2017-02-22 12:36:33 +00:00
Calum Lind 304ad1e72d [Lint] Add missing copyright header to files 2017-02-22 12:36:33 +00:00
Calum Lind ff6cec251a [Core] Markup byte-strings to fix httpdownloader and core tests
* Twisted methods require byte-string arguments.
 * The headers str conversion in httpdownloader _download_file was
   incorrent and left the dict key still as unicode so replaced with
   a dict comprehension (py2.7 requirement).
2017-02-22 12:36:33 +00:00
Calum Lind 84802da29b [Py2to3] Force unicode_literals and fix related issues
* Added `from __future__ import unicode_literals` to every file so
   now all strings in code are forced to be unicode strings unless
   marked as byte string `b'str'` or encoded to byte string `'str'.encode('utf-8')`.

   This is a large change but we have been working towards the goal of unicode
   strings passed in the code so decoding external input and encoding
   output as byte strings (where applicable).

   Note that in Python 2 the `str` type still refers to byte strings.

 * Replaced the use of `str` for `basestring` in isinstance comparison as
   this was the original intention but breaks code when encoutering unicode strings.

 * Marked byte strings in gtkui as the conversion to utf8 is not always handled, mostly
   related to gobject signal names.
2017-02-22 12:36:32 +00:00
Calum Lind 011afe3e89 [#2879] [OSX] Fix dyld error opening file from within Deluge
- Using DYLD_LIBRARY_PATH seems to have the unintended effect of making associated apps
   unusable (unable to locate dylds) when opening a file from within Deluge. The workaround
   for now is to switch to using DYLD_FALLBACK_LIBRARY_PATH.
2017-02-22 11:20:51 +00:00
Calum Lind b7162fab36 [#2956] Fix empty file_priorities with magnets 2017-02-21 10:37:09 +00:00
Calum Lind f6e2dab58a [#2826] Fix create_torrent filedump not encoded 2017-02-21 10:13:30 +00:00
Calum Lind 4a62c5eac2 [Core] Switch move_storage flag to dont_replace 2017-02-21 10:10:57 +00:00
Calum Lind dd30bad96a [WebUI] Log successful logins with associated ip 2017-02-20 18:37:44 +00:00
Calum Lind c2c0fe86f9 [#2957] [GTKUI] Fix AttributeError in torrentview column sort 2017-02-20 13:28:36 +00:00
Calum Lind 14d9b6cfcb Temp workaround for critical pickle trackers lt bug 2017-02-20 12:45:44 +00:00
Calum Lind df4d97c447 [Tox] Twisted version pin to 16.6
* There is a problem with Twisted 17 and the setup for travis and tox
   using site-packages with an old openssh package.

       AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'

 * The simplest workaround for now is to pin Twisted to 16.6.
2017-02-14 18:59:34 +00:00
Calum Lind a7826c4f90 [Core] Use fallback message for empty tracker error status 2017-01-28 15:23:08 +00:00
Calum Lind 8c26c83c4d [#2960] Fix typo in storage moved alert 2017-01-28 14:27:27 +00:00
Calum Lind 6b49f844dc [GTKUI] Fix showing cache status ratio 2017-01-26 12:49:56 +00:00
Calum Lind 4a344e382b [UI] [Core] Update and refactor proxy settings
* Combine I2P into proxy settings.
2017-01-26 12:49:55 +00:00
Calum Lind 108dd9e4b8 Add temporary libtorent git RC_1_1 branch requirement 2017-01-26 12:49:55 +00:00
Calum Lind b71a2fa549 [Tox] Remove py26 and add lt version output to trial 2017-01-26 12:49:55 +00:00
Calum Lind 3ca012ee63 Change libtorrent minimum dependency to 1.1.1
* Change PPA to develop for Travis to use libtorrent 1.1
2017-01-26 12:49:55 +00:00
Calum Lind 706d53ab4a [Core] Move readonly key setting closer to config init 2017-01-26 12:49:38 +00:00
Calum Lind 2321f32f84 [Core] Fix double alert messages 2017-01-26 12:49:36 +00:00
Calum Lind d1dd35d4b1 [Tests] Suppress file descriptor limit warning 2017-01-26 12:49:27 +00:00
Calum Lind a5de64a19c [Stats] Update session status keys 2017-01-26 12:49:25 +00:00
Calum Lind 5d7c1336b9 [Core] Use new lt torrent moving_storage status 2017-01-26 12:49:04 +00:00
Calum Lind 93898d6475 [Core] Use single underscore for private methods 2017-01-26 12:49:02 +00:00