libtorrent icon indicating copy to clipboard operation
libtorrent copied to clipboard

file_completed_alert is sent for file that is on pause

Open blackyblack opened this issue 9 months ago • 2 comments

When torrent has multiple files and one small file has all file pieces overlapping with larger file, we can get file_completed_alert for small file even if it has dont_download flag. See example .torrent file in attached files. You can try to set normal download priority to melk-abbey-library.jpg file from it and do not download priority to other files, and see that file_completed_alert is fired for README file.

test.zip

blackyblack avatar Mar 03 '25 15:03 blackyblack

The documentation has this to say:

This is posted whenever an individual file completes its download. i.e. All pieces overlapping this file have passed their hash check.

So, this behavior sounds as documented. Is there a problem?

arvidn avatar Apr 27 '25 13:04 arvidn

This behavior is understandable, but quite surprising for the end user. If file is marked dont_download one wouldn't expect an event that this file is downloaded. Also it might be surprising to see that after getting this event the file is not present on the filesystem.

blackyblack avatar Apr 27 '25 14:04 blackyblack