#2211 closed bug (Fixed)
Cannot disable downloading of individual files
Reported by: | atrigent | Owned by: | Chase |
---|---|---|---|
Priority: | minor | Milestone: | 2.x |
Component: | Unknown | Version: | master |
Keywords: | Cc: |
Description
If I set specific files in a torrent to "Do not download", the setting is remembered but the files continue to download. The torrent overall acts as if no files have been set as do not download.
Change History (8)
comment:1 by , 12 years ago
Owner: | set to |
---|---|
Status: | new → accepted |
comment:2 by , 12 years ago
Milestone: | → 1.4.0 |
---|
comment:3 by , 12 years ago
This change produced the following error:
02:00:01.988 [ERROR ][deluge.core.torrentmanager :690 ] Torrent state file is either corrupt or incompatible! 'torrent_handle' object has no attribute 'file_priority'
All of my torrents disappeared.
There are two problems here. One is either that there are no checks to make sure that libtorrent 0.16 is in use OR that a feature that is new in 0.16 is used unconditionally.
The other problem is that this should not have caused all of my torrents to disappear. It should only have caused the prioritize first/last feature to fail. In addition, the error message is misleading/incorrect.
I would also prefer for "corrupt" files to be moved aside for further examination rather than simply deleted/overwritten.
comment:4 by , 12 years ago
That function does exist in libtorrent 0.15, but it is not in the python bindings.
http://libtorrent.svn.sourceforge.net/viewvc/libtorrent?view=revision&revision=6927 http://libtorrent.svn.sourceforge.net/viewvc/libtorrent?view=revision&revision=6928
The fix to the bindings was applied to trunk and the RC_0_16 branch. It was applied after 0.16.0 was released, so even that release would produce this error.
comment:5 by , 12 years ago
This fixes it for me:
--- a/deluge/core/torrent.py 2012-11-13 03:43:17.050561338 -0500 +++ b/deluge/core/torrent.py 2012-11-13 03:36:18.000000000 -0500 @@ -315,7 +315,7 @@
for n in range(ti.num_pieces()):
slices = ti.map_block(n, 0, ti.piece_size(n)) for slice in slices:
- if self.handle.file_priority(slice.file_index):
+ if self.handle.file_priorities()[slice.file_index]:
paths.setdefault(slice.file_index, []).append(n)
priorities = self.handle.piece_priorities()
comment:6 by , 12 years ago
Let's try that again.
--- a/deluge/core/torrent.py 2012-11-13 03:43:17.050561338 -0500 +++ b/deluge/core/torrent.py 2012-11-13 03:36:18.000000000 -0500 @@ -315,7 +315,7 @@ for n in range(ti.num_pieces()): slices = ti.map_block(n, 0, ti.piece_size(n)) for slice in slices: - if self.handle.file_priority(slice.file_index): + if self.handle.file_priorities()[slice.file_index]: paths.setdefault(slice.file_index, []).append(n) priorities = self.handle.piece_priorities()
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
This is now fully fixed in master.
There were some major issues with prioritize_first_last implementation which was causing every piece of a torrent to be set to highest priority (when the option was enabled) or normal priority (even when the file was not set to download). I believe I have fixed them up in 9d28aa9521