From 1495992f991c341c6531d1446f0d3585190378a2 Mon Sep 17 00:00:00 2001 From: Logan Kirkland Date: Thu, 26 Mar 2026 22:52:56 -0400 Subject: [PATCH 1/2] Fix archive extraction failing when URL contains query string parameters URLs like RRFSounds.zip?dl=1 caused "Unsupported archive format" errors because the query string was included in the filename. Strip query params when deriving the filename from a URL and when detecting the archive format. --- src/catman/content.py | 2 +- src/catman/downloader.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/catman/content.py b/src/catman/content.py index 5a7caee..ee3cc5a 100644 --- a/src/catman/content.py +++ b/src/catman/content.py @@ -73,7 +73,7 @@ def install_from_catalog(item: ContentItem, userdata_path: Path) -> str: if item.is_github_repo: archive = _download_from_github(item.url, tmpdir) else: - filename = item.url.split("/")[-1] + filename = item.url.split("/")[-1].split("?")[0] archive = tmpdir / filename download_file(item.url, archive) diff --git a/src/catman/downloader.py b/src/catman/downloader.py index 386f48b..bc2ddd7 100644 --- a/src/catman/downloader.py +++ b/src/catman/downloader.py @@ -35,7 +35,8 @@ def download_file(url: str, dest: Path) -> Path: def extract_archive(archive: Path, dest: Path) -> Path: """Extract an archive to dest. Returns path to the extracted content root.""" dest.mkdir(parents=True, exist_ok=True) - name = archive.name.lower() + # Strip query string from filename (e.g. "file.zip?dl=1" → "file.zip") + name = archive.name.lower().split("?")[0] if name.endswith((".tar.gz", ".tgz")): _extract_tar(archive, dest, "r:gz") From a504d76dbec64f05e8fdc1ad46dbe0cbf5b4c143 Mon Sep 17 00:00:00 2001 From: Logan Kirkland Date: Sun, 29 Mar 2026 20:51:47 -0400 Subject: [PATCH 2/2] Fixed broken soundpack links --- pyproject.toml | 2 +- src/catman/constants.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4cebd0f..b0419a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "catman" -version = "0.1.2" +version = "0.1.3" description = "CLI game management tool for Cataclysm" readme = "README.md" requires-python = ">=3.11" diff --git a/src/catman/constants.py b/src/catman/constants.py index db1fba9..67aca74 100644 --- a/src/catman/constants.py +++ b/src/catman/constants.py @@ -127,7 +127,7 @@ class ContentItem: ContentItem( name="ChestHole", description="ChestHole soundpack", - url="https://web.archive.org/web/2/https://chezzo.com/cataclysm/ChestHoleSoundPack.zip", + url="https://web.archive.org/web/20240122133501if_/https://chezzo.com/cdda/ChestHoleSoundSet.zip", content_type=ContentType.SOUNDPACKS, variants=[GameVariant.CDDA, GameVariant.TLG], is_github_repo=False, @@ -135,7 +135,7 @@ class ContentItem: ContentItem( name="ChestHole (CC-licensed)", description="ChestHole CC-licensed soundpack", - url="https://web.archive.org/web/2/https://chezzo.com/cataclysm/ChestHoleCCSoundPack.zip", + url="https://web.archive.org/web/20210401095201if_/http://chezzo.com/cdda/ChestHoleCCSoundset.zip", content_type=ContentType.SOUNDPACKS, variants=[GameVariant.CDDA, GameVariant.TLG], is_github_repo=False, @@ -143,7 +143,7 @@ class ContentItem: ContentItem( name="ChestHole (Old Timey)", description="ChestHole Old Timey soundpack", - url="https://web.archive.org/web/2/https://chezzo.com/cataclysm/ChestOldTimeySoundPack.zip", + url="https://web.archive.org/web/20210401095200if_/http://chezzo.com/cdda/ChestOldTimeyLessismore.zip", content_type=ContentType.SOUNDPACKS, variants=[GameVariant.CDDA, GameVariant.TLG], is_github_repo=False, @@ -167,7 +167,7 @@ class ContentItem: ContentItem( name="RRFSounds", description="RRF community soundpack", - url="https://www.dropbox.com/s/9tfsd8g8apdgyxo/RRFSounds.zip?dl=1", + url="https://www.dropbox.com/s/d8dfmb2facvkdh6/RRFSounds.zip?dl=1", content_type=ContentType.SOUNDPACKS, variants=[GameVariant.CDDA, GameVariant.TLG], is_github_repo=False,