Add category for FreeBSD

This commit is contained in:
Jeffrey Serio 2024-11-16 19:54:59 -06:00
parent b2450248a1
commit 2bd74a4b13

View File

@ -31,7 +31,7 @@ import requests
from bs4 import BeautifulSoup
from docopt import docopt
args = docopt(__doc__)
args = docopt(__doc__) # type: ignore
conn_info = dict(
host=args["HOSTNAME"],
username=args["USERNAME"],
@ -235,7 +235,7 @@ def add_freebsd(rel_ver: str):
with qbittorrentapi.Client(**conn_info) as qbt_client:
for line in data:
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])
print(f"Added {line.split('=')[2]}")