Opened 13 years ago

Closed 13 years ago

#2021 closed bug (Fixed)

Share ratio limit not obeyed for torrents downloaded outside deluge

Reported by: genia4 Owned by:
Priority: minor Milestone: 1.3.4
Component: Core Version: 1.3.3
Keywords: Cc:

Description

When adding a .torrent file to deluge while having the torrent's complete data in the data dir, deluge checks the torrent and adds it as seeding. Problem is that this torrent will not be paused once it reaches the share ratio limit specified in the preferences, it will keep seeding seemingly forever.

Change History (5)

comment:1 by genia4, 13 years ago

This seems to be the offending piece of code (core/torrentmanager.py:269)

                if torrent.get_ratio() >= torrent.options["stop_ratio"] and torrent.is_finished:
                    if torrent.options["remove_at_ratio"]:
                        self.remove(torrent_id)
                        break
                    if not torrent.handle.is_paused():
                        torrent.pause()

When a torrent is added but not a single byte is downloaded, torrent.is_finished is not updated as per core/torrentmanager.py:868

Which leads to the above if statement to be false each time for such a torrent.

Hope this helped.

comment:2 by genia4, 13 years ago

Sorry about the wrong line numbers, looked at the 1.3.3 tag. Same bug exists in master, line 928.

comment:3 by genia4, 13 years ago

Milestone: 1.3.x
Version: 1.3.3git master

comment:4 by Calum, 13 years ago

Milestone: 1.3.4
Version: git master1.3.3

If this is a bug in 1.3.3 then it will need fixing for 1.3.4 as git master is the development version.

comment:5 by Calum, 13 years ago

Resolution: fixed
Status: newclosed

Fixed 1.3-stable: e7dada6af

Note: See TracTickets for help on using tickets.