Ticket #2021 (closed bug: fixed)

Opened 16 months ago

Last modified 15 months ago

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

Changed 16 months 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.

Changed 16 months ago by genia4

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

Changed 16 months ago by genia4

  • version changed from 1.3.3 to git master
  • milestone 1.3.x deleted

Changed 16 months ago by Cas

  • version changed from git master to 1.3.3
  • milestone set to 1.3.4

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.

Changed 15 months ago by Cas

  • status changed from new to closed
  • resolution set to fixed

Fixed 1.3-stable:  e7dada6af

Note: See TracTickets for help on using tickets.