Skip to content

Commit 1c4f22c

Browse files
committed
torrents_info.py: Modified 2 lines
1 parent cff0271 commit 1c4f22c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

library/playback/torrents_info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,10 +895,10 @@ def gen_row(t):
895895
if 0.0 < file.progress < args.delete_incomplete:
896896
print(f"Deleting incomplete file: {file_path}")
897897
file_utils.trash(args, str(file_path), detach=False)
898-
elif file.progress == 100.0:
898+
elif file.progress == 1.0:
899899
print(f"Keeping complete file: {file_path}")
900900
else:
901-
print(f"Keeping {strings.percent(1 - (file.progress / 100))} incomplete file: {file_path}")
901+
print(f"Keeping {strings.percent(1 - file.progress)} incomplete file: {file_path}")
902902
break # Stop after deleting first valid path
903903

904904
alt_move_syntax = any(

library/playback/torrents_remaining.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def torrents_remaining():
7373
wasted = sum(t.properties.total_wasted for t in mountpoint_torrents)
7474
dl_speed = sum(t.dlspeed for t in mountpoint_torrents if not t.state_enum.is_complete)
7575
dl_time = [t.downloading_time for t in mountpoint_torrents if t.state_enum.is_complete]
76+
ul_time = [t.seeding_time for t in mountpoint_torrents if t.state_enum.is_complete]
7677

7778
categories.append(
7879
{
@@ -90,9 +91,10 @@ def torrents_remaining():
9091
else None
9192
),
9293
"dl_speed": strings.file_size(dl_speed) + "/s" if dl_speed else None,
93-
"historical_eta": strings.duration_short(statistics.median(dl_time)) if dl_time else None,
9494
"next_eta": strings.duration_short(min(etas)) if etas else None,
9595
"median_eta": strings.duration_short(statistics.median(etas)) if etas else None,
96+
"historical_eta": strings.duration_short(statistics.median(dl_time)) if dl_time else None,
97+
"ul_time": strings.duration_short(statistics.median(ul_time)) if ul_time else None,
9698
}
9799
)
98100
printing.table(iterables.list_dict_filter_bool(categories))

library/usage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,6 +1988,10 @@ def play(action) -> str:
19881988
19891989
library torrents -pa
19901990
1991+
Aggregate tracker errors
1992+
1993+
library torrents --errored --trackers
1994+
19911995
Search for specific file
19921996
19931997
library torrents query -v --file-search query2

0 commit comments

Comments
 (0)