From a9e11211f4c8092b7014cbb3cd00fb7fbccd433b Mon Sep 17 00:00:00 2001 From: v4n <105587619+v4n00@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:52:13 +0300 Subject: [PATCH] fix: wrong mod name when using Nexus integration --- h2mm | 6 +++--- version | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/h2mm b/h2mm index e9ad16c..b421da8 100755 --- a/h2mm +++ b/h2mm @@ -1,7 +1,7 @@ #!/usr/bin/env bash -VERSION="0.6.5" +VERSION="0.6.6" # --- Globals --- @@ -1798,7 +1798,7 @@ function nexus() { log INFO "" # get mod info - api_url="https://api.nexusmods.com/v1/games/helldivers2/mods/$nexus_mod_id/files/$nexus_mod_file_id.json" + api_url="https://api.nexusmods.com/v1/games/helldivers2/mods/$nexus_mod_id.json" response=$(curl -sSw " http:%{http_code}" -H "apikey: $api_key" "$api_url") [[ $? -ne 0 ]] && { log ERROR "curl failed."; exit 1; } @@ -1807,7 +1807,7 @@ function nexus() { [[ "$status" != "200" ]] && { log ERROR "Invalid response from Nexus Mods API."; exit 1; } # extract info - mod_name=$(echo "$response" | grep -oP '"name":"\K[^"]+') + mod_name=$(echo "$response" | grep -oP '"name":"\K[^"]+' | head -n 1) nexus_mod_version=$(echo "$response" | grep -oP '"version":"\K[^"]+') [[ -z "$mod_name" || -z "$nexus_mod_version" ]] && { log ERROR "Could not extract mod name and version."; exit 1; } diff --git a/version b/version index ef5e445..05e8a45 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.6.5 +0.6.6