Skip to content

Commit 077fbb4

Browse files
committed
torrents-info: add force-start
1 parent 6bd208b commit 077fbb4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

library/playback/torrents_info.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/python3
2+
import argparse
3+
24
from library import usage
35
from library.mediafiles import torrents_start
46
from library.utils import arggroups, argparse_utils, consts, iterables, printing, processes, strings
@@ -8,6 +10,9 @@
810
def parse_args():
911
parser = argparse_utils.ArgumentParser(usage=usage.torrents_info)
1012
arggroups.qBittorrent(parser)
13+
parser.add_argument(
14+
"--force-start", "--start", action=argparse.BooleanOptionalAction, help="Force start matching torrents"
15+
)
1116
arggroups.capability_soft_delete(parser)
1217
arggroups.capability_delete(parser)
1318
arggroups.debug(parser)
@@ -71,6 +76,8 @@ def torrents_info():
7176
qbt_client.torrents_delete(delete_files=True, torrent_hashes=torrent_hashes)
7277
elif args.delete_rows:
7378
qbt_client.torrents_delete(delete_files=False, torrent_hashes=torrent_hashes)
79+
elif args.force_start is not None:
80+
qbt_client.torrents_set_force_start(args.force_start, torrent_hashes=torrent_hashes)
7481
return
7582

7683
interesting_states = [

0 commit comments

Comments
 (0)