Commit Graph

8444 Commits

Author SHA1 Message Date
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
Calum Lind 4caf05c092 [Core] Refactor torrent.set_file_priorities 2017-01-26 12:49:02 +00:00
Calum Lind 6083a3078e [Core] Minor cleanup of preferencesmanager 2017-01-26 12:49:01 +00:00
Calum Lind 0160bb1c91 [Lint] Fix pylint warnings in setup.py 2017-01-26 12:48:52 +00:00
Calum Lind e7ce389e84 [Tests] Fix test_ui_entry failure with libtorrent 1.1
- With libtorrent 1.1 dht is enabled from startup and the returned status
   contains DHT node values (i.e. non-zero). Should be sufficient to only test for start
   and end of the status string to be correct.
2017-01-26 12:48:50 +00:00
Calum Lind 0f2083db62 [UI] [Core] Convert to session_stats_alert for session status
* Use session disk stats for cache status
2017-01-26 12:48:50 +00:00
Calum Lind 3ed7202253 [Core] Remove deprecated lt torrent priority 2017-01-26 12:48:43 +00:00
Calum Lind 089c0be89b [Core] Replace deprecated lt.fingerprint with peer_fingerprint setting 2017-01-25 12:35:33 +00:00
Calum Lind fc902af10c [Core] Remove all lt 1.1 deprecated code references 2017-01-18 14:19:37 +00:00
Calum Lind a481c4d243 [UI] Update UIs for new default piece priority
- libtorrent 1.1 changes default piece priorty to 4 so changes to
   the UIs are required. Some refactoring and improvements were made as well:

    - A new 'Low' priority introduced that is values 1-3.
    - 'Normal' priority is now value 4.
    - Removed 'Highest' with the addition of 'Low' and 'High' is now values 5-7.
    - Renamed 'Do not download' to 'Ignore' so it is more succinct.
    - Moved file priority constant to ui.common.
2017-01-18 12:33:27 +00:00
Calum Lind bb44411a50 [Core] Check valid torrent first in alert handlers 2017-01-18 12:33:26 +00:00
Calum Lind 1e4a24c474 [Docs] Fix docstring return type format in config.py
* With new version of Sphinx 1.5 the warning below was generated, caused
   by incorrect formatting of return type in docstring.

     docstring of deluge.config.find_json_objects:None:
     WARNING: more than one target found for cross-reference u'start'
2017-01-12 11:13:28 +00:00
Calum Lind 993a0f71af [UI] Fix usage of 'with Image.open' in tracker_icons
* Revert changes made to fix 'too many files open' as Image.open does
      not return a file descriptor and generated the following error:

          exceptions.AttributeError: 'NoneType' object has no attribute 'startswith'
2017-01-12 10:11:08 +00:00
Calum Lind 283ad6137d Fix isfile() typo in setup.py 2017-01-09 18:02:28 +00:00
Calum Lind 6743b0c813 [Core] Relocate add_torrent_alert to alerts section 2016-11-30 23:21:46 +00:00
Calum Lind b69ba02652 [Core] Refactor default add torrent flags into a constant 2016-11-30 23:21:45 +00:00
Calum Lind 915f2bf9e7 [Core] Move alert logging to alertmanager 2016-11-30 22:53:18 +00:00
Calum Lind 59b01b363c [Core] Refactor TM register of alert and set funcs 2016-11-30 22:53:18 +00:00
Calum Lind c5e623ae45 [Core] Refactor of priorities code and test 2016-11-30 22:53:18 +00:00
Calum Lind 425af00ebf [GTKUI] Fix the translation of tracker status 2016-11-30 20:43:34 +00:00
Calum Lind 373c8a14b0 [WebUI] Remove duplicated translation code 2016-11-30 20:43:29 +00:00
Calum Lind 5f4a16630e Fix a typo in minify script 2016-11-28 19:20:05 +00:00
Calum Lind 3260db416a [Core] Add a quick fix for lt1.1 default priority change 2016-11-28 19:18:48 +00:00
Calum Lind 9cefbc6e5d [Setup] Refactor BuildWebUI class 2016-11-28 18:59:25 +00:00
Calum Lind 14a5156e15 [Setup] Move package variables to top of file
- Refactor _data_files list so icons paths are auto-generated.
2016-11-28 18:58:45 +00:00
Calum Lind 259c9f11e6 [Setup] Rearrange order of some classes 2016-11-28 17:44:22 +00:00
Calum Lind fd1261ab65 [Setup] Create a CleanTranslations class 2016-11-28 17:44:20 +00:00