Skip to content

Add --game-list option to specify a file with filter regexes#288

Open
kblaschke wants to merge 1 commit intoSude-:masterfrom
kblaschke:add-game-filter-file-support
Open

Add --game-list option to specify a file with filter regexes#288
kblaschke wants to merge 1 commit intoSude-:masterfrom
kblaschke:add-game-filter-file-support

Conversation

@kblaschke
Copy link
Copy Markdown

@kblaschke kblaschke commented Apr 25, 2025

The --game option will override the list as it's a more specific filter. This allows to configure the list globally in the config file while still using --game to download a single game via the command line.

With this change, the regexes are also only compiled once before filtering.

I went with a similar logic as it is applied with the --game option for the list file:

  • If the file is found and contains at least one entry, games are filtered using the list
  • If the file is found, but empty, no filter is applied (same as setting --game to an empty string)
  • If the file if specified, but not found, no filter is applied either, but an error is printed.

To download all games without a filter while having a filter file specified in the config, users can simply reset it to an empty filename, e.g. lgogdownloader --game-list "".

Fixes issue #267

@kblaschke kblaschke force-pushed the add-game-filter-file-support branch from 2085d0e to f198169 Compare April 25, 2025 09:23
The --game option will override the list as it's a more specific filter. This allows to configure the list globally in the config file while still using --game to download a single game via the command line.
@kblaschke kblaschke force-pushed the add-game-filter-file-support branch from f198169 to 5eb8989 Compare April 25, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant