Skip to content

Commit

Permalink
remove unnecessary get_torrent_info calls
Browse files Browse the repository at this point in the history
  • Loading branch information
hauxir committed Nov 6, 2019
1 parent d3824aa commit d994de0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions app/torrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def torrent_is_finished(h):


def prioritize_files(h, priorities):
get_torrent_info(h)
piece_priorities_before = list(h.piece_priorities())
h.prioritize_files(priorities)

Expand Down Expand Up @@ -83,7 +82,6 @@ def get_file_piece_indexes(h, f):


def prioritize_first_n_pieces(h, f, n):
get_torrent_info(h)
first_piece_index, _last_piece_index = get_file_piece_indexes(h, f)

piece_priorities = list(h.piece_priorities())
Expand All @@ -95,7 +93,6 @@ def prioritize_first_n_pieces(h, f, n):


def prioritize_last_n_pieces(h, f, n):
get_torrent_info(h)
_first_piece_index, last_piece_index = get_file_piece_indexes(h, f)

piece_priorities = list(h.piece_priorities())
Expand Down

0 comments on commit d994de0

Please sign in to comment.