Skip to content

Commit

Permalink
[RPKG] Update HitmanDB URLs to Github
Browse files Browse the repository at this point in the history
  • Loading branch information
Notexe committed Oct 15, 2023
1 parent f8a5071 commit 2813e43
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Fetch hash list
run: |
Invoke-WebRequest -Uri "https://hitmandb.glaciermodding.org/latest-hashes.7z" -OutFile "latest-hashes.7z"
Invoke-WebRequest -Uri "https://github.com/glacier-modding/Hitman-Hashes/releases/latest/download/latest-hashes.7z" -OutFile "latest-hashes.7z"
- name: Prepare build
run: |
Expand Down
4 changes: 2 additions & 2 deletions rpkg-gui/DownloadExtractionProgress.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private void Window_Loaded(object sender, RoutedEventArgs e)

webClient.DownloadFileCompleted += WebClient_DownloadFileCompleted;

Uri uri = new Uri("https://hitmandb.glaciermodding.org/latest-hashes.7z");
Uri uri = new Uri("https://github.com/glacier-modding/Hitman-Hashes/releases/latest/download/latest-hashes.7z");

webClient.DownloadFileAsync(uri, "latest-hashes.7z");
}
Expand Down Expand Up @@ -101,7 +101,7 @@ void worker_DoWork(object sender, DoWorkEventArgs e)
{
HttpClient http = new HttpClient() { Timeout = TimeSpan.FromSeconds(10) };

int.TryParse(http.GetAsync("https://hitmandb.glaciermodding.org/version").Result.Content.ReadAsStringAsync().Result, out currentVersionAvailable);
int.TryParse(http.GetAsync("https://github.com/glacier-modding/Hitman-Hashes/releases/latest/download/version").Result.Content.ReadAsStringAsync().Result, out currentVersionAvailable);
}
}

Expand Down
6 changes: 3 additions & 3 deletions rpkg-gui/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private void DownloadExtractHashList()
{
DownloadExtractionProgress downloadExtractionProgress1 = new DownloadExtractionProgress();
downloadExtractionProgress1.operation = 0;
downloadExtractionProgress1.message.Content = "Downloading https://hitmandb.glaciermodding.org/latest-hashes.7z...";
downloadExtractionProgress1.message.Content = "Downloading https://github.com/glacier-modding/Hitman-Hashes/releases/latest/download/latest-hashes.7z...";
downloadExtractionProgress1.ShowDialog();

DownloadExtractionProgress downloadExtractionProgress2 = new DownloadExtractionProgress();
Expand Down Expand Up @@ -193,7 +193,7 @@ private void Window_Loaded(object sender, RoutedEventArgs e)
if (!File.Exists("hash_list.txt"))
{
MessageQuestion messageBox = new MessageQuestion();
messageBox.message.Content = "Error: The hash list file (hash__list.txt) is missing.\n\nIt's necessary for several functions.\n\nClick OK to automatically download it.\n\nYou can also download it manually from https://hitmandb.glaciermodding.org/latest-hashes.7z and extract it to the same directory as this program.";
messageBox.message.Content = "Error: The hash list file (hash__list.txt) is missing.\n\nIt's necessary for several functions.\n\nClick OK to automatically download it.\n\nYou can also download it manually from https://github.com/glacier-modding/Hitman-Hashes/releases/latest/download/latest-hashes.7z and extract it to the same directory as this program.";
messageBox.ShowDialog();

if (messageBox.buttonPressed == "OKButton")
Expand Down Expand Up @@ -224,7 +224,7 @@ private void Window_Loaded(object sender, RoutedEventArgs e)
DownloadExtractionProgress downloadExtractionProgress = new DownloadExtractionProgress();
downloadExtractionProgress.operation = (int)Progress.Operation.MASS_EXTRACT;
downloadExtractionProgress.ProgressBar.IsIndeterminate = true;
downloadExtractionProgress.message.Content = "Checking https://hitmandb.glaciermodding.org/version to see if a new hash list is available...";
downloadExtractionProgress.message.Content = "Checking https://github.com/glacier-modding/Hitman-Hashes/releases/latest/download/version to see if a new hash list is available...";
downloadExtractionProgress.ShowDialog();

if (currentVersion < downloadExtractionProgress.currentVersionAvailable)
Expand Down
4 changes: 2 additions & 2 deletions src/load_master_hash_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ void generic_function::load_hash_list(bool exit_if_no_hash_list, const std::stri
} else {
if (exit_if_no_hash_list) {
LOG_AND_EXIT(
"\nError: hash_list.txt not found. Download the lastest hash_list.txt from https://hitmandb.glaciermodding.org/latest-hashes.7z\n");
"\nError: hash_list.txt not found. Download the lastest hash_list.txt from https://github.com/glacier-modding/Hitman-Hashes/releases/latest/download/latest-hashes.7z\n");
} else {
LOG_AND_RETURN(
"\nError: hash_list.txt not found. Download the lastest hash_list.txt from https://hitmandb.glaciermodding.org/latest-hashes.7z\n");
"\nError: hash_list.txt not found. Download the lastest hash_list.txt from https://github.com/glacier-modding/Hitman-Hashes/releases/latest/download/latest-hashes.7z\n");
}
}

Expand Down

0 comments on commit 2813e43

Please sign in to comment.