diff --git a/.gitignore b/.gitignore index ceb0e87..36b9f1a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .venv dist +uv.lock diff --git a/pyproject.toml b/pyproject.toml index 1c25b95..33f20bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "qbt-helper" -version = "0.2" +version = "0.3" authors = [ { name="Jeffrey Serio", email="hyperreal@fedoraproject.org" }, ] diff --git a/qbt_helper.py b/qbt_helper.py index 15406b8..2ad51f8 100755 --- a/qbt_helper.py +++ b/qbt_helper.py @@ -57,10 +57,12 @@ def get_torrents_from_html(webpage_url: str, torrent_substring: str) -> list: urls = [] for link in soup.find_all("a"): if torrent_substring in link.get("href"): - url = f"{webpage_url}/{link.get("href")}" + url = f"{webpage_url}/{link.get('href')}" response = requests.get(url) if response.status_code == 200: urls.append(url) + else: + exit(f"Error verifying the URL: {url}") return urls @@ -276,7 +278,10 @@ def get_tails_urls(rel_ver: str): def selection_prompt(distro_selection: str) -> tuple: choice = Prompt.ask("Enter 'a' to add; 'r' to remove.") - rel_ver = Prompt.ask(f"Enter a release version for {distro_selection}") + if distro_selection != "Kali Linux" and distro_selection != "NixOS": + rel_ver = Prompt.ask(f"Enter a release version for {distro_selection}") + else: + rel_ver = None return (choice, rel_ver) @@ -371,7 +376,7 @@ def main(): case "Kali Linux": match action[0]: case "a": - add_torrents(get_kali_urls(action[1]), conn_info) + add_torrents(get_kali_urls(), conn_info) case "r": remove_torrents("kali-linux", conn_info) case _: