Skip to content

Commit 412da9e

Browse files
committed
fzf: toggle all option
1 parent 1d202f0 commit 412da9e

File tree

4 files changed

+58
-45
lines changed

4 files changed

+58
-45
lines changed

library/mediafiles/torrents_start.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,6 @@ def torrents_start():
158158

159159
if args.delete_torrent:
160160
trash(args, path)
161+
162+
if shutil.which("qbt_prioritize.py"):
163+
processes.cmd("qbt_prioritize.py")

library/playback/torrents_info.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,16 @@ def shorten(s, width):
160160
qbt_client = torrents_start.start_qBittorrent(args)
161161
torrents = qbt_client.torrents_info()
162162

163+
tbl = []
164+
for t in torrents:
165+
msg = "; ".join(tr.msg for tr in torrents[0].trackers if tr.msg != "This torrent is private")
166+
if msg:
167+
tracker = qbt_get_tracker(qbt_client, t)
168+
tbl.append({"path": t.content_path, "tracker": tracker, "msg": msg})
169+
if tbl:
170+
print(f"Error Torrents ({len(tbl)})")
171+
printing.table(sorted(tbl, key=lambda d: (d["msg"], d["tracker"])))
172+
163173
error_torrents = [t for t in torrents if t.state_enum.is_errored]
164174
if error_torrents:
165175
args.status = True

library/utils/processes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def unar_delete(archive_path):
484484
def fzf_select(items, multi=True):
485485
input_text = "\n".join(reversed(items))
486486

487-
fzf_command = ["fzf"]
487+
fzf_command = ["fzf", "--bind", "ctrl-a:toggle-all"]
488488
if multi:
489489
fzf_command += ["--multi"]
490490

pdm.lock

Lines changed: 44 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)