Add antiX

This commit is contained in:
Jeffrey Serio 2025-02-19 19:00:26 -06:00
parent 6bfe0ee048
commit 2be5bfec9c
2 changed files with 43 additions and 4 deletions

View File

@ -1,8 +1,8 @@
[project]
name = "qbt-helper"
version = "0.3"
version = "0.5"
authors = [
{ name="Jeffrey Serio", email="hyperreal@fedoraproject.org" },
{ name="Jeffrey Serio", email="hyperreal@moonshadow.dev" },
]
description = "Helper program for adding torrents from URLs to a qBittorrent instance."
readme = "README.md"
@ -18,8 +18,8 @@ dependencies = ["beautifulsoup4>=4.12.3", "docopt>=0.6.2", "qbittorrent-api>=202
qbt-helper = "qbt_helper:main"
[project.urls]
Homepage = "https://codeberg.org/hyperreal/qbt-helper"
Issues = "https://codeberg.org/hyperreal/qbt-helper/issues"
Homepage = "https://git.hyperreal.coffee/hyperreal/qbt-helper"
Issues = "https://git.hyperreal.coffee/hyperreal/qbt-helper/issues"
[build-system]
requires = ["hatchling"]

View File

@ -105,6 +105,35 @@ def get_almalinux_urls(rel_ver: str) -> list:
return urls
def get_antix_urls(rel_ver: str) -> list:
"""
Add antiX URLs.
Params:
relver: the antiX release version.
"""
urls = [
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}_386-base.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}_386-core.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}_386-full.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-x64-base.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-x64-core.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-x64-full.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-net_386-net.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-net_x64-net.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_386-base.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_386-core.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_386-full.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_x64-base.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_x64-core.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_x64-full.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit-net_386-net.iso.torrent",
f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit-net_x64-net.iso.torrent",
]
return urls
def get_debian_urls(rel_ver: str) -> list:
"""
Add Debian torrents from a list of URLs.
@ -302,6 +331,7 @@ def main():
distros = [
"AlmaLinux",
"antiX",
"Debian",
"Devuan",
"Fedora",
@ -337,6 +367,15 @@ def main():
case _:
exit("Invalid action choice.")
case "antiX":
match action[0]:
case "a":
add_torrents(get_antix_urls(action[1]), conn_info)
case "r":
remove_torrents(f"antiX-{action[1]}", conn_info)
case _:
exit("Invalid action choice.")
case "Debian":
match action[0]:
case "a":