Skip to content

Commit

Permalink
Merge branch 'main' into 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Citrinate committed May 7, 2024
2 parents 074109c + a0ce585 commit 0b7ae6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions FreePackages/Data/ASFInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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("(?<type>[as])/(?<id>[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);
Expand Down Expand Up @@ -61,8 +62,7 @@ private static async Task DoUpdate() {
continue;
}

// Match examples: a/12345 or s/12345
Match item = Regex.Match(line, "(?<type>[as])/(?<id>[0-9]+)");
Match item = SourceLine.Match(line);

if (!item.Success) {
ASF.ArchiLogger.LogGenericError(String.Format("{0}: {1}", Strings.ASFInfoParseFailed, line));
Expand Down
2 changes: 1 addition & 1 deletion FreePackagesImporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b7ae6c

Please sign in to comment.