diff --git a/FreePackages/Data/ASFInfo.cs b/FreePackages/Data/ASFInfo.cs index b2d5678..cd0a4f2 100644 --- a/FreePackages/Data/ASFInfo.cs +++ b/FreePackages/Data/ASFInfo.cs @@ -16,6 +16,7 @@ namespace FreePackages { internal static class ASFInfo { private static Uri Source = new("https://gist.githubusercontent.com/C4illin/e8c5cf365d816f2640242bf01d8d3675/raw/Steam%2520Codes"); + private static readonly Regex SourceLine = new Regex("(?[as])/(?[0-9]+)", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); // Match examples: a/12345 or s/12345 private static TimeSpan UpdateFrequency = TimeSpan.FromHours(1); private static Timer UpdateTimer = new(async e => await DoUpdate().ConfigureAwait(false), null, Timeout.Infinite, Timeout.Infinite); @@ -61,8 +62,7 @@ private static async Task DoUpdate() { continue; } - // Match examples: a/12345 or s/12345 - Match item = Regex.Match(line, "(?[as])/(?[0-9]+)"); + Match item = SourceLine.Match(line); if (!item.Success) { ASF.ArchiLogger.LogGenericError(String.Format("{0}: {1}", Strings.ASFInfoParseFailed, line)); diff --git a/FreePackagesImporter/README.md b/FreePackagesImporter/README.md index 30dbff9..8160a8d 100644 --- a/FreePackagesImporter/README.md +++ b/FreePackagesImporter/README.md @@ -4,7 +4,7 @@ This userscript lets you transfer packages from SteamDB's [free packages tool](h ## Installation -1. Install a userscript manager like [Tampermonkey](https://www.tampermonkey.net/), [Greasemonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/), or [Violentmonkey](https://violentmonkey.github.io/) +1. Install a userscript manager like [Tampermonkey](https://www.tampermonkey.net/) 2. Go [here](https://raw.githubusercontent.com/Citrinate/FreePackages/main/FreePackagesImporter/code.user.js) and click "Install" 3. Make sure that you have: - ArchiSteamFarm with [IPC](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/IPC) enabled (which is the default)