This commit is contained in:
Jeffrey Serio 2024-08-10 18:44:57 -05:00
parent 13a4ac5a79
commit 87f7018acf

View File

@ -70,9 +70,9 @@ def remove_torrents(distro_substring: str):
torrent's file name.
"""
for torrent in qb.torrents():
if distro_substring in torrent.get("name"): # type: ignore
qb.delete_permanently(torrent.get("hash")) # type: ignore
print(f"Removed {torrent.get('name')}") # type: ignore
if distro_substring in torrent.get("name"): # type: ignore
qb.delete_permanently(torrent.get("hash")) # type: ignore
print(f"Removed {torrent.get('name')}") # type: ignore
def add_almalinux(rel_ver: str):
@ -177,9 +177,9 @@ def remove_fedora(rel_ver: str):
"""
torrents = qb.torrents()
for torrent in torrents:
if torrent.get("name").startswith("Fedora") and torrent.get("name").endswith(rel_ver): # type: ignore
qb.delete_permanently(torrent.get("hash")) # type: ignore
print(f"Removed {torrent.get('name')}") # type: ignore
if torrent.get("name").startswith("Fedora") and torrent.get("name").endswith(rel_ver): # type: ignore
qb.delete_permanently(torrent.get("hash")) # type: ignore
print(f"Removed {torrent.get('name')}") # type: ignore
def add_freebsd(rel_ver: str):
@ -363,7 +363,7 @@ if __name__ == "__main__":
"gum",
"choose",
"--limit=1",
"--header='Available torrents'",
"--header=Available torrents",
"--height=13",
"AlmaLinux",
"Debian",