313 Commits

Author SHA1 Message Date
Calum Lind
480347296b Fix a mistake in tm finished alert 2014-07-19 20:08:47 +01:00
Calum Lind
49c2be40ab Use flush_disk_cache as a shutdown marker
This is a hacky fix for waiting_on_resume_data not being empty on
shutdown. This issue needs further investigating.
2014-07-18 13:25:50 +01:00
Calum Lind
a65603e10c [#1032] Keep track of torrent errors over restarts
* Add error_statusmsg to TorrentState
 * Adds a new set_error_statusmsg() method to force torrent error state.
 * Any torrent in error state will remain in that state on restart with
   additional message in status.
 * Any new libtorrent errors will override manually set ones.
2014-07-18 13:08:47 +01:00
Calum Lind
7393d31208 Refactor TorrentState to build the class attributes 2014-07-18 12:46:56 +01:00
Calum Lind
c82164c522 [#2161] Save magnet torrent_info to 'copy of' location
When magnet metadata is received a torrent file will also be written
to 'copy of' location if requested.
Modified the code for saving torrent file to state in Torrent class for
use by TorrentManager.
2014-07-18 00:35:26 +01:00
Calum Lind
9347a78482 Refactor and tidyup code in torrent.py 2014-07-17 21:55:57 +01:00
Calum Lind
2449f5b99e Fix strange resume_data bug causing fastresume not save on shutdown 2014-07-17 00:11:15 +01:00
Calum Lind
b3e323462c Change logging of 'creating backup' to debug level 2014-07-16 21:25:05 +01:00
Calum Lind
8685c7a604 Show actual error in status from storage_moved_failed_alert 2014-07-16 18:07:12 +01:00
Calum Lind
62cca045be [#637] Add a Moving storage state along with progress
Uses attr Torrent.moving_storage for now but can be replaced with
future lt1.0 status field.
Refactored the code to use the common.TORRENT_STATE list.
Added a translating dict to ui.common to aid translation of state text.
2014-07-16 17:43:12 +01:00
Calum Lind
d51ad7718c Update TorrentManager docstrings and remove old load_torrent method
Passes flake8 and mostly passes pylint
2014-07-15 15:26:35 +01:00
Calum Lind
7b44980912 [#1126] [#2322] Emit FinishedEvent after moving storage complete
Also changed the Execute and Extractor plugins to process the updated
FinishedEvent functionality.
2014-07-13 14:11:47 +01:00
Calum Lind
7aa52e5f1b Prevent private flagged torrents auto-merging trackers
When adding a torrent already in session any new trackers are merged
to the exiting torrent but this is an unwanted feature for private
flagged torrents.
2014-07-07 23:33:45 +01:00
bendikro
dfed6af0c0 Fixes to resume data saving routines.
* Avoid saving resume data unecessarily by checking the queue of calls
* Removed unecessary LoopingCall for resume data
2014-03-10 14:03:06 +00:00
Calum Lind
bc7380c5d7 Add flush_disk_cache parameter to save_resume_data
Using this flag avoids potential issue with file timestamps and
is only needed when stopping the session.
2014-02-25 19:00:50 +00:00
Calum Lind
f2535e196d Let save_resume_data build torrent list on stopping session
By having the func build the list we can skip torrents that we already have
resume data for (need_save_resume_data is False).
2014-02-25 18:57:59 +00:00
Calum Lind
9290cc1f7a Fix building the code documentation with sphinx
Updated Sphinx conf and tested with Sphinx 1.2.1
Moved webui gen_gettext script
Fixed docstring warning in code
Renamed console update-tracker to update_tracker
2014-02-20 17:38:51 +00:00
Calum Lind
67e9787ba1 [#1923] Add pre-allocation and remove compact allocation
Compact allocation is deprecated and a new pre-allocation is available.

Any torrents already using compact will continue to do so but any newly
added only can use sparse (default) or allocate options.

The UIs have been updated to only display a checkbox in preferences for
the user to enable 'Pre-allocate disk space'.
2014-02-16 06:12:37 +00:00
Calum Lind
7dceb629ca Add name to torrent options 2014-02-15 09:27:46 +00:00
Calum Lind
0aed074796 Move owner to torrent options 2014-02-15 09:26:08 +00:00
Calum Lind
a9ed6fe46a refactor torrent.set_options 2014-02-15 09:26:08 +00:00
Calum Lind
0a001f98e3 Add torrent bandwidth priority to core 2014-02-11 19:57:07 +00:00
Calum Lind
d9ce4ff634 add comment to tracker_error_alert handler 2014-01-30 13:19:21 +00:00
Calum Lind
2c4af8f136 Fix empty message for certain tracker status errors
By design alert.msg will be empty if the error code is '-1' so use
a.e.message() to get the message as fallback. It was not used at
replacement because when error code is not '-1' then a.e.message()
will also include the error code, which we do not want.
2014-01-30 11:58:04 +00:00
Calum Lind
a2fcaa15c9 Fix #2006 : Display error when moving storage location fails
Adds handler for storage_moved_failed_alert and then sets the
torrent to Error state and pauses it.
2014-01-20 18:49:22 +00:00
Calum Lind
64fd94e51e Add external ip alert handler to core 2014-01-20 18:49:21 +00:00
Calum Lind
ce6abe0247 Fix #1466 : Performance warning: Send Buffer Watermark 2014-01-20 18:49:21 +00:00
Calum Lind
b5946c91ed Replace internal time_added with lt added_time 2014-01-18 21:10:31 +00:00
Calum Lind
246708e222 Add super_seeding to core 2014-01-18 21:10:23 +00:00
Calum Lind
3180bc7104 Use a tmp file when saving state and resume files 2014-01-18 15:54:43 +00:00
Calum Lind
d12f0365d5 Handle all-zeros KeyError for removed torrents alerts 2014-01-18 14:11:44 +00:00
Calum Lind
01d2ef84ba Fix issue with add_torrent_params flags 2014-01-17 23:43:53 +00:00
Calum Lind
2b64d78163 Remove leftover total_uploaded state code 2014-01-17 19:28:55 +00:00
Calum Lind
0da6739f94 Fixes for #367 : Don't store last_seen_complete and total_uploaded in state file 2014-01-17 19:15:38 +00:00
Calum Lind
9e62304852 More removal of lt deprecated params and funcs
Due to a deprecation mistake get_settings() should be used for python
bindings and it will return a dict.
2014-01-17 18:29:53 +00:00
Calum Lind
b0c3c3dddc Use non-deprecated libtorrent parameters and functions
Also added support for seed_mode
2014-01-17 10:48:42 +00:00
Calum Lind
8eb2155eac Remove torrent_status translations from Daemon and move to UI clients 2014-01-16 23:31:04 +00:00
bendikro
feaeee0379 Removed LoopingCall from torrent.py
Having a LoopingCall for each torrent is expencive with a lot of torrents.
The LoopingCall in torrent.py has been moved to torrentmanager.py
which runs through all the torrents and calls cleanup_prev_status.
2013-11-21 10:48:55 +00:00
Calum Lind
de3740fa70 Remove old code line 2013-11-20 23:26:29 +00:00
Calum Lind
a27b479f06 Fix some typos in my previous commits 2013-05-26 14:55:36 +01:00
Calum Lind
533228ff5e Fix overzealous legacy code removal from torrentmanager 2013-05-26 01:27:21 +01:00
Calum Lind
7dd276631a Add flake8 to setup.cfg and add missed change to #2303 fix 2013-05-22 23:33:06 +01:00
Calum Lind
e3f3b6d751 Cleanup torrentmanger code
* Remove legacy/old state file code
 * Passes flake8 cleanly
 * Most pylint messages dealt with
 * Code now uses >=Python 2.6 'with' and 'as' statements
2013-05-22 22:46:01 +01:00
Calum Lind
77cb794e4d Fix #2303 : Torrent state not updated until after emitting TorrentFinishedEvent 2013-05-22 19:09:56 +01:00
Calum Lind
45f898870f Fix mistake in torrentmanager 2013-05-22 03:01:25 +01:00
Calum Lind
2c4ef9dbb3 Fixup saving and loading state files
* All state files have a backup created before saving
 * The backup will now be used if saving or loading fails
 * GTKUI state files stored in new gtkui_state dir and common load/save functions created
 * Detects bad shutdown and archives timestamped state files in separate config directory.
2013-05-22 01:25:25 +01:00
Calum Lind
105e4c0555 refactor owner code in torrentmanager add method 2013-05-14 01:59:51 +01:00
bendikro
e6498b6864 Fix #2277 : Plugins keys weren't fetched in filter_torrent_ids
Fixed bug introduced in 8c106ce8c4c0794ddd63e8e8f98b097221a56a52
where keys for plugins weren't fetched in filter_torrent_ids.
2013-05-03 18:00:37 +01:00
Calum Lind
1d34d5f6a5 Fix #1840 : Refactor last_seen_complete code 2013-04-29 22:32:01 +01:00
Calum Lind
1d9b550e35 Replace decode with decode_string 2013-02-17 16:19:13 +00:00