All pastes #630094 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-07-22 22:05 UTC
rendered paste body
        if self.get_pref('clear_max_ratio_torrents'):
            remove_list = []
            for index in xrange(len(self.state.queue)):
                unique_ID = self.state.queue[index]
                torrent_state = self.get_core_torrent_state(unique_ID)
                if torrent_state['is_seed']:
                    ratio = self.calc_ratio(unique_ID, torrent_state)
                    if ratio >= self.get_pref('auto_seed_ratio'):
                        remove_list.append(unique_ID)
            for index in xrange(len(remove_list)):
                        self.removed_unique_ids[remove_list[index]] = 1
                        self.remove_torrent(remove_list[index], False, True)