Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions src/catman/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,23 @@ 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,
),
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,
),
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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/catman/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion src/catman/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading