Skip to content

Commit

Permalink
Fixed Non-steam-games without Tags issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Depuydt authored and boppreh committed Dec 27, 2019
1 parent 2bc7990 commit 889619e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions games.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ func addNonSteamGames(user User, games map[string]*Game) {

// The actual binary format is known, but using regexes is way easier than
// parsing the entire file. If I run into any problems I'll replace this.
gamePattern := regexp.MustCompile("(?i)\x00\x01appname\x00(.+?)\x00\x01exe\x00(.+?)\x00\x01.+?\x00tags\x00\x01(.*?)\x08\x08")
tagsPattern := regexp.MustCompile("\\d\x00(.+?)\x00")
gamePattern := regexp.MustCompile("(?i)\x00\x01appname\x00([^\x08]+?)\x00\x01exe\x00([^\x08]+?)\x00\x01[^\x08]+?\x00tags\x00(?:\x01([^\x08]+?)|)\x08\x08")
tagsPattern := regexp.MustCompile("\\d\x00([^\x00\x01\x08]+?)\x00")
for _, gameGroups := range gamePattern.FindAllSubmatch(shortcutBytes, -1) {
gameName := gameGroups[1]
target := gameGroups[2]
Expand Down

0 comments on commit 889619e

Please sign in to comment.