mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-25 09:03:41 +01:00
Add category for FreeBSD
This commit is contained in:
parent
b2450248a1
commit
2bd74a4b13
@ -31,7 +31,7 @@ import requests
|
|||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from docopt import docopt
|
from docopt import docopt
|
||||||
|
|
||||||
args = docopt(__doc__)
|
args = docopt(__doc__) # type: ignore
|
||||||
conn_info = dict(
|
conn_info = dict(
|
||||||
host=args["HOSTNAME"],
|
host=args["HOSTNAME"],
|
||||||
username=args["USERNAME"],
|
username=args["USERNAME"],
|
||||||
@ -235,7 +235,7 @@ def add_freebsd(rel_ver: str):
|
|||||||
with qbittorrentapi.Client(**conn_info) as qbt_client:
|
with qbittorrentapi.Client(**conn_info) as qbt_client:
|
||||||
for line in data:
|
for line in data:
|
||||||
if line.startswith("magnet:"):
|
if line.startswith("magnet:"):
|
||||||
if qbt_client.torrents_add(line) != "Ok.":
|
if qbt_client.torrents_add(line, category="distro") != "Ok.":
|
||||||
raise Exception("Failed to add torrent: " + line.split("=")[2])
|
raise Exception("Failed to add torrent: " + line.split("=")[2])
|
||||||
|
|
||||||
print(f"Added {line.split('=')[2]}")
|
print(f"Added {line.split('=')[2]}")
|
||||||
|
Loading…
Reference in New Issue
Block a user