Opened 6 years ago

Closed 6 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 Changed 6 years ago by genia4

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 Changed 6 years ago by genia4

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

comment:3 Changed 6 years ago by genia4

  • Milestone 1.3.x deleted
  • Version changed from 1.3.3 to git master

comment:4 Changed 6 years ago by Cas

  • Milestone set to 1.3.4
  • Version changed from git master to 1.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 Changed 6 years ago by Cas

  • Resolution set to fixed
  • Status changed from new to closed

Fixed 1.3-stable: e7dada6af

Note: See TracTickets for help on using tickets.