Papanikles / rutorrent

Automatically exported from code.google.com/p/rutorrent
0 stars 0 forks source link

When downloading certain files in torrents and ignoring others, the Done column does not represent the selected files #476

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Sorry for the horrid title, not really sure how to explain any other way in a 
one-line summary.

What steps will reproduce the problem?
1. Find torrent with multiple files. Album torrents provide a good example 
(make sure that you actually own the album first).
2. Select only one or two files to download, and have the rest set to "Don't 
Download".
3. Start downloading the torrent, and take notice of the `Done` column when the 
selected files are done.

What is the expected output? What do you see instead?
I would expect to see the `Done` column to show the % relative to what is set 
to download. For example, if the torrent has a total of ten (10) files (of 
equal size to make it simple), and you set it to only download five (5) of 
them, I expect the `Done` column to show 100% once the 5 files that I want are 
finished. Currently, if you finish downloading the five (5) files, the column 
shows only 50% (since 50% of the total torrent has been download). The current 
implementation is relative to the entire torrent instead of relative to what's 
set to download inside the torrent (like most other BT clients do).

What environment are you using?
1. My ruTorrent version is *SVN Rev 1456*
2. My rTorrent version is *0.8.6*
3. I use *Apache* version *2.2.16-1* on *Arch Linux*
4. I use *Firefox 3.6.10* on *Arch Linux*

Are some errors present in the web-server log?
No

Are some errors present in the browser error console?
No

Please provide any additional information below.

This might be best to put in a separate issue, but it seems to be linked to 
this issue in nature, so I'll post it here. If you set the torrent to download 
only a few files, but still leave some files untouched, when those files are 
finished the `Status` column for the torrent will continue to say "Downloading" 
even when there is nothing else set to download.

Proposed fix:
Have an option in the settings for the user to select if they want the `Done` 
column to represent the entire torrent or just the files selected to down -- 
this way, those who like the current way can keep it.

A fix of this nature will also change the `Remaining` column to reflect the 
Remaining amount of data to be downloaded relative to what is set to download 
rather than relative to the entire torrent.

Original issue reported on code.google.com by ryan.xga...@gmail.com on 4 Oct 2010 at 11:39

GoogleCodeExporter commented 8 years ago
This is a rTorrent problem. Can't be fixed in webui. You may try to open issue 
in the rTorrent project, here - http://libtorrent.rakshasa.no/

Original comment by novik65 on 5 Oct 2010 at 8:59

GoogleCodeExporter commented 8 years ago
I figured it might be due to rTorrent itself. However, isn't it also true that 
the WebUI can intercept and manipulate the information from rtorrent any way it 
wants via PHP? Being a small-time PHP developer, I would think it would be 
somewhat easy to take the information rTorrent gives and manipulate it to fit 
the expected output.

For example, if rTorrent says that only this file is supposed to download while 
the others aren't, I would think ruTorrent can do a few calculations on it's 
own to display the % completed relative to the selected downloads, and not rely 
solely on rTorrent for this information...

This is, of course, an outsiders opinion. I'm not too familiar on the inner 
workings of ruTorrent (or rTorrent, for that matter) and thus not sure what 
it's capable of doing and not doing. I will, however, try to open the issue in 
the rTorrent project as well. Thanks =)

Original comment by ryan.xga...@gmail.com on 5 Oct 2010 at 4:35

GoogleCodeExporter commented 8 years ago
>However, isn't it also true that the WebUI can intercept and manipulate the 
information from rtorrent any way it wants via PHP?

For example, you have 200 torrents. For retrive it's status from rTorrent webui 
must make one multicall request per 3 sec. For check - is this status is valid 
(and for 'relative' recalc it) - webui will must make 200 additional requests 
to rTorrent. Try to think about performance...

Original comment by novik65 on 6 Oct 2010 at 8:13

GoogleCodeExporter commented 8 years ago
Hmm... maybe you're right.

I would think it already makes those 200 calls to get the status -- doing a 
simple math calc shouldn't hurt performance too drastically. But I can see the 
problem when dealing with hundreds, even thousands, of torrents might put a 
strain on it. 

Maybe only check torrents that aren't set to download all files to see if it 
needs to convert the status... I don't know. Perhaps I should look at how the 
ruTorrent code works before I continue to push for this.

Thanks for the clarification. =)

Thanks

Original comment by ryan.xga...@gmail.com on 6 Oct 2010 at 5:09

GoogleCodeExporter commented 8 years ago
If you routinely selectively download files on a seedbox with limited storage 
space, its inconvenient to self calculate how much you've selected. Even more 
so to know if its actually complete. I sometimes download a few albums out of 
100GB FLAC collection...

I am a software developer, I can appreciate the performance loss on the full 
scale (implementing in the columns), but what about the "general" tab, for a 
single torrent.

http://image.torrent-invites.com/images/724selected_Size.jpg

You already know the list of files for that torrent and you know the priorities 
of those files, you don't have to check which files are complete.

for file in torrent.files:
  if file.priority == DONT_DOWNLOAD:
    excluded_size += file.size
complete = (torrent.size - torrent.downloaded_size == excluded_size)

By logic, if the amount not downloaded == amount excluded, then all the files 
included, must be fully downloaded.

Original comment by sho...@gmail.com on 23 Feb 2013 at 6:13